[Bf-blender-cvs] [db38a65] master: Filter the debug callback to only report errors unless debug value is 20.
Antony Riakiotakis
noreply at git.blender.org
Mon Jul 20 14:46:27 CEST 2015
Commit: db38a65b022cd11892034d6882d643fd46d618c8
Author: Antony Riakiotakis
Date: Mon Jul 20 14:37:22 2015 +0200
Branches: master
https://developer.blender.org/rBdb38a65b022cd11892034d6882d643fd46d618c8
Filter the debug callback to only report errors unless debug value is
20.
stderr was getting flooded with too many error messages, most of which
were not really relevant.
===================================================================
M source/blender/gpu/intern/gpu_debug.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_debug.c b/source/blender/gpu/intern/gpu_debug.c
index 3066467..b9a2288 100644
--- a/source/blender/gpu/intern/gpu_debug.c
+++ b/source/blender/gpu/intern/gpu_debug.c
@@ -163,11 +163,16 @@ const char* gpuErrorString(GLenum err)
#endif
-static void APIENTRY gpu_debug_proc(GLenum UNUSED(source), GLenum UNUSED(type), GLuint UNUSED(id),
+static void APIENTRY gpu_debug_proc(GLenum source, GLenum type, GLuint UNUSED(id),
GLenum UNUSED(severity), GLsizei UNUSED(length),
const GLchar *message, GLvoid *UNUSED(userParm))
{
- fprintf(stderr, "GL: %s\n", message);
+ if (source == GL_DEBUG_SOURCE_API && type == GL_DEBUG_TYPE_ERROR)
+ fprintf(stderr, "GL: %s\n", message);
+ else if (G.debug_value == 20) {
+ fprintf(stderr, "GL: %s\n", message);
+ }
+ fflush(stderr);
}
More information about the Bf-blender-cvs
mailing list