|
@@ -111,6 +111,7 @@ public:
|
|
struct CompileOptions
|
|
struct CompileOptions
|
|
{
|
|
{
|
|
std::map<std::string, std::string> defines;
|
|
std::map<std::string, std::string> defines;
|
|
|
|
+ std::string debugName;
|
|
};
|
|
};
|
|
|
|
|
|
struct SourceInfo
|
|
struct SourceInfo
|
|
@@ -189,7 +190,7 @@ public:
|
|
// Pointer to the default Shader.
|
|
// Pointer to the default Shader.
|
|
static Shader *standardShaders[STANDARD_MAX_ENUM];
|
|
static Shader *standardShaders[STANDARD_MAX_ENUM];
|
|
|
|
|
|
- Shader(StrongRef<ShaderStage> stages[]);
|
|
|
|
|
|
+ Shader(StrongRef<ShaderStage> stages[], const CompileOptions &options);
|
|
virtual ~Shader();
|
|
virtual ~Shader();
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -217,6 +218,8 @@ public:
|
|
**/
|
|
**/
|
|
virtual std::string getWarnings() const = 0;
|
|
virtual std::string getWarnings() const = 0;
|
|
|
|
|
|
|
|
+ const std::string &getDebugName() const { return debugName; }
|
|
|
|
+
|
|
virtual int getVertexAttributeIndex(const std::string &name) = 0;
|
|
virtual int getVertexAttributeIndex(const std::string &name) = 0;
|
|
|
|
|
|
virtual const UniformInfo *getUniformInfo(const std::string &name) const = 0;
|
|
virtual const UniformInfo *getUniformInfo(const std::string &name) const = 0;
|
|
@@ -291,6 +294,8 @@ protected:
|
|
|
|
|
|
bool fillUniformReflectionData(UniformInfo &u);
|
|
bool fillUniformReflectionData(UniformInfo &u);
|
|
|
|
|
|
|
|
+ std::string getShaderStageDebugName(ShaderStageType stage) const;
|
|
|
|
+
|
|
static bool validateInternal(StrongRef<ShaderStage> stages[], std::string& err, ValidationReflection &reflection);
|
|
static bool validateInternal(StrongRef<ShaderStage> stages[], std::string& err, ValidationReflection &reflection);
|
|
static DataBaseType getDataBaseType(PixelFormat format);
|
|
static DataBaseType getDataBaseType(PixelFormat format);
|
|
static bool isResourceBaseTypeCompatible(DataBaseType a, DataBaseType b);
|
|
static bool isResourceBaseTypeCompatible(DataBaseType a, DataBaseType b);
|
|
@@ -302,6 +307,8 @@ protected:
|
|
|
|
|
|
ValidationReflection validationReflection;
|
|
ValidationReflection validationReflection;
|
|
|
|
|
|
|
|
+ std::string debugName;
|
|
|
|
+
|
|
}; // Shader
|
|
}; // Shader
|
|
|
|
|
|
} // graphics
|
|
} // graphics
|