[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60274] branches/soc-2013-viewport_fx/ source/blender: fixed violations of some new GPU_SAFETY checks I put in

Jason Wilkins Jason.A.Wilkins at gmail.com
Sat Sep 21 05:36:19 CEST 2013


Revision: 60274
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60274
Author:   jwilkins
Date:     2013-09-21 03:36:16 +0000 (Sat, 21 Sep 2013)
Log Message:
-----------
fixed violations of some new GPU_SAFETY checks I put in

Modified Paths:
--------------
    branches/soc-2013-viewport_fx/source/blender/blenfont/intern/blf.c
    branches/soc-2013-viewport_fx/source/blender/gpu/GPU_utility.h
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_basic.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_font.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_pixels.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_raster.c
    branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_sprite.c

Modified: branches/soc-2013-viewport_fx/source/blender/blenfont/intern/blf.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/blenfont/intern/blf.c	2013-09-20 20:25:07 UTC (rev 60273)
+++ branches/soc-2013-viewport_fx/source/blender/blenfont/intern/blf.c	2013-09-21 03:36:16 UTC (rev 60274)
@@ -53,6 +53,7 @@
 #include "GPU_blender_aspect.h"
 #include "GPU_immediate.h"
 #include "GPU_matrix.h"
+#include "GPU_font.h"
 
 /* Max number of font in memory.
  * Take care that now every font have a glyph cache per size/dpi,
@@ -504,12 +505,8 @@
 	}
 
 	if (font->locked == 0) {
-		// SSS End (Assuming the basic aspect is ending)
-		GPU_aspect_end();
+		GPU_font_begin();
 
-		// SSS Begin Font
-		GPU_aspect_begin(GPU_ASPECT_FONT, NULL);
-
 		if (font->shadow || font->blur) {
 			gpuImmediateFormat_T2_C4_V2(); // DOODLE: blurred and/or shadowed text
 		}
@@ -540,11 +537,7 @@
 
 		gpuImmediateUnformat();
 
-		// SSS End Font
-		GPU_aspect_end();
-
-		// SSS Begin Basic
-		GPU_aspect_begin(GPU_ASPECT_BASIC, NULL);
+		GPU_font_end();
 	}
 }
 

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/GPU_utility.h
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/GPU_utility.h	2013-09-20 20:25:07 UTC (rev 60273)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/GPU_utility.h	2013-09-21 03:36:16 UTC (rev 60274)
@@ -69,4 +69,4 @@
 
 
 
-#endif /* __GPU_UTILITY_H__ */
+#endif /* _GPU_UTILITY_H_ */

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_basic.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_basic.c	2013-09-20 20:25:07 UTC (rev 60273)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_basic.c	2013-09-21 03:36:16 UTC (rev 60274)
@@ -75,6 +75,7 @@
 	GPUShader*   gpushader[GPU_BASIC_OPTION_COMBINATIONS];
 	bool         failed   [GPU_BASIC_OPTION_COMBINATIONS];
 	GPUcommon    common   [GPU_BASIC_OPTION_COMBINATIONS];
+
 } BASIC_SHADER;
 
 

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_font.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_font.c	2013-09-20 20:25:07 UTC (rev 60273)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_font.c	2013-09-21 03:36:16 UTC (rev 60274)
@@ -198,10 +198,13 @@
 {
 #if GPU_SAFETY
 	GPU_ASSERT(FONT_BEGUN);
-	FONT_BEGUN = false;
 #endif
 
 	GPU_aspect_end();
 	
+#if GPU_SAFETY
+	FONT_BEGUN = false;
+#endif
+
 	GPU_aspect_begin(GPU_ASPECT_BASIC, 0);
 }

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_pixels.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_pixels.c	2013-09-20 20:25:07 UTC (rev 60273)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_pixels.c	2013-09-21 03:36:16 UTC (rev 60274)
@@ -453,7 +453,6 @@
 {
 #if GPU_SAFETY
 	GPU_ASSERT(PIXELS_BEGUN);
-	PIXELS_BEGUN = false;
 #endif
 
 #if defined(WITH_GL_PROFILE_COMPAT)
@@ -503,6 +502,10 @@
 	// SSS End Pixels
 	GPU_aspect_end();
 
+#if GPU_SAFETY
+	PIXELS_BEGUN = false;
+#endif
+
 	// SSS Begin Basic
 	GPU_aspect_begin(GPU_ASPECT_BASIC, NULL);
 }

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_raster.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_raster.c	2013-09-20 20:25:07 UTC (rev 60273)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_raster.c	2013-09-21 03:36:16 UTC (rev 60274)
@@ -461,12 +461,15 @@
 {
 #if GPU_SAFETY
 	GPU_ASSERT(RASTER_BEGUN);
-	RASTER_BEGUN = false;
 #endif
 
 	// SSS End Raster
 	GPU_aspect_end();
 
+#if GPU_SAFETY
+	RASTER_BEGUN = false;
+#endif
+
 	// SSS Begin Basic
 	GPU_aspect_begin(GPU_ASPECT_BASIC, NULL);
 }

Modified: branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_sprite.c
===================================================================
--- branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_sprite.c	2013-09-20 20:25:07 UTC (rev 60273)
+++ branches/soc-2013-viewport_fx/source/blender/gpu/intern/gpu_sprite.c	2013-09-21 03:36:16 UTC (rev 60274)
@@ -310,7 +310,6 @@
 {
 #if GPU_SAFETY
 	GPU_ASSERT(SPRITE_BEGUN);
-	SPRITE_BEGUN = false;
 #endif
 
 #if defined(WITH_GL_PROFILE_COMPAT)
@@ -322,8 +321,12 @@
 	{
 		gpuEnd();
 	}
-	
+
 	GPU_aspect_end();
-	
+
+#if GPU_SAFETY
+	SPRITE_BEGUN = false;
+#endif
+
 	GPU_aspect_begin(GPU_ASPECT_BASIC, NULL);
 }




More information about the Bf-blender-cvs mailing list