From 1b924bad5e98329efc27cfb47c26931fbc73720e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 28 Mar 2024 20:20:14 -0400 Subject: [PATCH] radeonsi: reject unsupported parameters as the first thing in the compute blit Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_compute_blit.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index edda359d49b..7a059e23b58 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -1050,6 +1050,15 @@ bool si_compute_blit(struct si_context *sctx, const struct pipe_blit_info *info, unsigned max_dst_chan_size = util_format_get_max_channel_size(info->dst.format); unsigned max_src_chan_size = util_format_get_max_channel_size(info->src.format); + if (info->alpha_blend || + info->num_window_rectangles || + info->scissor_enable || + /* No scaling. */ + info->dst.box.width != abs(info->src.box.width) || + info->dst.box.height != abs(info->src.box.height) || + info->dst.box.depth != abs(info->src.box.depth)) + return false; + /* Testing on Navi21 showed that the compute blit is slightly slower than the gfx blit. * The compute blit is even slower with DCC stores. VP13 CATIA_plane_pencil is a good test * for that because it's mostly just blits. @@ -1067,15 +1076,6 @@ bool si_compute_blit(struct si_context *sctx, const struct pipe_blit_info *info, info->src.level))) return false; - if (info->alpha_blend || - info->num_window_rectangles || - info->scissor_enable || - /* No scaling. */ - info->dst.box.width != abs(info->src.box.width) || - info->dst.box.height != abs(info->src.box.height) || - info->dst.box.depth != abs(info->src.box.depth)) - return false; - assert(info->src.box.depth >= 0); /* Shader images. */