[Bf-blender-cvs] [0795f62] master: GPU debug: Only flush stderr if needed.

Antony Riakiotakis noreply at git.blender.org
Wed Jul 22 13:58:13 CEST 2015


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);
 }




More information about the Bf-blender-cvs mailing list