From 89dd8d101b6efb6cceb2fe529554ce1a1a6ca9a3 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 11 Jul 2024 15:24:00 -0700 Subject: [PATCH] freedreno/a6xx: Skip blitter for L/A conversions The blitter cannot do the needed swizzle gymnastics for blitting to luminance and/or alpha formats. So fallback to the 3d path. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc index 183758bdc30..78e634e9877 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_blitter.cc @@ -217,6 +217,18 @@ can_do_blit(const struct pipe_blit_info *info) fail_if(info->window_rectangle_include); + /* The blitter can't handle the needed swizzle gymnastics to convert + * to/from L/A formats: + */ + if (info->src.format != info->dst.format) { + fail_if(util_format_is_luminance(info->dst.format)); + fail_if(util_format_is_alpha(info->dst.format)); + fail_if(util_format_is_luminance_alpha(info->dst.format)); + fail_if(util_format_is_luminance(info->src.format)); + fail_if(util_format_is_alpha(info->src.format)); + fail_if(util_format_is_luminance_alpha(info->src.format)); + } + const struct util_format_description *src_desc = util_format_description(info->src.format); const struct util_format_description *dst_desc =