From e4283708f0dedd330f65f04ba421d7d25fb9444f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 7 May 2022 15:30:44 -0400 Subject: [PATCH] radeonsi: report 10_10_10_2 scaled formats as unsupported on gfx6-9 as well Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_state.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 8422029eadf..ea194349c86 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -1973,6 +1973,16 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen, enum pipe_for if (desc->is_mixed && desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS) goto out_unknown; + if (first_non_void < 0 || first_non_void > 3) + goto out_unknown; + + /* Reject SCALED formats because we don't implement them for CB and do the same for texturing. */ + if ((desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED || + desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_SIGNED) && + !desc->channel[first_non_void].normalized && + !desc->channel[first_non_void].pure_integer) + goto out_unknown; + /* See whether the components are of the same size. */ for (i = 1; i < desc->nr_channels; i++) { uniform = uniform && desc->channel[0].size == desc->channel[i].size; @@ -2005,16 +2015,6 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen, enum pipe_for goto out_unknown; } - if (first_non_void < 0 || first_non_void > 3) - goto out_unknown; - - /* Reject SCALED formats because we don't implement them for CB and do the same for texturing. */ - if ((desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_UNSIGNED || - desc->channel[first_non_void].type == UTIL_FORMAT_TYPE_SIGNED) && - !desc->channel[first_non_void].normalized && - !desc->channel[first_non_void].pure_integer) - goto out_unknown; - /* uniform formats */ switch (desc->channel[first_non_void].size) { case 4: