[Mesa-dev] [PATCH 3/3] radeonsi: add support for PIPE_FORMAT_A1R5G5B5_UNORM

Marek Olšák maraeo at gmail.com
Sat Oct 7 00:18:28 UTC 2017


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Instead of patches 1-2, I prefer Eric's version which also adds
X1B5G5R5. You have my Rb for any leftover bits not present in Eric's
patch.

Marek



On Fri, Oct 6, 2017 at 10:41 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> Fixes dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8
> ---
>  src/gallium/drivers/radeonsi/si_state.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
> index 99c3ca36886..a86a3a83217 100644
> --- a/src/gallium/drivers/radeonsi/si_state.c
> +++ b/src/gallium/drivers/radeonsi/si_state.c
> @@ -1499,20 +1499,22 @@ static uint32_t si_translate_colorformat(enum pipe_format format)
>                                 return V_028C70_COLOR_4_4_4_4;
>                         case 8:
>                                 return V_028C70_COLOR_8_8_8_8;
>                         case 16:
>                                 return V_028C70_COLOR_16_16_16_16;
>                         case 32:
>                                 return V_028C70_COLOR_32_32_32_32;
>                         }
>                 } else if (HAS_SIZE(5,5,5,1)) {
>                         return V_028C70_COLOR_1_5_5_5;
> +               } else if (HAS_SIZE(1,5,5,5)) {
> +                       return V_028C70_COLOR_5_5_5_1;
>                 } else if (HAS_SIZE(10,10,10,2)) {
>                         return V_028C70_COLOR_2_10_10_10;
>                 }
>                 break;
>         }
>         return V_028C70_COLOR_INVALID;
>  }
>
>  static uint32_t si_colorformat_endian_swap(uint32_t colorformat)
>  {
> @@ -1757,20 +1759,26 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen,
>                                 return V_008F14_IMG_DATA_FORMAT_5_6_5;
>                         }
>                         goto out_unknown;
>                 case 4:
>                         if (desc->channel[0].size == 5 &&
>                             desc->channel[1].size == 5 &&
>                             desc->channel[2].size == 5 &&
>                             desc->channel[3].size == 1) {
>                                 return V_008F14_IMG_DATA_FORMAT_1_5_5_5;
>                         }
> +                       if (desc->channel[0].size == 1 &&
> +                           desc->channel[1].size == 5 &&
> +                           desc->channel[2].size == 5 &&
> +                           desc->channel[3].size == 5) {
> +                               return V_008F14_IMG_DATA_FORMAT_5_5_5_1;
> +                       }
>                         if (desc->channel[0].size == 10 &&
>                             desc->channel[1].size == 10 &&
>                             desc->channel[2].size == 10 &&
>                             desc->channel[3].size == 2) {
>                                 return V_008F14_IMG_DATA_FORMAT_2_10_10_10;
>                         }
>                         goto out_unknown;
>                 }
>                 goto out_unknown;
>         }
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list