Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index a3288ff4cff..f82138e0d65 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -331,11 +331,21 @@ void object_label(GLenum type, GLuint object, const char *name)
char label[64];
SNPRINTF(label, "%s%s%s", to_str_prefix(type), name, to_str_suffix(type));
/* Small convenience for caller. */
- if (ELEM(type, GL_FRAGMENT_SHADER, GL_GEOMETRY_SHADER, GL_VERTEX_SHADER, GL_COMPUTE_SHADER)) {
- type = GL_SHADER;
- }
- if (ELEM(type, GL_UNIFORM_BUFFER)) {
- type = GL_BUFFER;
+ switch (type) {
+ case GL_FRAGMENT_SHADER:
+ case GL_GEOMETRY_SHADER:
+ case GL_VERTEX_SHADER:
+ case GL_COMPUTE_SHADER:
+ type = GL_SHADER;
+ break;
+ case GL_UNIFORM_BUFFER:
+ case GL_SHADER_STORAGE_BUFFER:
+ case GL_ARRAY_BUFFER:
+ case GL_ELEMENT_ARRAY_BUFFER:
+ type = GL_BUFFER;
+ break;
+ default:
+ break;
}
glObjectLabel(type, object, -1, label);
}