ACMX 2.139.0
Dual-Backend Real-Time GPU Video Synthesis
Loading...
Searching...
No Matches
shader-manifest.cpp File Reference
#include "shader-manifest.hpp"
#include "../shader_selection_shm.hpp"
#include <QFile>
#include <QFileInfo>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonParseError>
#include <QRegularExpression>
#include <QSaveFile>
#include <QTextStream>
#include <algorithm>
#include <cmath>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  acmx2
namespace  anonymous_namespace{shader-manifest.cpp}

Functions

bool acmx2::append_shader_manifest (const QString &directory, const QString &shader, QString &error)
 Add one shader to the preferred manifest if it is not already present.
bool acmx2::create_shader_manifest (const QString &directory, ShaderManifestFormat format, const QStringList &shaders, QString &error)
 Create a new manifest in the requested format.
bool acmx2::custom_uniform_metadata_matches (const QString &leftDirectory, const QString &rightDirectory, bool &matches, QString &error)
 Compare two manifests' custom-uniform ABI and numeric metadata.
QString anonymous_namespace{shader-manifest.cpp}::json_entry_file (const QJsonValue &value)
bool acmx2::load_custom_uniforms (const QString &directory, QList< CustomUniformDefinition > &uniforms, QString &error)
 Load custom float-uniform controls from library.json.
bool anonymous_namespace{shader-manifest.cpp}::load_json_document (const QString &path, QJsonDocument &document, QString &error)
bool acmx2::load_shader_manifest (const QString &directory, QStringList &shaders, QString &error)
 Load shader filenames from the preferred manifest in a directory.
bool acmx2::migrate_index_manifest_to_json (const QString &directory, bool &created, QString &error)
 Create library.json from index.txt when a JSON manifest is absent.
bool anonymous_namespace{shader-manifest.cpp}::nearly_equal (double left, double right)
bool acmx2::remove_shader_manifest_entry (const QString &directory, const QString &shader, QString &error)
 Remove one shader from the preferred manifest, without deleting its file.
std::optional< Backend > acmx2::shader_manifest_backend (const QString &directory, QString &error)
 Read an optional top-level backend hint from library.json.
bool acmx2::shader_manifest_exists (const QString &directory)
 Return true when either supported manifest exists.
QDateTime acmx2::shader_manifest_last_modified (const QString &directory)
 Return the selected manifest's modification time.
std::optional< ShaderLibraryType > acmx2::shader_manifest_library_type (const QString &directory, QString &error)
 Read and validate an optional top-level library_type value.
QString acmx2::shader_manifest_path (const QString &directory)
 Resolve library.json first, then fall back to index.txt.
bool anonymous_namespace{shader-manifest.cpp}::valid_custom_uniform_name (const QString &name)
bool acmx2::write_custom_uniforms (const QString &directory, const QList< CustomUniformDefinition > &uniforms, QString &error)
 Rewrite custom float-uniform controls while preserving all other JSON fields.
bool anonymous_namespace{shader-manifest.cpp}::write_json_document (const QString &path, const QJsonDocument &document, QString &error)
bool acmx2::write_shader_manifest (const QString &directory, const QStringList &shaders, QString &error)
 Rewrite the preferred manifest, preserving JSON fields when possible.

Variables

constexpr auto anonymous_namespace{shader-manifest.cpp}::JSON_MANIFEST_NAME = "library.json"
constexpr auto anonymous_namespace{shader-manifest.cpp}::TEXT_MANIFEST_NAME = "index.txt"