mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
zink: add a swapchain readback case for reading differently-acquired image
if a swapchain is shared between multiple resources, a deadlock and/or invalid data will result from readback attempts if one resource holds a swapchain image that the other resource must read from to avoid this, allow accessing the acquiring resource directly since this is the only sane way to perform readback Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27553>
This commit is contained in:
parent
ae80f9ce65
commit
d5d5f54fe9
1 changed files with 5 additions and 0 deletions
|
|
@ -873,6 +873,11 @@ zink_kopper_acquire_readback(struct zink_context *ctx, struct zink_resource *res
|
|||
*readback = res;
|
||||
return false;
|
||||
}
|
||||
if (cswap->images[last_dt_idx].acquired) {
|
||||
struct zink_resource *rb = cswap->images[last_dt_idx].acquired;
|
||||
*readback = rb;
|
||||
return false;
|
||||
}
|
||||
if (cswap->images[last_dt_idx].readback) {
|
||||
struct zink_resource *rb = zink_resource(cswap->images[res->obj->last_dt_idx].readback);
|
||||
if (rb->valid) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue