[Bf-blender-cvs] [af095ab71f3] tmp-gltexture: GPUDebug: Only enable resource checking in debug mode
Clément Foucault
noreply at git.blender.org
Sat Sep 5 02:55:48 CEST 2020
Commit: af095ab71f38c4e37fbe1b39920cfe33f2ed0de6
Author: Clément Foucault
Date: Sat Sep 5 02:45:15 2020 +0200
Branches: tmp-gltexture
https://developer.blender.org/rBaf095ab71f38c4e37fbe1b39920cfe33f2ed0de6
GPUDebug: Only enable resource checking in debug mode
===================================================================
M source/blender/gpu/opengl/gl_debug.cc
===================================================================
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
More information about the Bf-blender-cvs
mailing list