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:
authorClément Foucault <foucault.clem@gmail.com>2020-09-09 01:23:48 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-09 01:28:19 +0300
commitf7fab77f85734e49414ea7d063532dbac6c5b6da (patch)
tree0b43450ad7bb210f0a07b1446228df3d956cab6f /source/blender/gpu/opengl/gl_backend.cc
parent25380802d702e65bc232efb5cd7768d6ace165d4 (diff)
Cleanup: GPU: Replace multiple checks by GLContext::debug_layer_support
Diffstat (limited to 'source/blender/gpu/opengl/gl_backend.cc')
-rw-r--r--source/blender/gpu/opengl/gl_backend.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_backend.cc b/source/blender/gpu/opengl/gl_backend.cc
index e55e07d5a0b..c8d57a20a38 100644
--- a/source/blender/gpu/opengl/gl_backend.cc
+++ b/source/blender/gpu/opengl/gl_backend.cc
@@ -330,6 +330,7 @@ GLint GLContext::max_ubo_size;
GLint GLContext::max_ubo_binds;
/** Extensions. */
bool GLContext::base_instance_support = false;
+bool GLContext::debug_layer_support = false;
bool GLContext::texture_cube_map_array_support = false;
/** Workarounds. */
bool GLContext::texture_copy_workaround = false;
@@ -354,6 +355,12 @@ void GLBackend::capabilities_init(void)
glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &GLContext::max_ubo_size);
GLContext::base_instance_support = GLEW_ARB_base_instance;
GLContext::texture_cube_map_array_support = GLEW_ARB_texture_cube_map_array;
+ GLContext::debug_layer_support = (GLEW_VERSION_4_3 || GLEW_KHR_debug);
+
+ if ((G.debug & G_DEBUG_GPU) == 0) {
+ /* Disable this feature entierly when not debugging. */
+ GLContext::debug_layer_support = false;
+ }
detect_workarounds();
}