mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 22:29:39 -06:00
VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
@ -16,8 +17,9 @@ namespace OGL
|
||||
class OGLShader final : public AbstractShader
|
||||
{
|
||||
public:
|
||||
explicit OGLShader(ShaderStage stage, GLenum gl_type, GLuint gl_id, std::string source);
|
||||
explicit OGLShader(GLuint gl_compute_program_id, std::string source);
|
||||
explicit OGLShader(ShaderStage stage, GLenum gl_type, GLuint gl_id, std::string source,
|
||||
std::string name);
|
||||
explicit OGLShader(GLuint gl_compute_program_id, std::string source, std::string name);
|
||||
~OGLShader() override;
|
||||
|
||||
u64 GetID() const { return m_id; }
|
||||
@ -26,7 +28,8 @@ public:
|
||||
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, std::string_view source);
|
||||
static std::unique_ptr<OGLShader> CreateFromSource(ShaderStage stage, std::string_view source,
|
||||
std::string_view name);
|
||||
|
||||
private:
|
||||
u64 m_id;
|
||||
@ -34,6 +37,7 @@ private:
|
||||
GLuint m_gl_id = 0;
|
||||
GLuint m_gl_compute_program_id = 0;
|
||||
std::string m_source;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
} // namespace OGL
|
||||
|
Reference in New Issue
Block a user