zink: skip msrtss replicate if the attachment will be full-cleared

this should be unnecessary and avoids a perf hit

(cherry picked from commit 8ea506e94b)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22598>
This commit is contained in:
Mike Blumenkrantz 2023-03-28 09:46:16 -04:00 committed by Eric Engestrom
parent aac9dd69da
commit 839320beaa
2 changed files with 6 additions and 1 deletions

View file

@ -121,7 +121,7 @@
"description": "zink: skip msrtss replicate if the attachment will be full-cleared",
"nominated": false,
"nomination_type": null,
"resolution": 4,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -774,6 +774,11 @@ zink_begin_render_pass(struct zink_context *ctx)
u_foreach_bit(i, ctx->framebuffer->rp->state.msaa_expand_mask) {
struct zink_ctx_surface *csurf = (struct zink_ctx_surface*)ctx->fb_state.cbufs[i];
/* skip replicate blit if the image will be full-cleared */
if ((i == PIPE_MAX_COLOR_BUFS && (ctx->rp_clears_enabled & PIPE_CLEAR_DEPTHSTENCIL)) ||
(ctx->rp_clears_enabled >> 2) & BITFIELD_BIT(i)) {
csurf->transient_init |= zink_fb_clear_full_exists(ctx, i);
}
if (csurf->transient_init)
continue;
struct pipe_surface *dst_view = (struct pipe_surface*)csurf->transient;