Add debugname field to shader options table.

This commit is contained in:
Sasha Szpakowski
2023-12-29 16:51:24 +01:00
parent 8872497561
commit dbcdbc47d5
19 changed files with 84 additions and 24 deletions
+8 -1
View File
@@ -111,6 +111,7 @@ public:
struct CompileOptions
{
std::map<std::string, std::string> defines;
std::string debugName;
};
struct SourceInfo
@@ -189,7 +190,7 @@ public:
// Pointer to the default Shader.
static Shader *standardShaders[STANDARD_MAX_ENUM];
Shader(StrongRef<ShaderStage> stages[]);
Shader(StrongRef<ShaderStage> stages[], const CompileOptions &options);
virtual ~Shader();
/**
@@ -217,6 +218,8 @@ public:
**/
virtual std::string getWarnings() const = 0;
const std::string &getDebugName() const { return debugName; }
virtual int getVertexAttributeIndex(const std::string &name) = 0;
virtual const UniformInfo *getUniformInfo(const std::string &name) const = 0;
@@ -291,6 +294,8 @@ protected:
bool fillUniformReflectionData(UniformInfo &u);
std::string getShaderStageDebugName(ShaderStageType stage) const;
static bool validateInternal(StrongRef<ShaderStage> stages[], std::string& err, ValidationReflection &reflection);
static DataBaseType getDataBaseType(PixelFormat format);
static bool isResourceBaseTypeCompatible(DataBaseType a, DataBaseType b);
@@ -302,6 +307,8 @@ protected:
ValidationReflection validationReflection;
std::string debugName;
}; // Shader
} // graphics