Shader: Replace indices-based option keys by CRC32
This commit is contained in:
@@ -44,7 +44,7 @@ namespace Nz::ShaderAst
|
||||
{
|
||||
std::function<ModulePtr(const std::vector<std::string>& /*modulePath*/)> moduleCallback;
|
||||
std::unordered_set<std::string> reservedIdentifiers;
|
||||
std::unordered_map<std::size_t, ConstantValue> optionValues;
|
||||
std::unordered_map<UInt32, ConstantValue> optionValues;
|
||||
bool makeVariableNameUnique = false;
|
||||
bool reduceLoopsToWhile = false;
|
||||
bool removeConstDeclaration = false;
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Nz
|
||||
};
|
||||
|
||||
static const char* GetFlipYUniformName();
|
||||
static ShaderAst::ModulePtr Sanitize(const ShaderAst::Module& module, std::unordered_map<std::size_t, ShaderAst::ConstantValue> optionValues, std::string* error = nullptr);
|
||||
static ShaderAst::ModulePtr Sanitize(const ShaderAst::Module& module, std::unordered_map<UInt32, ShaderAst::ConstantValue> optionValues, std::string* error = nullptr);
|
||||
|
||||
private:
|
||||
void Append(const ShaderAst::ArrayType& type);
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Nz
|
||||
|
||||
struct States
|
||||
{
|
||||
std::unordered_map<std::size_t, ShaderAst::ConstantValue> optionValues;
|
||||
std::unordered_map<UInt32, ShaderAst::ConstantValue> optionValues;
|
||||
bool optimize = false;
|
||||
bool sanitized = false;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user