mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
zink: force GENERAL layout for all fb attachments with image binds
this is incredibly stupid, but KHR-GL46.texture_view.coherency does all kinds of rasterization discard draws with fb attachments bound as images, and there's no other sane way to catch it dynamically Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20891>
This commit is contained in:
parent
1b52e85ead
commit
23d3783f58
1 changed files with 9 additions and 2 deletions
|
|
@ -2693,8 +2693,15 @@ zink_prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, uns
|
|||
layout = zink_render_pass_attachment_get_barrier_info(&rt, i < ctx->fb_state.nr_cbufs, &pipeline, &access);
|
||||
}
|
||||
}
|
||||
if (!zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout &&
|
||||
layout == VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT)
|
||||
/*
|
||||
The image subresources for a storage image must be in the VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR or
|
||||
VK_IMAGE_LAYOUT_GENERAL layout in order to access its data in a shader.
|
||||
- 14.1.1. Storage Image
|
||||
*/
|
||||
if (res->image_bind_count[0])
|
||||
layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
else if (!zink_screen(ctx->base.screen)->info.have_EXT_attachment_feedback_loop_layout &&
|
||||
layout == VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT)
|
||||
layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
zink_screen(ctx->base.screen)->image_barrier(ctx, res, layout, access, pipeline);
|
||||
res->obj->unordered_read = res->obj->unordered_write = false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue