zink: hook up surface invalidation to LOAD_OP_DONT_CARE

this should improve perf for tilers

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16877>
This commit is contained in:
Mike Blumenkrantz
2022-06-03 13:57:30 -04:00
committed by Marge Bot
parent c7ad86b40f
commit de1e67b39d
2 changed files with 7 additions and 4 deletions

View File

@@ -353,7 +353,7 @@ zink_init_color_attachment(struct zink_context *ctx, unsigned i, struct zink_rt_
rt->format = surf->info.format[0];
rt->samples = MAX3(transient ? transient->base.nr_samples : 0, psurf->texture->nr_samples, 1);
rt->clear_color = zink_fb_clear_enabled(ctx, i) && !zink_fb_clear_first_needs_explicit(&ctx->fb_clears[i]);
rt->invalid = ctx->new_swapchain && (psurf->texture->bind & PIPE_BIND_DISPLAY_TARGET);
rt->invalid = !zink_resource(psurf->texture)->valid || (ctx->new_swapchain && (psurf->texture->bind & PIPE_BIND_DISPLAY_TARGET));
rt->fbfetch = (ctx->fbfetch_outputs & BITFIELD_BIT(i)) > 0;
} else {
memset(rt, 0, sizeof(struct zink_rt_attrib));