From b36c8663980afdf14509ed7d95d5f19ac0954c45 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Sun, 30 Jan 2022 21:46:27 -0500 Subject: [PATCH] OGLTexture: Only set texture name if supported --- Source/Core/VideoBackends/OGL/OGLTexture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.cpp b/Source/Core/VideoBackends/OGL/OGLTexture.cpp index cf3c5f772b..113be2f1f4 100644 --- a/Source/Core/VideoBackends/OGL/OGLTexture.cpp +++ b/Source/Core/VideoBackends/OGL/OGLTexture.cpp @@ -9,6 +9,8 @@ #include "VideoBackends/OGL/SamplerCache.h" +#include "VideoCommon/VideoConfig.h" + namespace OGL { namespace @@ -116,7 +118,7 @@ OGLTexture::OGLTexture(const TextureConfig& tex_config, std::string_view name) glActiveTexture(GL_MUTABLE_TEXTURE_INDEX); glBindTexture(target, m_texId); - if (!m_name.empty()) + if (!m_name.empty() && g_ActiveConfig.backend_info.bSupportsSettingObjectNames) { glObjectLabel(GL_TEXTURE, m_texId, -1, m_name.c_str()); }