llvmpipe: added assertions to verify that scene is empty
authorBrian Paul <brianp@vmware.com>
Thu, 11 Feb 2010 01:10:16 +0000 (18:10 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 24 Feb 2010 01:57:18 +0000 (18:57 -0700)
src/gallium/drivers/llvmpipe/lp_rast.c
src/gallium/drivers/llvmpipe/lp_setup.c

index 6dbcb3c9b31a98652a5d2743f7febdb2c4c7c984..bbd63aec2b351699c953ddddef5736bd99d17135 100644 (file)
@@ -603,6 +603,9 @@ release_scene( struct lp_rasterizer *rast,
    util_unreference_framebuffer_state( &scene->fb );
 
    lp_scene_reset( scene );
+
+   assert(lp_scene_is_empty(scene));
+
    lp_scene_enqueue( rast->empty_scenes, scene );
    rast->curr_scene = NULL;
 }
index cb873667a20a88fb0ae8a40c23764481f4a3dc03..3aec9de3732069ad9ad92610057de2a5d16034a0 100644 (file)
@@ -64,6 +64,8 @@ lp_setup_get_current_scene(struct setup_context *setup)
        */
       setup->scene = lp_scene_dequeue(setup->empty_scenes, TRUE);
 
+      assert(lp_scene_is_empty(setup->scene));
+
       if(0)lp_scene_reset( setup->scene ); /* XXX temporary? */
 
       lp_scene_set_framebuffer_size(setup->scene,