util/format: add PIPE_FORMAT_ASTC_*x*x*_SRGB to util_format_{srgb,linear}()
authorEric Engestrom <eric.engestrom@intel.com>
Thu, 7 Nov 2019 18:08:09 +0000 (18:08 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Fri, 27 Dec 2019 21:04:43 +0000 (21:04 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/util/format/u_format.h

index 09a00e761c6c6e0d312a5e2dae87be94f3cb2026..a0eac087bf52be39208c97107a68d2dccb44d37d 100644 (file)
@@ -1038,6 +1038,26 @@ util_format_srgb(enum pipe_format format)
       return PIPE_FORMAT_ASTC_12x10_SRGB;
    case PIPE_FORMAT_ASTC_12x12:
       return PIPE_FORMAT_ASTC_12x12_SRGB;
+   case PIPE_FORMAT_ASTC_3x3x3:
+      return PIPE_FORMAT_ASTC_3x3x3_SRGB;
+   case PIPE_FORMAT_ASTC_4x3x3:
+      return PIPE_FORMAT_ASTC_4x3x3_SRGB;
+   case PIPE_FORMAT_ASTC_4x4x3:
+      return PIPE_FORMAT_ASTC_4x4x3_SRGB;
+   case PIPE_FORMAT_ASTC_4x4x4:
+      return PIPE_FORMAT_ASTC_4x4x4_SRGB;
+   case PIPE_FORMAT_ASTC_5x4x4:
+      return PIPE_FORMAT_ASTC_5x4x4_SRGB;
+   case PIPE_FORMAT_ASTC_5x5x4:
+      return PIPE_FORMAT_ASTC_5x5x4_SRGB;
+   case PIPE_FORMAT_ASTC_5x5x5:
+      return PIPE_FORMAT_ASTC_5x5x5_SRGB;
+   case PIPE_FORMAT_ASTC_6x5x5:
+      return PIPE_FORMAT_ASTC_6x5x5_SRGB;
+   case PIPE_FORMAT_ASTC_6x6x5:
+      return PIPE_FORMAT_ASTC_6x6x5_SRGB;
+   case PIPE_FORMAT_ASTC_6x6x6:
+      return PIPE_FORMAT_ASTC_6x6x6_SRGB;
 
    default:
       return PIPE_FORMAT_NONE;
@@ -1126,6 +1146,26 @@ util_format_linear(enum pipe_format format)
       return PIPE_FORMAT_ASTC_12x10;
    case PIPE_FORMAT_ASTC_12x12_SRGB:
       return PIPE_FORMAT_ASTC_12x12;
+   case PIPE_FORMAT_ASTC_3x3x3_SRGB:
+      return PIPE_FORMAT_ASTC_3x3x3;
+   case PIPE_FORMAT_ASTC_4x3x3_SRGB:
+      return PIPE_FORMAT_ASTC_4x3x3;
+   case PIPE_FORMAT_ASTC_4x4x3_SRGB:
+      return PIPE_FORMAT_ASTC_4x4x3;
+   case PIPE_FORMAT_ASTC_4x4x4_SRGB:
+      return PIPE_FORMAT_ASTC_4x4x4;
+   case PIPE_FORMAT_ASTC_5x4x4_SRGB:
+      return PIPE_FORMAT_ASTC_5x4x4;
+   case PIPE_FORMAT_ASTC_5x5x4_SRGB:
+      return PIPE_FORMAT_ASTC_5x5x4;
+   case PIPE_FORMAT_ASTC_5x5x5_SRGB:
+      return PIPE_FORMAT_ASTC_5x5x5;
+   case PIPE_FORMAT_ASTC_6x5x5_SRGB:
+      return PIPE_FORMAT_ASTC_6x5x5;
+   case PIPE_FORMAT_ASTC_6x6x5_SRGB:
+      return PIPE_FORMAT_ASTC_6x6x5;
+   case PIPE_FORMAT_ASTC_6x6x6_SRGB:
+      return PIPE_FORMAT_ASTC_6x6x6;
    default:
       return format;
    }