mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
OGL: use already known object label lengths
Passing -1 means the driver has to call strlen().
This commit is contained in:
parent
4b8fe959d4
commit
22eb7e6645
@ -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_PROGRAM, 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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user