[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46996] branches/soc-2012-swiss_cheese/ source/blender/gpu/intern: fixed some asserts that fire in debug mode

Jason Wilkins Jason.A.Wilkins at gmail.com
Fri May 25 04:54:37 CEST 2012


Revision: 46996
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46996
Author:   jwilkins
Date:     2012-05-25 02:54:32 +0000 (Fri, 25 May 2012)
Log Message:
-----------
fixed some asserts that fire in debug mode

been building in release all day for profiling and forgot to check

Modified Paths:
--------------
    branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
    branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h

Modified: branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c	2012-05-25 02:42:33 UTC (rev 46995)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate.c	2012-05-25 02:54:32 UTC (rev 46996)
@@ -215,14 +215,6 @@
 		SWAP(GPUimmediate*, immediate, GPU_IMMEDIATE);
 	}
 
-	assert(!(immediate->bufferData));
-
-	if (immediate->bufferData) {
-		SWAP(GPUimmediate*, immediate, GPU_IMMEDIATE);
-		gpuImmediateUnlock();
-		SWAP(GPUimmediate*, immediate, GPU_IMMEDIATE);
-	}
-
 	if (GPU_IMMEDIATE == immediate) {
 		gpuImmediateMakeCurrent(NULL);
 	}

Modified: branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h
===================================================================
--- branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h	2012-05-25 02:42:33 UTC (rev 46995)
+++ branches/soc-2012-swiss_cheese/source/blender/gpu/intern/gpu_immediate_inline.h	2012-05-25 02:54:32 UTC (rev 46996)
@@ -54,15 +54,15 @@
 {
 	GPU_CHECK_NO_BEGIN();
 
+#if GPU_LEGACY_INTEROP
+	gpu_legacy_get_state();
+#endif
+
 	GPU_IMMEDIATE->mode = mode;
 
 	assert(GPU_IMMEDIATE->beginBuffer);
 
 	if (GPU_IMMEDIATE->beginBuffer) {
-#if GPU_LEGACY_INTEROP
-		gpu_legacy_get_state();
-#endif
-
 		GPU_IMMEDIATE->beginBuffer();
 	}
 }
@@ -355,15 +355,15 @@
 
 	if (GPU_IMMEDIATE->endBuffer) {
 		GPU_IMMEDIATE->endBuffer();
-
-#if GPU_LEGACY_INTEROP
-		gpu_legacy_put_state();
-#endif
 	}
 
 	GPU_IMMEDIATE->buffer = NULL;
 	GPU_IMMEDIATE->offset = 0;
 	GPU_IMMEDIATE->count  = 0;
+
+#if GPU_LEGACY_INTEROP
+	gpu_legacy_put_state();
+#endif
 }
 
 




More information about the Bf-blender-cvs mailing list