zink: track whether the fb zsbuf is readonly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21988>
This commit is contained in:

committed by
Marge Bot

parent
1b9e9a54ab
commit
e2e079eef4
@@ -2934,6 +2934,8 @@ zink_prep_fb_attachment(struct zink_context *ctx, struct zink_surface *surf, uns
|
|||||||
layout = VK_IMAGE_LAYOUT_GENERAL;
|
layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||||
if (res->valid || res->layout != layout)
|
if (res->valid || res->layout != layout)
|
||||||
zink_screen(ctx->base.screen)->image_barrier(ctx, res, layout, access, pipeline);
|
zink_screen(ctx->base.screen)->image_barrier(ctx, res, layout, access, pipeline);
|
||||||
|
if (!(res->aspect & VK_IMAGE_ASPECT_COLOR_BIT))
|
||||||
|
ctx->zsbuf_readonly = res->layout == VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
|
||||||
res->obj->unordered_read = res->obj->unordered_write = false;
|
res->obj->unordered_read = res->obj->unordered_write = false;
|
||||||
if (i == ctx->fb_state.nr_cbufs && res->sampler_bind_count[0])
|
if (i == ctx->fb_state.nr_cbufs && res->sampler_bind_count[0])
|
||||||
update_res_sampler_layouts(ctx, res);
|
update_res_sampler_layouts(ctx, res);
|
||||||
|
@@ -1704,6 +1704,7 @@ struct zink_context {
|
|||||||
bool rp_changed; //force renderpass restart
|
bool rp_changed; //force renderpass restart
|
||||||
bool rp_layout_changed; //renderpass changed, maybe restart
|
bool rp_layout_changed; //renderpass changed, maybe restart
|
||||||
bool rp_loadop_changed; //renderpass changed, don't restart
|
bool rp_loadop_changed; //renderpass changed, don't restart
|
||||||
|
bool zsbuf_readonly;
|
||||||
|
|
||||||
struct zink_framebuffer *framebuffer;
|
struct zink_framebuffer *framebuffer;
|
||||||
struct zink_framebuffer_clear fb_clears[PIPE_MAX_COLOR_BUFS + 1];
|
struct zink_framebuffer_clear fb_clears[PIPE_MAX_COLOR_BUFS + 1];
|
||||||
|
Reference in New Issue
Block a user