From 65c7b5ec20aac008b273d014149defd907ffacfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 24 Apr 2022 22:18:20 -0400 Subject: [PATCH] ac: support GR channel order in ac_choose_spi_color_formats Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/amd/common/ac_shader_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/common/ac_shader_util.c b/src/amd/common/ac_shader_util.c index 224c54cde35..8ee933e9a05 100644 --- a/src/amd/common/ac_shader_util.c +++ b/src/amd/common/ac_shader_util.c @@ -392,7 +392,7 @@ void ac_choose_spi_color_formats(unsigned format, unsigned swap, unsigned ntype, else assert(0); } else if (format == V_028C70_COLOR_16_16) { - if (swap == V_028C70_SWAP_STD) { /* RG */ + if (swap == V_028C70_SWAP_STD || swap == V_028C70_SWAP_STD_REV) { /* RG or GR */ blend = V_028714_SPI_SHADER_32_GR; blend_alpha = V_028714_SPI_SHADER_32_ABGR; } else if (swap == V_028C70_SWAP_ALT) /* RA */ @@ -422,7 +422,7 @@ void ac_choose_spi_color_formats(unsigned format, unsigned swap, unsigned ntype, break; case V_028C70_COLOR_32_32: - if (swap == V_028C70_SWAP_STD) { /* RG */ + if (swap == V_028C70_SWAP_STD || swap == V_028C70_SWAP_STD_REV) { /* RG or GR */ blend = normal = V_028714_SPI_SHADER_32_GR; alpha = blend_alpha = V_028714_SPI_SHADER_32_ABGR; } else if (swap == V_028C70_SWAP_ALT) /* RA */