mesa/st: Add mapping of MESA_FORMAT_RGB_SNORM16 to gallium.
authorEric Anholt <eric@anholt.net>
Fri, 6 Sep 2019 23:30:26 +0000 (16:30 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 7 Nov 2019 19:43:41 +0000 (19:43 +0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_format.c

index 9ade30de70bb909d17efc54d9a31f64ad71e8d66..cdfeac25df13053aa84acaf39dc866c9d3277d29 100644 (file)
@@ -384,6 +384,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st,
       return PIPE_FORMAT_R16_SNORM;
    case MESA_FORMAT_RG_SNORM16:
       return PIPE_FORMAT_R16G16_SNORM;
+   case MESA_FORMAT_RGB_SNORM16:
+      return PIPE_FORMAT_R16G16B16_SNORM;
    case MESA_FORMAT_RGBA_SNORM16:
       return PIPE_FORMAT_R16G16B16A16_SNORM;
 
@@ -969,6 +971,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
       return MESA_FORMAT_R_SNORM16;
    case PIPE_FORMAT_R16G16_SNORM:
       return MESA_FORMAT_RG_SNORM16;
+   case PIPE_FORMAT_R16G16B16_SNORM:
+      return MESA_FORMAT_RGB_SNORM16;
    case PIPE_FORMAT_R16G16B16A16_SNORM:
       return MESA_FORMAT_RGBA_SNORM16;