zink: update samplerview layouts for zs attachments during renderpass prep
this interaction might require layout changes Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15716>
This commit is contained in:
parent
c132a28745
commit
fb2a08bb01
|
@ -2107,6 +2107,16 @@ prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, unsigned
|
|||
VkImageLayout layout = zink_render_pass_attachment_get_barrier_info(ctx->gfx_pipeline_state.render_pass,
|
||||
i, &pipeline, &access);
|
||||
zink_resource_image_barrier(ctx, res, layout, access, pipeline);
|
||||
if (i == ctx->fb_state.nr_cbufs && res->bind_count[0] && res->bind_count[0] != res->image_bind_count[0]) {
|
||||
unsigned find = res->bind_count[0] - res->image_bind_count[0];
|
||||
for (unsigned i = 0; i < PIPE_SHADER_COMPUTE; i++) {
|
||||
u_foreach_bit(slot, res->sampler_binds[i]) {
|
||||
update_descriptor_state_sampler(ctx, i, slot, res);
|
||||
find--;
|
||||
if (!find) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return surf->image_view;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue