Commit: 0795f62ddfed50d0836ab42849b791b0a0a43a0b
Author: Antony Riakiotakis
Date:   Wed Jul 22 13:57:35 2015 +0200
Branches: master
https://developer.blender.org/rB0795f62ddfed50d0836ab42849b791b0a0a43a0b

GPU debug: Only flush stderr if needed.

===================================================================

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 b9a2288..15fe6ed 100644
--- a/source/blender/gpu/intern/gpu_debug.c
+++ b/source/blender/gpu/intern/gpu_debug.c
@@ -167,12 +167,14 @@ 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))
 {
-       if (source == GL_DEBUG_SOURCE_API && type == GL_DEBUG_TYPE_ERROR)
+       if (source == GL_DEBUG_SOURCE_API && type == GL_DEBUG_TYPE_ERROR) {
                fprintf(stderr, "GL: %s\n", message);
+               fflush(stderr);
+       }
        else if (G.debug_value == 20) {
                fprintf(stderr, "GL: %s\n", message);
+               fflush(stderr);
        }
-       fflush(stderr);
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to