mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
OGL: Store shader source in OGLShader
So it can be dumped with info log when linking fails.
This commit is contained in:
@ -16,14 +16,15 @@ namespace OGL
|
||||
class OGLShader final : public AbstractShader
|
||||
{
|
||||
public:
|
||||
explicit OGLShader(ShaderStage stage, GLenum gl_type, GLuint gl_id);
|
||||
explicit OGLShader(GLuint gl_compute_program_id);
|
||||
explicit OGLShader(ShaderStage stage, GLenum gl_type, GLuint gl_id, std::string source);
|
||||
explicit OGLShader(GLuint gl_compute_program_id, std::string source);
|
||||
~OGLShader() override;
|
||||
|
||||
u64 GetID() const { return m_id; }
|
||||
GLenum GetGLShaderType() const { return m_type; }
|
||||
GLuint GetGLShaderID() const { return m_gl_id; }
|
||||
GLuint GetGLComputeProgramID() const { return m_gl_compute_program_id; }
|
||||
const std::string& GetSource() const { return m_source; }
|
||||
|
||||
static std::unique_ptr<OGLShader> CreateFromSource(ShaderStage stage, const char* source,
|
||||
size_t length);
|
||||
@ -33,6 +34,7 @@ private:
|
||||
GLenum m_type;
|
||||
GLuint m_gl_id = 0;
|
||||
GLuint m_gl_compute_program_id = 0;
|
||||
std::string m_source;
|
||||
};
|
||||
|
||||
} // namespace OGL
|
||||
|
Reference in New Issue
Block a user