zink: add a condition to needs_write_s

Previously missing check on the stencil write, condition added to needs_write_s using util_writes_stencil

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20245>
This commit is contained in:
WebsterEndymion
2022-12-10 11:12:58 +00:00
committed by Marge Bot
parent 847d198c1f
commit 53c4ce495c

View File

@@ -366,7 +366,8 @@ zink_init_zs_attachment(struct zink_context *ctx, struct zink_rt_attrib *rt)
needs_write_z |= transient || rt->clear_color || needs_write_z |= transient || rt->clear_color ||
(zink_fb_clear_enabled(ctx, PIPE_MAX_COLOR_BUFS) && (zink_fb_clear_element(fb_clear, 0)->zs.bits & PIPE_CLEAR_DEPTH)); (zink_fb_clear_enabled(ctx, PIPE_MAX_COLOR_BUFS) && (zink_fb_clear_element(fb_clear, 0)->zs.bits & PIPE_CLEAR_DEPTH));
bool needs_write_s = rt->clear_stencil || (outputs_written & BITFIELD64_BIT(FRAG_RESULT_STENCIL)) || bool needs_write_s = (ctx->dsa_state && (util_writes_stencil(&ctx->dsa_state->base.stencil[0]) || util_writes_stencil(&ctx->dsa_state->base.stencil[1]))) ||
rt->clear_stencil || (outputs_written & BITFIELD64_BIT(FRAG_RESULT_STENCIL)) ||
(zink_fb_clear_enabled(ctx, PIPE_MAX_COLOR_BUFS) && (zink_fb_clear_element(fb_clear, 0)->zs.bits & PIPE_CLEAR_STENCIL)); (zink_fb_clear_enabled(ctx, PIPE_MAX_COLOR_BUFS) && (zink_fb_clear_element(fb_clear, 0)->zs.bits & PIPE_CLEAR_STENCIL));
rt->needs_write = needs_write_z | needs_write_s; rt->needs_write = needs_write_z | needs_write_s;
rt->invalid = !zsbuf->valid; rt->invalid = !zsbuf->valid;