mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
llvmpipe: added lp_scene_is_empty()
This commit is contained in:
parent
4061ca02dd
commit
de10168a46
2 changed files with 24 additions and 0 deletions
|
|
@ -66,6 +66,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.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -133,6 +133,8 @@ void lp_scene_destroy(struct lp_scene *scene);
|
|||
|
||||
void lp_scene_init(struct lp_scene *scene);
|
||||
|
||||
boolean lp_scene_is_empty(struct lp_scene *scene );
|
||||
|
||||
void lp_scene_reset(struct lp_scene *scene );
|
||||
|
||||
void lp_scene_free_bin_data(struct lp_scene *scene);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue