From 22eb7e664516b61e7679844aa846459086154189 Mon Sep 17 00:00:00 2001 From: Tillmann Karras Date: Tue, 1 Nov 2022 00:46:06 +0000 Subject: OGL: use already known object label lengths Passing -1 means the driver has to call strlen(). --- Source/Core/VideoBackends/OGL/OGLTexture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/OGL/OGLTexture.cpp') 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); -- cgit v1.2.3