summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_scene.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-01-12 17:06:19 -0700
committerBrian Paul <brianp@vmware.com>2010-01-12 17:06:19 -0700
commitde10168a462f57ead41800ea135476bb5ae8c678 (patch)
tree5a6b79d4629932e25cbdb6ece3e0edc2b89301f1 /src/gallium/drivers/llvmpipe/lp_scene.c
parent4061ca02dd837950201a9ada462f944ae25deeb5 (diff)
llvmpipe: added lp_scene_is_empty()
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_scene.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_scene.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_scene.c b/src/gallium/drivers/llvmpipe/lp_scene.c
index 774a1fecd7..70d5847d8e 100644
--- a/src/gallium/drivers/llvmpipe/lp_scene.c
+++ b/src/gallium/drivers/llvmpipe/lp_scene.c
@@ -67,6 +67,28 @@ lp_scene_init(struct lp_scene *scene)
/**
+ * Check if the scene's bins are all empty.
+ * For debugging purposes.
+ */
+boolean
+lp_scene_is_empty(struct lp_scene *scene )
+{
+ unsigned x, y;
+
+ for (y = 0; y < TILES_Y; y++) {
+ for (x = 0; x < TILES_X; x++) {
+ const struct cmd_bin *bin = lp_scene_get_bin(scene, x, y);
+ const struct cmd_block_list *list = &bin->commands;
+ if (list->head != list->tail || list->head->count > 0) {
+ return FALSE;
+ }
+ }
+ }
+ return TRUE;
+}
+
+
+/**
* Set scene to empty state.
*/
void