[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32642] trunk/blender/source/blender: bugfix/workaround for ../../radeon/radeon_cs_gem.c:181: cs_gem_write_reloc : Assertion `boi->space_accounted' failed.
Campbell Barton
ideasman42 at gmail.com
Fri Oct 22 02:29:56 CEST 2010
Revision: 32642
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32642
Author: campbellbarton
Date: 2010-10-22 02:29:56 +0200 (Fri, 22 Oct 2010)
Log Message:
-----------
bugfix/workaround for ../../radeon/radeon_cs_gem.c:181: cs_gem_write_reloc: Assertion `boi->space_accounted' failed. [#656100]
reported on launchpad.
calling glClear(GL_COLOR_BUFFER_BIT); was crashing blender,
since this is only used to blank the window before its drawn, disable for opensource ATI drivers.
Modified Paths:
--------------
trunk/blender/source/blender/gpu/intern/gpu_extensions.c
trunk/blender/source/blender/windowmanager/intern/wm_window.c
Modified: trunk/blender/source/blender/gpu/intern/gpu_extensions.c
===================================================================
--- trunk/blender/source/blender/gpu/intern/gpu_extensions.c 2010-10-21 22:45:54 UTC (rev 32641)
+++ trunk/blender/source/blender/gpu/intern/gpu_extensions.c 2010-10-22 00:29:56 UTC (rev 32642)
@@ -91,6 +91,11 @@
GLint r, g, b;
const char *vendor, *renderer;
+ /* can't avoid calling this multiple times, see wm_window_add_ghostwindow */
+ static char init= 0;
+ if(init) return;
+ init= 1;
+
glewInit();
/* glewIsSupported("GL_VERSION_2_0") */
Modified: trunk/blender/source/blender/windowmanager/intern/wm_window.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_window.c 2010-10-21 22:45:54 UTC (rev 32641)
+++ trunk/blender/source/blender/windowmanager/intern/wm_window.c 2010-10-22 00:29:56 UTC (rev 32642)
@@ -63,6 +63,7 @@
#include "PIL_time.h"
#include "GPU_draw.h"
+#include "GPU_extensions.h"
/* the global to talk to ghost */
GHOST_SystemHandle g_system= NULL;
@@ -320,6 +321,8 @@
0 /* no AA */);
if (ghostwin) {
+ /* needed so we can detect the graphics card below */
+ GPU_extensions_init();
/* set the state*/
GHOST_SetWindowState(ghostwin, initial_state);
@@ -332,7 +335,11 @@
/* until screens get drawn, make it nice grey */
glClearColor(.55, .55, .55, 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
+ /* Crash on OSS ATI: bugs.launchpad.net/ubuntu/+source/mesa/+bug/656100 */
+ if(!GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE)) {
+ glClear(GL_COLOR_BUFFER_BIT);
+ }
+
wm_window_swap_buffers(win);
//GHOST_SetWindowState(ghostwin, GHOST_kWindowStateModified);
More information about the Bf-blender-cvs
mailing list