mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
zink: add screen function for checking usage completion
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12008>
This commit is contained in:
parent
53c39f710f
commit
5bab4cc546
2 changed files with 14 additions and 0 deletions
|
|
@ -709,6 +709,17 @@ zink_batch_reference_image_view(struct zink_batch *batch,
|
|||
zink_batch_reference_surface(batch, image_view->surface);
|
||||
}
|
||||
|
||||
bool
|
||||
zink_screen_usage_check_completion(struct zink_screen *screen, const struct zink_batch_usage *u)
|
||||
{
|
||||
if (!zink_batch_usage_exists(u))
|
||||
return true;
|
||||
if (zink_batch_usage_is_unflushed(u))
|
||||
return false;
|
||||
|
||||
return zink_screen_batch_id_wait(screen, u->usage, 0);
|
||||
}
|
||||
|
||||
bool
|
||||
zink_batch_usage_check_completion(struct zink_context *ctx, const struct zink_batch_usage *u)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -222,6 +222,9 @@ zink_batch_usage_exists(const struct zink_batch_usage *u)
|
|||
return u && (u->usage || u->unflushed);
|
||||
}
|
||||
|
||||
bool
|
||||
zink_screen_usage_check_completion(struct zink_screen *screen, const struct zink_batch_usage *u);
|
||||
|
||||
bool
|
||||
zink_batch_usage_check_completion(struct zink_context *ctx, const struct zink_batch_usage *u);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue