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
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-05 03:45:15 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-05 18:49:14 +0300
commit65a593f6ef878045363714e43596ca4b2ac79ed3 (patch)
treeb220a7327f11abf79dc79cb13474d74383ad1da1 /source
parent8e4c0efbe36a1470efea2919053b58096e662f2b (diff)
GPUDebug: Only enable resource checking in debug mode
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/opengl/gl_debug.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_debug.cc b/source/blender/gpu/opengl/gl_debug.cc
index 674ca2f0bf1..1b0d36d331e 100644
--- a/source/blender/gpu/opengl/gl_debug.cc
+++ b/source/blender/gpu/opengl/gl_debug.cc
@@ -28,6 +28,8 @@
#include "BLI_system.h"
#include "BLI_utildefines.h"
+#include "BKE_global.h"
+
#include "glew-mx.h"
#include "gl_context.hh"
@@ -179,6 +181,10 @@ void check_gl_error(const char *info)
void check_gl_resources(const char *info)
{
+ if (!(G.debug & G_DEBUG_GPU)) {
+ return;
+ }
+
GLContext *ctx = static_cast<GLContext *>(GPU_context_active_get());
ShaderInterface *interface = ctx->shader->interface;
/* NOTE: This only check binding. To be valid, the bound ubo needs to