u_format: add ETC2 to util_format_srgb/util_format_linear
authorJonathan Marek <jonathan@marek.ca>
Sun, 4 Aug 2019 21:17:13 +0000 (17:17 -0400)
committerJonathan Marek <jonathan@marek.ca>
Thu, 12 Sep 2019 02:39:07 +0000 (22:39 -0400)
Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/auxiliary/util/u_format.h

index 34fc0d15d9cd4dc6f410ec503c044860e6bf0952..7b0e3ee1bc48b81af013974d36dbd48325815d02 100644 (file)
@@ -996,6 +996,12 @@ util_format_srgb(enum pipe_format format)
       return PIPE_FORMAT_B5G6R5_SRGB;
    case PIPE_FORMAT_BPTC_RGBA_UNORM:
       return PIPE_FORMAT_BPTC_SRGBA;
+   case PIPE_FORMAT_ETC2_RGB8:
+      return PIPE_FORMAT_ETC2_SRGB8;
+   case PIPE_FORMAT_ETC2_RGB8A1:
+      return PIPE_FORMAT_ETC2_SRGB8A1;
+   case PIPE_FORMAT_ETC2_RGBA8:
+      return PIPE_FORMAT_ETC2_SRGBA8;
    case PIPE_FORMAT_ASTC_4x4:
       return PIPE_FORMAT_ASTC_4x4_SRGB;
    case PIPE_FORMAT_ASTC_5x4:
@@ -1074,6 +1080,12 @@ util_format_linear(enum pipe_format format)
       return PIPE_FORMAT_B5G6R5_UNORM;
    case PIPE_FORMAT_BPTC_SRGBA:
       return PIPE_FORMAT_BPTC_RGBA_UNORM;
+   case PIPE_FORMAT_ETC2_SRGB8:
+      return PIPE_FORMAT_ETC2_RGB8;
+   case PIPE_FORMAT_ETC2_SRGB8A1:
+      return PIPE_FORMAT_ETC2_RGB8A1;
+   case PIPE_FORMAT_ETC2_SRGBA8:
+      return PIPE_FORMAT_ETC2_RGBA8;
    case PIPE_FORMAT_ASTC_4x4_SRGB:
       return PIPE_FORMAT_ASTC_4x4;
    case PIPE_FORMAT_ASTC_5x4_SRGB: