summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-11-01 10:38:13 +0100
committerErik Faye-Lund <[email protected]>2019-11-06 11:37:36 +0000
commitdd4587b55cdfb09d5e0ebf6b7e7216b46ae10c3e (patch)
tree43216e5bc120b9fed14fc6251a3411029485726e /src/gallium
parent7b9d17fe8410aff373a15145b7279ec3f0f65f81 (diff)
zink: use u_blitter when format-reinterpreting
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/zink/zink_context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c
index 1fd6a3da5a7..30d19c6ffa2 100644
--- a/src/gallium/drivers/zink/zink_context.c
+++ b/src/gallium/drivers/zink/zink_context.c
@@ -1268,6 +1268,11 @@ blit_resolve(struct zink_context *ctx, const struct pipe_blit_info *info)
struct zink_resource *src = zink_resource(info->src.resource);
struct zink_resource *dst = zink_resource(info->dst.resource);
+ struct zink_screen *screen = zink_screen(ctx->base.screen);
+ if (src->format != zink_get_format(screen, info->src.format) ||
+ dst->format != zink_get_format(screen, info->dst.format))
+ return false;
+
struct zink_batch *batch = zink_batch_no_rp(ctx);
zink_batch_reference_resoure(batch, src);
@@ -1325,6 +1330,11 @@ blit_native(struct zink_context *ctx, const struct pipe_blit_info *info)
struct zink_resource *src = zink_resource(info->src.resource);
struct zink_resource *dst = zink_resource(info->dst.resource);
+ struct zink_screen *screen = zink_screen(ctx->base.screen);
+ if (src->format != zink_get_format(screen, info->src.format) ||
+ dst->format != zink_get_format(screen, info->dst.format))
+ return false;
+
struct zink_batch *batch = zink_batch_no_rp(ctx);
zink_batch_reference_resoure(batch, src);
zink_batch_reference_resoure(batch, dst);