From 049b4c340575ebc788d9a009829980fafa587eff Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 10 Feb 2010 18:10:16 -0700 Subject: [PATCH] llvmpipe: added assertions to verify that scene is empty --- src/gallium/drivers/llvmpipe/lp_rast.c | 3 +++ src/gallium/drivers/llvmpipe/lp_setup.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c index 6dbcb3c9b31..bbd63aec2b3 100644 --- a/src/gallium/drivers/llvmpipe/lp_rast.c +++ b/src/gallium/drivers/llvmpipe/lp_rast.c @@ -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; } diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index cb873667a20..3aec9de3732 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -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, -- 2.30.2