summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2022-11-01 02:18:37 -0400
committerGitHub <noreply@github.com>2022-11-01 02:18:37 -0400
commit5488d3b125dbec66ef4b35b124ce3c3c255b91fc (patch)
treef8a95300b0d219a3d7a2f6018bad2dcaa281fc08 /Source/Core
parent12b204d92a2a48b32c2016cfdaf7749235ce88a1 (diff)
parent22eb7e664516b61e7679844aa846459086154189 (diff)
Merge pull request #11239 from Tilka/ogl
OGL: fix compute shader labels
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoBackends/OGL/OGLShader.cpp4
-rw-r--r--Source/Core/VideoBackends/OGL/OGLTexture.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/OGL/OGLShader.cpp b/Source/Core/VideoBackends/OGL/OGLShader.cpp
index f2b970d71b..3338087132 100644
--- a/Source/Core/VideoBackends/OGL/OGLShader.cpp
+++ b/Source/Core/VideoBackends/OGL/OGLShader.cpp
@@ -33,7 +33,7 @@ OGLShader::OGLShader(ShaderStage stage, GLenum gl_type, GLuint gl_id, std::strin
{
if (!m_name.empty() && g_ActiveConfig.backend_info.bSupportsSettingObjectNames)
{
- glObjectLabel(GL_SHADER, m_gl_id, -1, m_name.c_str());
+ glObjectLabel(GL_SHADER, m_gl_id, (GLsizei)m_name.size(), m_name.c_str());
}
}
@@ -44,7 +44,7 @@ OGLShader::OGLShader(GLuint gl_compute_program_id, std::string source, std::stri
{
if (!m_name.empty() && g_ActiveConfig.backend_info.bSupportsSettingObjectNames)
{
- glObjectLabel(GL_SHADER, m_gl_compute_program_id, -1, m_name.c_str());
+ glObjectLabel(GL_PROGRAM, m_gl_compute_program_id, (GLsizei)m_name.size(), m_name.c_str());
}
}
diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.cpp b/Source/Core/VideoBackends/OGL/OGLTexture.cpp
index 113be2f1f4..8c1b14cd08 100644
--- a/Source/Core/VideoBackends/OGL/OGLTexture.cpp
+++ b/Source/Core/VideoBackends/OGL/OGLTexture.cpp
@@ -120,7 +120,7 @@ OGLTexture::OGLTexture(const TextureConfig& tex_config, std::string_view name)
if (!m_name.empty() && g_ActiveConfig.backend_info.bSupportsSettingObjectNames)
{
- glObjectLabel(GL_TEXTURE, m_texId, -1, m_name.c_str());
+ glObjectLabel(GL_TEXTURE, m_texId, (GLsizei)m_name.size(), m_name.c_str());
}
glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, m_config.levels - 1);