Mesa (master): zink: try copy_region hook for blits where we can't do a regular blit or resolve
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 14 13:10:42 UTC 2020
Module: Mesa
Branch: master
Commit: ab78831baa6329ad1b43dfd0203e6be508e4194d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab78831baa6329ad1b43dfd0203e6be508e4194d
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Sun Jun 14 00:03:31 2020 -0400
zink: try copy_region hook for blits where we can't do a regular blit or resolve
in cases where the formats match, we can likely just pass this through for now
fixes a ton of spec@!opengl 1.1 at depthstencil-default_fb-blit piglit tests
Reviewed-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5888>
---
src/gallium/drivers/zink/zink_blit.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/gallium/drivers/zink/zink_blit.c b/src/gallium/drivers/zink/zink_blit.c
index 74e1024b616..6dd3caaece1 100644
--- a/src/gallium/drivers/zink/zink_blit.c
+++ b/src/gallium/drivers/zink/zink_blit.c
@@ -4,6 +4,7 @@
#include "zink_screen.h"
#include "util/u_blitter.h"
+#include "util/u_surface.h"
#include "util/format/u_format.h"
static bool
@@ -182,6 +183,12 @@ zink_blit(struct pipe_context *pctx,
return;
}
+ struct zink_resource *src = zink_resource(info->src.resource);
+ struct zink_resource *dst = zink_resource(info->dst.resource);
+ /* if we're copying between resources with matching aspects then we can probably just copy_region */
+ if (src->aspect == dst->aspect && util_try_blit_via_copy_region(pctx, info))
+ return;
+
if (!util_blitter_is_blit_supported(ctx->blitter, info)) {
debug_printf("blit unsupported %s -> %s\n",
util_format_short_name(info->src.resource->format),
More information about the mesa-commit
mailing list