summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/formats.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-06-28 15:10:34 -0700
committerJason Ekstrand <[email protected]>2017-07-12 21:15:46 -0700
commit361eb1c6e765c393cb0b398124772b60a24ac36c (patch)
tree68169554d3ff932aff4c817a73fd0c151f54f86c /src/mesa/main/formats.c
parent34e1ccbfbe851ecf4ebbfc86d70da384d176d994 (diff)
main/formats: Autogenerate _mesa_get_srgb_format_linear
Due to the wonders of autogeneration, this new version covers a few formats that the old version was missing: MESA_FORMAT_SRGB8_ALPHA8_ASTC_3x3x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x3x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x3 MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x4 MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x5 MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6x6 Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/main/formats.c')
-rw-r--r--src/mesa/main/formats.c117
1 files changed, 0 insertions, 117 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c
index 9d9830f8bf4..5c29d37bb44 100644
--- a/src/mesa/main/formats.c
+++ b/src/mesa/main/formats.c
@@ -622,123 +622,6 @@ _mesa_is_format_etc2(mesa_format format)
/**
- * For an sRGB format, return the corresponding linear color space format.
- * For non-sRGB formats, return the format as-is.
- */
-mesa_format
-_mesa_get_srgb_format_linear(mesa_format format)
-{
- switch (format) {
- case MESA_FORMAT_BGR_SRGB8:
- format = MESA_FORMAT_BGR_UNORM8;
- break;
- case MESA_FORMAT_A8B8G8R8_SRGB:
- format = MESA_FORMAT_A8B8G8R8_UNORM;
- break;
- case MESA_FORMAT_B8G8R8A8_SRGB:
- format = MESA_FORMAT_B8G8R8A8_UNORM;
- break;
- case MESA_FORMAT_A8R8G8B8_SRGB:
- format = MESA_FORMAT_A8R8G8B8_UNORM;
- break;
- case MESA_FORMAT_R8G8B8A8_SRGB:
- format = MESA_FORMAT_R8G8B8A8_UNORM;
- break;
- case MESA_FORMAT_L_SRGB8:
- format = MESA_FORMAT_L_UNORM8;
- break;
- case MESA_FORMAT_L8A8_SRGB:
- format = MESA_FORMAT_L8A8_UNORM;
- break;
- case MESA_FORMAT_A8L8_SRGB:
- format = MESA_FORMAT_A8L8_UNORM;
- break;
- case MESA_FORMAT_SRGB_DXT1:
- format = MESA_FORMAT_RGB_DXT1;
- break;
- case MESA_FORMAT_SRGBA_DXT1:
- format = MESA_FORMAT_RGBA_DXT1;
- break;
- case MESA_FORMAT_SRGBA_DXT3:
- format = MESA_FORMAT_RGBA_DXT3;
- break;
- case MESA_FORMAT_SRGBA_DXT5:
- format = MESA_FORMAT_RGBA_DXT5;
- break;
- case MESA_FORMAT_R8G8B8X8_SRGB:
- format = MESA_FORMAT_R8G8B8X8_UNORM;
- break;
- case MESA_FORMAT_X8B8G8R8_SRGB:
- format = MESA_FORMAT_X8B8G8R8_UNORM;
- break;
- case MESA_FORMAT_ETC2_SRGB8:
- format = MESA_FORMAT_ETC2_RGB8;
- break;
- case MESA_FORMAT_ETC2_SRGB8_ALPHA8_EAC:
- format = MESA_FORMAT_ETC2_RGBA8_EAC;
- break;
- case MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1:
- format = MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1;
- break;
- case MESA_FORMAT_BPTC_SRGB_ALPHA_UNORM:
- format = MESA_FORMAT_BPTC_RGBA_UNORM;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4:
- format = MESA_FORMAT_RGBA_ASTC_4x4;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4:
- format = MESA_FORMAT_RGBA_ASTC_5x4;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5:
- format = MESA_FORMAT_RGBA_ASTC_5x5;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5:
- format = MESA_FORMAT_RGBA_ASTC_6x5;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6:
- format = MESA_FORMAT_RGBA_ASTC_6x6;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5:
- format = MESA_FORMAT_RGBA_ASTC_8x5;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6:
- format = MESA_FORMAT_RGBA_ASTC_8x6;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8:
- format = MESA_FORMAT_RGBA_ASTC_8x8;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5:
- format = MESA_FORMAT_RGBA_ASTC_10x5;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6:
- format = MESA_FORMAT_RGBA_ASTC_10x6;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8:
- format = MESA_FORMAT_RGBA_ASTC_10x8;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10:
- format = MESA_FORMAT_RGBA_ASTC_10x10;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10:
- format = MESA_FORMAT_RGBA_ASTC_12x10;
- break;
- case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12:
- format = MESA_FORMAT_RGBA_ASTC_12x12;
- break;
- case MESA_FORMAT_B8G8R8X8_SRGB:
- format = MESA_FORMAT_B8G8R8X8_UNORM;
- break;
- case MESA_FORMAT_X8R8G8B8_SRGB:
- format = MESA_FORMAT_X8R8G8B8_UNORM;
- break;
- default:
- break;
- }
- return format;
-}
-
-
-/**
* If the given format is a compressed format, return a corresponding
* uncompressed format.
*/