i965g: remove surface from views list before freeing
authorDave Airlie <airlied@linux.ie>
Sun, 29 Nov 2009 08:59:19 +0000 (18:59 +1000)
committerDave Airlie <airlied@linux.ie>
Sun, 29 Nov 2009 08:59:19 +0000 (18:59 +1000)
this fixes a crash with the xorg state tracker, however it then locks
up the GPU once rendering is enabled but at least it doesn't crash.

Signed-off-by: Dave Airlie <airlied@linux.ie>
src/gallium/drivers/i965/brw_screen_surface.c

index 21a7382873ffce617e7614984c1a86d5965e2d44..1e37c63d6c95e3caa7a057a09ecaaee722e53668 100644 (file)
@@ -245,6 +245,7 @@ static void brw_tex_surface_destroy( struct pipe_surface *surf )
 
    /* Unreference texture, shared buffer:
     */
+   remove_from_list(surface);
    bo_reference(&surface->bo, NULL);
    pipe_texture_reference( &surface->base.texture, NULL );