mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 10:40:36 +01:00
zink/kopper: add a mechanism for checking swapchain status
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16038>
This commit is contained in:
parent
0d4b79d111
commit
c9f29c22b8
2 changed files with 13 additions and 1 deletions
|
|
@ -773,3 +773,14 @@ zink_kopper_fixup_depth_buffer(struct zink_context *ctx)
|
|||
zink_surface_reference(screen, &csurf->surf, cz->surf);
|
||||
pipe_surface_release(&ctx->base, &psurf);
|
||||
}
|
||||
|
||||
bool
|
||||
zink_kopper_check(struct pipe_resource *pres)
|
||||
{
|
||||
struct zink_resource *res = zink_resource(pres);
|
||||
assert(pres->bind & PIPE_BIND_DISPLAY_TARGET);
|
||||
if (!res->obj->dt)
|
||||
return false;
|
||||
struct kopper_displaytarget *cdt = kopper_displaytarget(res->obj->dt);
|
||||
return !cdt->is_kill;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -114,5 +114,6 @@ bool
|
|||
zink_kopper_update(struct pipe_screen *pscreen, struct pipe_resource *pres, int *w, int *h);
|
||||
void
|
||||
zink_kopper_fixup_depth_buffer(struct zink_context *ctx);
|
||||
|
||||
bool
|
||||
zink_kopper_check(struct pipe_resource *pres);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue