mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
zink: explicitly disable reordering after restricted swapchain readback blits
when needs_present_readback is set, reordering is disabled without hitting
the path that would normally disable promotion for the resource, so this
needs to be changed manually to avoid layout desync on the swapchain
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23035>
(cherry picked from commit 3c010319bb)
This commit is contained in:
parent
66ed3b4f0c
commit
c60508ba3b
3 changed files with 14 additions and 3 deletions
|
|
@ -427,7 +427,7 @@
|
|||
"description": "zink: explicitly disable reordering after restricted swapchain readback blits",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -452,8 +452,11 @@ zink_blit(struct pipe_context *pctx,
|
|||
}
|
||||
ctx->unordered_blitting = false;
|
||||
end:
|
||||
if (needs_present_readback)
|
||||
if (needs_present_readback) {
|
||||
src->obj->unordered_read = false;
|
||||
dst->obj->unordered_write = false;
|
||||
zink_kopper_present_readback(ctx, src);
|
||||
}
|
||||
}
|
||||
|
||||
/* similar to radeonsi */
|
||||
|
|
|
|||
|
|
@ -4410,8 +4410,16 @@ zink_copy_image_buffer(struct zink_context *ctx, struct zink_resource *dst, stru
|
|||
}
|
||||
zink_cmd_debug_marker_end(ctx, cmdbuf, marker);
|
||||
}
|
||||
if (needs_present_readback)
|
||||
if (needs_present_readback) {
|
||||
if (buf2img) {
|
||||
img->obj->unordered_write = false;
|
||||
buf->obj->unordered_read = false;
|
||||
} else {
|
||||
img->obj->unordered_read = false;
|
||||
buf->obj->unordered_write = false;
|
||||
}
|
||||
zink_kopper_present_readback(ctx, img);
|
||||
}
|
||||
|
||||
if (ctx->oom_flush && !ctx->batch.in_rp && !ctx->unordered_blitting)
|
||||
flush_batch(ctx, false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue