mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-28 04:34:25 +08:00
zink: improve no-oping of write -> readonly zsbuf layouts
if descriptor binds exist this will have to change layouts anyway, so allow readonly since it might be a more compatible layout Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
This commit is contained in:
parent
93d7bde9dc
commit
d6e40b7d54
@ -2918,7 +2918,9 @@ zink_prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, uns
|
||||
zink_init_zs_attachment(ctx, &rt);
|
||||
layout = zink_render_pass_attachment_get_barrier_info(&rt, i < ctx->fb_state.nr_cbufs, &pipeline, &access);
|
||||
/* avoid unnecessary read-only layout change */
|
||||
if (layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL && res->layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL)
|
||||
if (layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL &&
|
||||
res->layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL &&
|
||||
!res->bind_count[0])
|
||||
layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user