diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-10-07 04:13:46 +0200 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-10-07 22:27:49 +0200 |
commit | 4d0c6824680570820101ec19f9fb8e44a8fd68e0 (patch) | |
tree | 703f2fc47ab3ae12c3878d19dc6735ed69481780 | |
parent | Merge pull request #1396 from DarkLordZach/packed-updates (diff) | |
download | yuzu-4d0c6824680570820101ec19f9fb8e44a8fd68e0.tar yuzu-4d0c6824680570820101ec19f9fb8e44a8fd68e0.tar.gz yuzu-4d0c6824680570820101ec19f9fb8e44a8fd68e0.tar.bz2 yuzu-4d0c6824680570820101ec19f9fb8e44a8fd68e0.tar.lz yuzu-4d0c6824680570820101ec19f9fb8e44a8fd68e0.tar.xz yuzu-4d0c6824680570820101ec19f9fb8e44a8fd68e0.tar.zst yuzu-4d0c6824680570820101ec19f9fb8e44a8fd68e0.zip |
-rw-r--r-- | src/video_core/utils.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/video_core/utils.h b/src/video_core/utils.h index 681919ae3..237cc1307 100644 --- a/src/video_core/utils.h +++ b/src/video_core/utils.h @@ -169,16 +169,20 @@ static void LabelGLObject(GLenum identifier, GLuint handle, VAddr addr, const std::string nice_addr = fmt::format("0x{:016x}", addr); std::string object_label; - switch (identifier) { - case GL_TEXTURE: - object_label = extra_info + "@" + nice_addr; - break; - case GL_PROGRAM: - object_label = "ShaderProgram@" + nice_addr; - break; - default: - object_label = fmt::format("Object(0x{:x})@{}", identifier, nice_addr); - break; + if (extra_info.empty()) { + switch (identifier) { + case GL_TEXTURE: + object_label = "Texture@" + nice_addr; + break; + case GL_PROGRAM: + object_label = "Shader@" + nice_addr; + break; + default: + object_label = fmt::format("Object(0x{:x})@{}", identifier, nice_addr); + break; + } + } else { + object_label = extra_info + '@' + nice_addr; } glObjectLabel(identifier, handle, -1, static_cast<const GLchar*>(object_label.c_str())); } |