[Bf-blender-cvs] [409043c] master: GPU: code cleanup, no fundamental changes

Dalai Felinto noreply at git.blender.org
Wed Dec 3 20:57:46 CET 2014


Commit: 409043c69dc456fc79f98cc2005ae1b08f6c1719
Author: Dalai Felinto
Date:   Wed Dec 3 17:26:43 2014 -0200
Branches: master
https://developer.blender.org/rB409043c69dc456fc79f98cc2005ae1b08f6c1719

GPU: code cleanup, no fundamental changes

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

M	source/blender/gpu/intern/gpu_extensions.c

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

diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 0781337..a65b916 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -268,7 +268,7 @@ int GPU_print_error(const char *str)
 {
 	GLenum errCode;
 
-	if (G.debug & G_DEBUG) {
+	if ((G.debug & G_DEBUG)) {
 		if ((errCode = glGetError()) != GL_NO_ERROR) {
 			fprintf(stderr, "%s opengl error: %s\n", str, gluErrorString(errCode));
 			return 1;
@@ -748,8 +748,8 @@ void GPU_texture_bind(GPUTexture *tex, int number)
 		return;
 	}
 
-	if (tex->fb) {
-		if (tex->fb->object == GG.currentfb && (G.debug & G_DEBUG)) {
+	if ((G.debug & G_DEBUG)) {
+		if (tex->fb && tex->fb->object == GG.currentfb) {
 			fprintf(stderr, "Feedback loop warning!: Attempting to bind texture attached to current framebuffer!\n");
 		}
 	}
@@ -884,8 +884,10 @@ int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, int slot
 		return 0;
 	}
 
-	if (tex->number != -1 && (G.debug & G_DEBUG)) {
-		fprintf(stderr, "Feedback loop warning!: Attempting to attach texture to framebuffer while still bound to texture unit for drawing!");
+	if ((G.debug & G_DEBUG)) {
+		if (tex->number != -1) {
+			fprintf(stderr, "Feedback loop warning!: Attempting to attach texture to framebuffer while still bound to texture unit for drawing!");
+		}
 	}
 
 	if (tex->depth)
@@ -1252,8 +1254,8 @@ static void shader_print_errors(const char *task, char *log, const char **code,
 	for (i = 0; i < totcode; i++) {
 		const char *c, *pos, *end = code[i] + strlen(code[i]);
 		int line = 1;
-				
-		if (G.debug & G_DEBUG) {
+
+		if ((G.debug & G_DEBUG)) {
 			fprintf(stderr, "===== shader string %d ====\n", i + 1);
 
 			c = code[i];




More information about the Bf-blender-cvs mailing list