[Mesa-dev] [PATCH 1/2] mesa/texformat: enable ASTC formats for TexStorage
Nanley Chery
nanleychery at gmail.com
Tue Jul 28 15:58:19 PDT 2015
From: Nanley Chery <nanley.g.chery at intel.com>
According to the spec, Tex*Storage* commands are supported if the GL
implementation has support for immutable textures.
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/mesa/main/texformat.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index f4d17e1..ab369bc 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -356,6 +356,62 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
return MESA_FORMAT_BPTC_RGB_SIGNED_FLOAT;
case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT:
return MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT;
+ case GL_COMPRESSED_RGBA_ASTC_4x4_KHR:
+ return MESA_FORMAT_ASTC_4x4_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_5x4_KHR:
+ return MESA_FORMAT_ASTC_5x4_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_5x5_KHR:
+ return MESA_FORMAT_ASTC_5x5_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_6x5_KHR:
+ return MESA_FORMAT_ASTC_6x5_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_6x6_KHR:
+ return MESA_FORMAT_ASTC_6x6_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_8x5_KHR:
+ return MESA_FORMAT_ASTC_8x5_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_8x6_KHR:
+ return MESA_FORMAT_ASTC_8x6_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_8x8_KHR:
+ return MESA_FORMAT_ASTC_8x8_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_10x5_KHR:
+ return MESA_FORMAT_ASTC_10x5_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_10x6_KHR:
+ return MESA_FORMAT_ASTC_10x6_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_10x8_KHR:
+ return MESA_FORMAT_ASTC_10x8_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_10x10_KHR:
+ return MESA_FORMAT_ASTC_10x10_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_12x10_KHR:
+ return MESA_FORMAT_ASTC_12x10_RGBA;
+ case GL_COMPRESSED_RGBA_ASTC_12x12_KHR:
+ return MESA_FORMAT_ASTC_12x12_RGBA;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:
+ return MESA_FORMAT_ASTC_4x4_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:
+ return MESA_FORMAT_ASTC_5x4_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:
+ return MESA_FORMAT_ASTC_5x5_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:
+ return MESA_FORMAT_ASTC_6x5_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:
+ return MESA_FORMAT_ASTC_6x6_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:
+ return MESA_FORMAT_ASTC_8x5_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:
+ return MESA_FORMAT_ASTC_8x6_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:
+ return MESA_FORMAT_ASTC_8x8_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:
+ return MESA_FORMAT_ASTC_10x5_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:
+ return MESA_FORMAT_ASTC_10x6_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:
+ return MESA_FORMAT_ASTC_10x8_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:
+ return MESA_FORMAT_ASTC_10x10_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:
+ return MESA_FORMAT_ASTC_12x10_SRGB8_ALPHA8;
+ case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:
+ return MESA_FORMAT_ASTC_12x12_SRGB8_ALPHA8;
case GL_ALPHA16F_ARB:
RETURN_IF_SUPPORTED(MESA_FORMAT_A_FLOAT16);
--
2.4.2
More information about the mesa-dev
mailing list