diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/texcompress.c | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c index c028daa46e4..bb94137a940 100644 --- a/src/mesa/main/texcompress.c +++ b/src/mesa/main/texcompress.c @@ -471,6 +471,63 @@ _mesa_glenum_to_compressed_format(GLenum format) case GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT: return MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT; + case GL_COMPRESSED_RGBA_ASTC_4x4_KHR: + return MESA_FORMAT_RGBA_ASTC_4x4; + case GL_COMPRESSED_RGBA_ASTC_5x4_KHR: + return MESA_FORMAT_RGBA_ASTC_5x4; + case GL_COMPRESSED_RGBA_ASTC_5x5_KHR: + return MESA_FORMAT_RGBA_ASTC_5x5; + case GL_COMPRESSED_RGBA_ASTC_6x5_KHR: + return MESA_FORMAT_RGBA_ASTC_6x5; + case GL_COMPRESSED_RGBA_ASTC_6x6_KHR: + return MESA_FORMAT_RGBA_ASTC_6x6; + case GL_COMPRESSED_RGBA_ASTC_8x5_KHR: + return MESA_FORMAT_RGBA_ASTC_8x5; + case GL_COMPRESSED_RGBA_ASTC_8x6_KHR: + return MESA_FORMAT_RGBA_ASTC_8x6; + case GL_COMPRESSED_RGBA_ASTC_8x8_KHR: + return MESA_FORMAT_RGBA_ASTC_8x8; + case GL_COMPRESSED_RGBA_ASTC_10x5_KHR: + return MESA_FORMAT_RGBA_ASTC_10x5; + case GL_COMPRESSED_RGBA_ASTC_10x6_KHR: + return MESA_FORMAT_RGBA_ASTC_10x6; + case GL_COMPRESSED_RGBA_ASTC_10x8_KHR: + return MESA_FORMAT_RGBA_ASTC_10x8; + case GL_COMPRESSED_RGBA_ASTC_10x10_KHR: + return MESA_FORMAT_RGBA_ASTC_10x10; + case GL_COMPRESSED_RGBA_ASTC_12x10_KHR: + return MESA_FORMAT_RGBA_ASTC_12x10; + case GL_COMPRESSED_RGBA_ASTC_12x12_KHR: + return MESA_FORMAT_RGBA_ASTC_12x12; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10; + case GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR: + return MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12; + default: return MESA_FORMAT_NONE; } @@ -561,6 +618,63 @@ _mesa_compressed_format_to_glenum(struct gl_context *ctx, mesa_format mesaFormat case MESA_FORMAT_BPTC_RGB_UNSIGNED_FLOAT: return GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT; + case MESA_FORMAT_RGBA_ASTC_4x4: + return GL_COMPRESSED_RGBA_ASTC_4x4_KHR; + case MESA_FORMAT_RGBA_ASTC_5x4: + return GL_COMPRESSED_RGBA_ASTC_5x4_KHR; + case MESA_FORMAT_RGBA_ASTC_5x5: + return GL_COMPRESSED_RGBA_ASTC_5x5_KHR; + case MESA_FORMAT_RGBA_ASTC_6x5: + return GL_COMPRESSED_RGBA_ASTC_6x5_KHR; + case MESA_FORMAT_RGBA_ASTC_6x6: + return GL_COMPRESSED_RGBA_ASTC_6x6_KHR; + case MESA_FORMAT_RGBA_ASTC_8x5: + return GL_COMPRESSED_RGBA_ASTC_8x5_KHR; + case MESA_FORMAT_RGBA_ASTC_8x6: + return GL_COMPRESSED_RGBA_ASTC_8x6_KHR; + case MESA_FORMAT_RGBA_ASTC_8x8: + return GL_COMPRESSED_RGBA_ASTC_8x8_KHR; + case MESA_FORMAT_RGBA_ASTC_10x5: + return GL_COMPRESSED_RGBA_ASTC_10x5_KHR; + case MESA_FORMAT_RGBA_ASTC_10x6: + return GL_COMPRESSED_RGBA_ASTC_10x6_KHR; + case MESA_FORMAT_RGBA_ASTC_10x8: + return GL_COMPRESSED_RGBA_ASTC_10x8_KHR; + case MESA_FORMAT_RGBA_ASTC_10x10: + return GL_COMPRESSED_RGBA_ASTC_10x10_KHR; + case MESA_FORMAT_RGBA_ASTC_12x10: + return GL_COMPRESSED_RGBA_ASTC_12x10_KHR; + case MESA_FORMAT_RGBA_ASTC_12x12: + return GL_COMPRESSED_RGBA_ASTC_12x12_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_4x4: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x4: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_5x5: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x5: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_6x6: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x5: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x6: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_8x8: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x5: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x6: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x8: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_10x10: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x10: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR; + case MESA_FORMAT_SRGB8_ALPHA8_ASTC_12x12: + return GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR; + default: _mesa_problem(ctx, "Unexpected mesa texture format in" " _mesa_compressed_format_to_glenum()"); |