zink: invalidate blit dsts if fully covered

tiling perf++ since there's no need to load

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:59:11 -04:00
committed by Marge Bot
parent de1e67b39d
commit 79685199f4
+3
View File
@@ -347,6 +347,9 @@ zink_blit(struct pipe_context *pctx,
if (info->dst.resource->target == PIPE_BUFFER)
util_range_add(info->dst.resource, &dst->valid_buffer_range,
info->dst.box.x, info->dst.box.x + info->dst.box.width);
/* this will draw a full-resource quad, so ignore existing data */
if (util_blit_covers_whole_resource(info))
pctx->invalidate_resource(pctx, info->dst.resource);
zink_blit_begin(ctx, ZINK_BLIT_SAVE_FB | ZINK_BLIT_SAVE_FS | ZINK_BLIT_SAVE_TEXTURES);
if (stencil_blit) {