diff --git a/doc/changelog.dox b/doc/changelog.dox index cde469879..e540886ae 100644 --- a/doc/changelog.dox +++ b/doc/changelog.dox @@ -50,9 +50,9 @@ See also: - New @ref BasicMutableImageView "MutableImageView*D" and @ref BasicMutableCompressedImageView "MutableCompressedImageView*D" types for mutable views onto image data -- Added sRGB BC1-3, BC4, BC5, BC6G, BC7, ETC2, EAC, ASTC and PVRTC formats to - @ref CompressedPixelFormat as well as their conversion to corresponding - GL/Vulkan formats in @ref GL::compressedPixelFormat() and +- Added sRGB BC1-3, BC4, BC5, BC6h, BC7, ETC2, EAC, 2D/3D ASTC and PVRTC + formats to @ref CompressedPixelFormat as well as their conversion to + corresponding GL/Vulkan formats in @ref GL::compressedPixelFormat() and @ref Vk::vkFormat(Magnum::CompressedPixelFormat) - New @ref PixelFormat::R8Srgb, @ref PixelFormat::RG8Srgb, @ref PixelFormat::RGB8Srgb and @ref PixelFormat::RGBA8Srgb sRGB pixel @@ -111,6 +111,8 @@ See also: complementing the desktop support for BC4, BC5, BC6H and BC7 formats - @webgl_extension{WEBGL,texture_compression_astc} WebGL extension, complementing the desktop and ES support for ASTC + - @gl_extension{OES,texture_compression_astc} OpenGL ES extension, adding + 3D ASTC compression (unfortunately there's no desktop equivalent yet) - PVRTC formats defined by the @gl_extension{IMG,texture_compression_pvrtc} / @gl_extension{IMG,pvrtc_sRGB} OpenGL ES and @webgl_extension{WEBGL,compressed_texture_pvrtc} WebGL extensions diff --git a/src/Magnum/GL/Context.cpp b/src/Magnum/GL/Context.cpp index 8919c0cc2..35ea111c9 100644 --- a/src/Magnum/GL/Context.cpp +++ b/src/Magnum/GL/Context.cpp @@ -335,7 +335,11 @@ constexpr Extension ExtensionList[]{ _extension(OES,mapbuffer), _extension(OES,stencil1), _extension(OES,stencil4), - _extension(OES,texture_float_linear)}; + _extension(OES,texture_float_linear), + #ifndef MAGNUM_TARGET_GLES2 + _extension(OES,texture_compression_astc) + #endif + }; constexpr Extension ExtensionListES300[]{ #ifdef MAGNUM_TARGET_GLES2 _extension(ANGLE,framebuffer_blit), diff --git a/src/Magnum/GL/Extensions.h b/src/Magnum/GL/Extensions.h index 2bdb4c6c7..e47cba50f 100644 --- a/src/Magnum/GL/Extensions.h +++ b/src/Magnum/GL/Extensions.h @@ -493,14 +493,15 @@ namespace ANDROID { _extension(120,OES,surfaceless_context, GLES200, GLES300) // #116 #endif #ifndef MAGNUM_TARGET_GLES2 - _extension(121,OES,sample_shading, GLES300, GLES320) // #169 - _extension(122,OES,sample_variables, GLES300, GLES320) // #170 - _extension(123,OES,shader_image_atomic, GLES310, GLES320) // #171 - _extension(124,OES,shader_multisample_interpolation, GLES300, GLES320) // #172 + _extension(121,OES,texture_compression_astc, GLES300, None) // #162 + _extension(122,OES,sample_shading, GLES300, GLES320) // #169 + _extension(123,OES,sample_variables, GLES300, GLES320) // #170 + _extension(124,OES,shader_image_atomic, GLES310, GLES320) // #171 + _extension(125,OES,shader_multisample_interpolation, GLES300, GLES320) // #172 #endif - _extension(125,OES,texture_stencil8, GLES200, GLES320) // #173 + _extension(126,OES,texture_stencil8, GLES200, GLES320) // #173 #ifndef MAGNUM_TARGET_GLES2 - _extension(126,OES,texture_storage_multisample_2d_array, GLES310, GLES320) // #174 + _extension(127,OES,texture_storage_multisample_2d_array, GLES310, GLES320) // #174 #endif } namespace MAGNUM { #ifndef MAGNUM_TARGET_GLES2 diff --git a/src/Magnum/GL/Implementation/compressedPixelFormatMapping.hpp b/src/Magnum/GL/Implementation/compressedPixelFormatMapping.hpp index 70aa87c66..19e7c74e7 100644 --- a/src/Magnum/GL/Implementation/compressedPixelFormatMapping.hpp +++ b/src/Magnum/GL/Implementation/compressedPixelFormatMapping.hpp @@ -103,6 +103,49 @@ _c(Astc12x10RGBAUnorm, RGBAAstc12x10) _c(Astc12x10RGBASrgb, SRGB8Alpha8Astc12x10) _c(Astc12x12RGBAUnorm, RGBAAstc12x12) _c(Astc12x12RGBASrgb, SRGB8Alpha8Astc12x12) +#if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) +_c(Astc3x3x3RGBAUnorm, RGBAAstc3x3x3) +_c(Astc3x3x3RGBASrgb, SRGB8Alpha8Astc3x3x3) +_c(Astc4x3x3RGBAUnorm, RGBAAstc4x3x3) +_c(Astc4x3x3RGBASrgb, SRGB8Alpha8Astc4x3x3) +_c(Astc4x4x3RGBAUnorm, RGBAAstc4x4x3) +_c(Astc4x4x3RGBASrgb, SRGB8Alpha8Astc4x4x3) +_c(Astc4x4x4RGBAUnorm, RGBAAstc4x4x4) +_c(Astc4x4x4RGBASrgb, SRGB8Alpha8Astc4x4x4) +_c(Astc5x4x4RGBAUnorm, RGBAAstc5x4x4) +_c(Astc5x4x4RGBASrgb, SRGB8Alpha8Astc5x4x4) +_c(Astc5x5x4RGBAUnorm, RGBAAstc5x5x4) +_c(Astc5x5x4RGBASrgb, SRGB8Alpha8Astc5x5x4) +_c(Astc5x5x5RGBAUnorm, RGBAAstc5x5x5) +_c(Astc5x5x5RGBASrgb, SRGB8Alpha8Astc5x5x5) +_c(Astc6x5x5RGBAUnorm, RGBAAstc6x5x5) +_c(Astc6x5x5RGBASrgb, SRGB8Alpha8Astc6x5x5) +_c(Astc6x6x5RGBAUnorm, RGBAAstc6x6x5) +_c(Astc6x6x5RGBASrgb, SRGB8Alpha8Astc6x6x5) +_c(Astc6x6x6RGBAUnorm, RGBAAstc6x6x6) +_c(Astc6x6x6RGBASrgb, SRGB8Alpha8Astc6x6x6) +#else +_s(Astc3x3x3RGBAUnorm) +_s(Astc3x3x3RGBASrgb) +_s(Astc4x3x3RGBAUnorm) +_s(Astc4x3x3RGBASrgb) +_s(Astc4x4x3RGBAUnorm) +_s(Astc4x4x3RGBASrgb) +_s(Astc4x4x4RGBAUnorm) +_s(Astc4x4x4RGBASrgb) +_s(Astc5x4x4RGBAUnorm) +_s(Astc5x4x4RGBASrgb) +_s(Astc5x5x4RGBAUnorm) +_s(Astc5x5x4RGBASrgb) +_s(Astc5x5x5RGBAUnorm) +_s(Astc5x5x5RGBASrgb) +_s(Astc6x5x5RGBAUnorm) +_s(Astc6x5x5RGBASrgb) +_s(Astc6x6x5RGBAUnorm) +_s(Astc6x6x5RGBASrgb) +_s(Astc6x6x6RGBAUnorm) +_s(Astc6x6x6RGBASrgb) +#endif #ifdef MAGNUM_TARGET_GLES _c(PvrtcRGB2bppUnorm, RGBPvrtc2bppV1) #ifndef MAGNUM_TARGET_WEBGL diff --git a/src/Magnum/GL/PixelFormat.cpp b/src/Magnum/GL/PixelFormat.cpp index 1f80b2faa..175be42bd 100644 --- a/src/Magnum/GL/PixelFormat.cpp +++ b/src/Magnum/GL/PixelFormat.cpp @@ -462,6 +462,28 @@ Debug& operator<<(Debug& debug, const CompressedPixelFormat value) { _c(SRGB8Alpha8Astc12x10) _c(RGBAAstc12x12) _c(SRGB8Alpha8Astc12x12) + #if defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL) + _c(RGBAAstc3x3x3) + _c(SRGB8Alpha8Astc3x3x3) + _c(RGBAAstc4x3x3) + _c(SRGB8Alpha8Astc4x3x3) + _c(RGBAAstc4x4x3) + _c(SRGB8Alpha8Astc4x4x3) + _c(RGBAAstc4x4x4) + _c(SRGB8Alpha8Astc4x4x4) + _c(RGBAAstc5x4x4) + _c(SRGB8Alpha8Astc5x4x4) + _c(RGBAAstc5x5x4) + _c(SRGB8Alpha8Astc5x5x4) + _c(RGBAAstc5x5x5) + _c(SRGB8Alpha8Astc5x5x5) + _c(RGBAAstc6x5x5) + _c(SRGB8Alpha8Astc6x5x5) + _c(RGBAAstc6x6x5) + _c(SRGB8Alpha8Astc6x6x5) + _c(RGBAAstc6x6x6) + _c(SRGB8Alpha8Astc6x6x6) + #endif #ifdef MAGNUM_TARGET_GLES _c(RGBPvrtc2bppV1) #ifndef MAGNUM_TARGET_WEBGL diff --git a/src/Magnum/GL/PixelFormat.h b/src/Magnum/GL/PixelFormat.h index c45588a82..6b269e782 100644 --- a/src/Magnum/GL/PixelFormat.h +++ b/src/Magnum/GL/PixelFormat.h @@ -1029,7 +1029,7 @@ enum class CompressedPixelFormat: GLenum { SRGBAlphaS3tcDxt5 = GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, /** - * ASTC compressed RGBA with 4x4 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 4x4 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1052,8 +1052,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 4x4 blocks. **Available only on 2D, - * 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 4x4 blocks. **Available only on + * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1075,7 +1075,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 5x4 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 5x4 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1098,8 +1098,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 5x4 blocks. **Available only on 2D, - * 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 5x4 blocks. **Available only on + * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1121,7 +1121,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 5x5 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 5x5 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1144,8 +1144,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 5x5 blocks. **Available only on 2D, - * 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 5x5 blocks. **Available only on + * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1167,7 +1167,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 6x5 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 6x5 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1190,8 +1190,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 6x5 blocks. **Available only on 2D, - * 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 6x5 blocks. **Available only on + * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1213,7 +1213,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 6x6 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 6x6 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1236,8 +1236,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 6x6 blocks. **Available only on 2D, - * 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 6x6 blocks. **Available only on + * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1259,7 +1259,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 8x5 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 8x5 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1282,8 +1282,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 8x5 blocks. **Available only on 2D, - * 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 8x5 blocks. **Available only on + * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1305,7 +1305,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 8x6 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 8x6 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1328,8 +1328,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 8x6 blocks. **Available only on 2D, - * 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 8x6 blocks. **Available only on + * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1351,7 +1351,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 8x8 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 8x8 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1374,8 +1374,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 8x8 blocks. **Available only on 2D, - * 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 8x8 blocks. **Available only on + * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1397,7 +1397,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 10x5 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 10x5 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1420,7 +1420,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 10x5 blocks. **Available only on + * 2D ASTC compressed sRGB with alpha with 10x5 blocks. **Available only on * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1443,7 +1443,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 10x6 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 10x6 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1466,7 +1466,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 10x6 blocks. **Available only on + * 2D ASTC compressed sRGB with alpha with 10x6 blocks. **Available only on * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1489,7 +1489,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 10x8 blocks. **Available only on 2D, 3D, 2D + * 2D ASTC compressed RGBA with 10x8 blocks. **Available only on 2D, 3D, 2D * array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1512,7 +1512,7 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 10x8 blocks. **Available only on + * 2D ASTC compressed sRGB with alpha with 10x8 blocks. **Available only on * 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} @@ -1535,8 +1535,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 10x10 blocks. **Available only on 2D, 3D, 2D - * array, cube map and cube map array textures.** + * 2D ASTC compressed RGBA with 10x10 blocks. **Available only on 2D, 3D, + * 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1558,8 +1558,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 10x10 blocks. **Available only on - * 2D, 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 10x10 blocks. **Available only + * on 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1581,8 +1581,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 12x10 blocks. **Available only on 2D, 3D, 2D - * array, cube map and cube map array textures.** + * 2D ASTC compressed RGBA with 12x10 blocks. **Available only on 2D, 3D, + * 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1604,8 +1604,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 12x10 blocks. **Available only on - * 2D, 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 12x10 blocks. **Available only + * on 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1627,8 +1627,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed RGBA with 12x12 blocks. **Available only on 2D, 3D, 2D - * array, cube map and cube map array textures.** + * 2D ASTC compressed RGBA with 12x12 blocks. **Available only on 2D, 3D, + * 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1650,8 +1650,8 @@ enum class CompressedPixelFormat: GLenum { #endif /** - * ASTC compressed sRGB with alpha with 12x12 blocks. **Available only on - * 2D, 3D, 2D array, cube map and cube map array textures.** + * 2D ASTC compressed sRGB with alpha with 12x12 blocks. **Available only + * on 2D, 3D, 2D array, cube map and cube map array textures.** * @requires_extension Extension @gl_extension2{KHR,texture_compression_astc_ldr,KHR_texture_compression_astc_hdr} * @requires_extension Extension @gl_extension{KHR,texture_compression_astc_sliced_3d} * for 3D textures @@ -1672,6 +1672,188 @@ enum class CompressedPixelFormat: GLenum { SRGB8Alpha8Astc12x12 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12, #endif + #if defined(DOXYGEN_GENERATING_OUTPUT) || (defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)) + /** + * 3D ASTC compressed RGBA with 3x3x3 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc3x3x3 = GL_COMPRESSED_RGBA_ASTC_3x3x3_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 3x3x3 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc3x3x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES, + + /** + * 3D ASTC compressed RGBA with 4x3x3 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc4x3x3 = GL_COMPRESSED_RGBA_ASTC_4x3x3_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 4x3x3 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc4x3x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES, + + /** + * 3D ASTC compressed RGBA with 4x4x3 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc4x4x3 = GL_COMPRESSED_RGBA_ASTC_4x4x3_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 4x4x3 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc4x4x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES, + + /** + * 3D ASTC compressed RGBA with 4x4x4 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc4x4x4 = GL_COMPRESSED_RGBA_ASTC_4x4x4_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 4x4x4 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc4x4x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES, + + /** + * 3D ASTC compressed RGBA with 5x4x4 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc5x4x4 = GL_COMPRESSED_RGBA_ASTC_5x4x4_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 5x4x4 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc5x4x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES, + + /** + * 3D ASTC compressed RGBA with 5x5x4 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc5x5x4 = GL_COMPRESSED_RGBA_ASTC_5x5x4_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 5x5x4 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc5x5x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES, + + /** + * 3D ASTC compressed RGBA with 5x5x5 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc5x5x5 = GL_COMPRESSED_RGBA_ASTC_5x5x5_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 5x5x5 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc5x5x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES, + + /** + * 3D ASTC compressed RGBA with 6x5x5 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc6x5x5 = GL_COMPRESSED_RGBA_ASTC_6x5x5_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 6x5x5 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc6x5x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES, + + /** + * 3D ASTC compressed RGBA with 6x6x5 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc6x6x5 = GL_COMPRESSED_RGBA_ASTC_6x6x5_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 6x6x5 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc6x6x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES, + + /** + * 3D ASTC compressed RGBA with 6x6x6 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + RGBAAstc6x6x6 = GL_COMPRESSED_RGBA_ASTC_6x6x6_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 6x6x6 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + SRGB8Alpha8Astc6x6x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES, + #endif + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(MAGNUM_TARGET_GLES) /** * PVRTC compressed RGB, normalized unsigned byte with 2 bits per pixel. diff --git a/src/Magnum/GL/TextureFormat.h b/src/Magnum/GL/TextureFormat.h index 75c5b9144..44108d552 100644 --- a/src/Magnum/GL/TextureFormat.h +++ b/src/Magnum/GL/TextureFormat.h @@ -2009,6 +2009,188 @@ enum class TextureFormat: GLenum { CompressedSRGB8Alpha8Astc12x12 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12, #endif + #if defined(DOXYGEN_GENERATING_OUTPUT) || (defined(MAGNUM_TARGET_GLES) && !defined(MAGNUM_TARGET_GLES2) && !defined(MAGNUM_TARGET_WEBGL)) + /** + * 3D ASTC compressed RGBA with 3x3x3 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc3x3x3 = GL_COMPRESSED_RGBA_ASTC_3x3x3_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 3x3x3 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc3x3x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES, + + /** + * 3D ASTC compressed RGBA with 4x3x3 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc4x3x3 = GL_COMPRESSED_RGBA_ASTC_4x3x3_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 4x3x3 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc4x3x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES, + + /** + * 3D ASTC compressed RGBA with 4x4x3 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc4x4x3 = GL_COMPRESSED_RGBA_ASTC_4x4x3_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 4x4x3 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc4x4x3 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES, + + /** + * 3D ASTC compressed RGBA with 4x4x4 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc4x4x4 = GL_COMPRESSED_RGBA_ASTC_4x4x4_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 4x4x4 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc4x4x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES, + + /** + * 3D ASTC compressed RGBA with 5x4x4 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc5x4x4 = GL_COMPRESSED_RGBA_ASTC_5x4x4_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 5x4x4 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc5x4x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES, + + /** + * 3D ASTC compressed RGBA with 5x5x4 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc5x5x4 = GL_COMPRESSED_RGBA_ASTC_5x5x4_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 5x5x4 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc5x5x4 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES, + + /** + * 3D ASTC compressed RGBA with 5x5x5 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc5x5x5 = GL_COMPRESSED_RGBA_ASTC_5x5x5_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 5x5x5 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc5x5x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES, + + /** + * 3D ASTC compressed RGBA with 6x5x5 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc6x5x5 = GL_COMPRESSED_RGBA_ASTC_6x5x5_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 6x5x5 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc6x5x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES, + + /** + * 3D ASTC compressed RGBA with 6x6x5 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc6x6x5 = GL_COMPRESSED_RGBA_ASTC_6x6x5_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 6x6x5 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc6x6x5 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES, + + /** + * 3D ASTC compressed RGBA with 6x6x6 blocks. **Available only on 3D + * textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedRGBAAstc6x6x6 = GL_COMPRESSED_RGBA_ASTC_6x6x6_OES, + + /** + * 3D ASTC compressed sRGB with alpha with 6x6x6 blocks. **Available only + * on 3D textures.** + * + * @requires_gles30 Not defined on desktop OpenGL, WebGL or OpenGL ES 2.0. + * @requires_es_extension Extension @gl_extension{OES,texture_compression_astc} + */ + CompressedSRGB8Alpha8Astc6x6x6 = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES, + #endif + #if defined(DOXYGEN_GENERATING_OUTPUT) || defined(MAGNUM_TARGET_GLES) /** * PVRTC compressed RGB, normalized unsigned byte with 2 bits per pixel. diff --git a/src/Magnum/Implementation/compressedPixelFormatMapping.hpp b/src/Magnum/Implementation/compressedPixelFormatMapping.hpp index 6ce235854..2ffba63a7 100644 --- a/src/Magnum/Implementation/compressedPixelFormatMapping.hpp +++ b/src/Magnum/Implementation/compressedPixelFormatMapping.hpp @@ -103,6 +103,26 @@ _c(Astc12x10RGBAUnorm, 12, 10, 1, 128) _c(Astc12x10RGBASrgb, 12, 10, 1, 128) _c(Astc12x12RGBAUnorm, 12, 12, 1, 128) _c(Astc12x12RGBASrgb, 12, 12, 1, 128) +_c(Astc3x3x3RGBAUnorm, 3, 3, 3, 128) +_c(Astc3x3x3RGBASrgb, 3, 3, 3, 128) +_c(Astc4x3x3RGBAUnorm, 4, 3, 3, 128) +_c(Astc4x3x3RGBASrgb, 4, 3, 3, 128) +_c(Astc4x4x3RGBAUnorm, 4, 4, 3, 128) +_c(Astc4x4x3RGBASrgb, 4, 4, 3, 128) +_c(Astc4x4x4RGBAUnorm, 4, 4, 4, 128) +_c(Astc4x4x4RGBASrgb, 4, 4, 4, 128) +_c(Astc5x4x4RGBAUnorm, 5, 4, 4, 128) +_c(Astc5x4x4RGBASrgb, 5, 4, 4, 128) +_c(Astc5x5x4RGBAUnorm, 5, 5, 4, 128) +_c(Astc5x5x4RGBASrgb, 5, 5, 4, 128) +_c(Astc5x5x5RGBAUnorm, 5, 5, 5, 128) +_c(Astc5x5x5RGBASrgb, 5, 5, 5, 128) +_c(Astc6x5x5RGBAUnorm, 6, 5, 5, 128) +_c(Astc6x5x5RGBASrgb, 6, 5, 5, 128) +_c(Astc6x6x5RGBAUnorm, 6, 6, 5, 128) +_c(Astc6x6x5RGBASrgb, 6, 6, 5, 128) +_c(Astc6x6x6RGBAUnorm, 6, 6, 6, 128) +_c(Astc6x6x6RGBASrgb, 6, 6, 6, 128) /* https://en.wikipedia.org/wiki/PVRTC */ _c(PvrtcRGB2bppUnorm, 8, 4, 1, 64) diff --git a/src/Magnum/PixelFormat.cpp b/src/Magnum/PixelFormat.cpp index 0d53d4911..d9554f698 100644 --- a/src/Magnum/PixelFormat.cpp +++ b/src/Magnum/PixelFormat.cpp @@ -298,6 +298,26 @@ Debug& operator<<(Debug& debug, const CompressedPixelFormat value) { _c(Astc12x10RGBASrgb) _c(Astc12x12RGBAUnorm) _c(Astc12x12RGBASrgb) + _c(Astc3x3x3RGBAUnorm) + _c(Astc3x3x3RGBASrgb) + _c(Astc4x3x3RGBAUnorm) + _c(Astc4x3x3RGBASrgb) + _c(Astc4x4x3RGBAUnorm) + _c(Astc4x4x3RGBASrgb) + _c(Astc4x4x4RGBAUnorm) + _c(Astc4x4x4RGBASrgb) + _c(Astc5x4x4RGBAUnorm) + _c(Astc5x4x4RGBASrgb) + _c(Astc5x5x4RGBAUnorm) + _c(Astc5x5x4RGBASrgb) + _c(Astc5x5x5RGBAUnorm) + _c(Astc5x5x5RGBASrgb) + _c(Astc6x5x5RGBAUnorm) + _c(Astc6x5x5RGBASrgb) + _c(Astc6x6x5RGBAUnorm) + _c(Astc6x6x5RGBASrgb) + _c(Astc6x6x6RGBAUnorm) + _c(Astc6x6x6RGBASrgb) _c(PvrtcRGB2bppUnorm) _c(PvrtcRGB2bppSrgb) _c(PvrtcRGBA2bppUnorm) diff --git a/src/Magnum/PixelFormat.h b/src/Magnum/PixelFormat.h index 4a031cd37..d02642e61 100644 --- a/src/Magnum/PixelFormat.h +++ b/src/Magnum/PixelFormat.h @@ -1090,7 +1090,7 @@ enum class CompressedPixelFormat: UnsignedInt { Etc2RGBA8Srgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 4x4 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc4x4, @@ -1104,7 +1104,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc4x4RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 4x4 * blocks. * @@ -1118,7 +1118,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc4x4RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 5x4 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc5x4, @@ -1132,7 +1132,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc5x4RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 5x4 * blocks. * @@ -1146,7 +1146,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc5x4RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 5x5 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc5x5, @@ -1160,7 +1160,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc5x5RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 5x5 * blocks. * @@ -1174,7 +1174,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc5x5RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 6x5 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc6x5, @@ -1188,7 +1188,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc6x5RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 6x5 * blocks. * @@ -1202,7 +1202,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc6x5RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 6x6 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc6x6, @@ -1216,7 +1216,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc6x6RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 6x6 * blocks. * @@ -1230,7 +1230,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc6x6RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 8x5 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc8x5, @@ -1244,7 +1244,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc8x5RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 8x5 * blocks. * @@ -1258,7 +1258,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc8x5RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 8x6 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc8x6, @@ -1272,7 +1272,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc8x6RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 8x6 * blocks. * @@ -1286,7 +1286,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc8x6RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 8x8 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc8x8, @@ -1300,7 +1300,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc8x8RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 8x8 * blocks. * @@ -1314,7 +1314,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc8x8RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 10x5 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc10x5, @@ -1328,7 +1328,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc10x5RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 10x5 * blocks. * @@ -1342,7 +1342,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc10x5RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 10x6 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc10x6, @@ -1356,7 +1356,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc10x6RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 10x6 * blocks. * @@ -1370,7 +1370,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc10x6RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 10x8 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc10x8, @@ -1384,7 +1384,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc10x8RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 10x8 * blocks. * @@ -1398,7 +1398,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc10x8RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 10x10 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc10x10, @@ -1412,7 +1412,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc10x10RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 10x10 * blocks. * @@ -1426,7 +1426,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc10x10RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 12x10 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc12x10, @@ -1440,7 +1440,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc12x10RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 12x10 * blocks. * @@ -1454,7 +1454,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc12x10RGBASrgb, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed RGBA, normalized unsigned byte with 12x12 blocks. * * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc12x12, @@ -1468,7 +1468,7 @@ enum class CompressedPixelFormat: UnsignedInt { Astc12x12RGBAUnorm, /** - * [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * 2D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) * compressed sRGB + linear alpha, normalized unsigned byte with 12x12 * blocks. * @@ -1481,6 +1481,256 @@ enum class CompressedPixelFormat: UnsignedInt { */ Astc12x12RGBASrgb, + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 3x3x3 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc3x3x3, + * @ref GL::TextureFormat::CompressedRGBAAstc3x3x3; + * and @def_vk_keyword{FORMAT_ASTC_3x3x3_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc3x3x3RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 3x3x3 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc3x3x3, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc3x3x3; + * and @def_vk_keyword{FORMAT_ASTC_3x3x3_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc3x3x3RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 4x3x3 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc4x3x3, + * @ref GL::TextureFormat::CompressedRGBAAstc4x3x3; + * and @def_vk_keyword{FORMAT_ASTC_4x3x3_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc4x3x3RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 4x3x3 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc4x3x3, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc4x3x3; + * and @def_vk_keyword{FORMAT_ASTC_4x3x3_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc4x3x3RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 4x4x3 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc4x4x3, + * @ref GL::TextureFormat::CompressedRGBAAstc4x4x3; + * and @def_vk_keyword{FORMAT_ASTC_4x4x3_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc4x4x3RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 4x4x3 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc4x4x3, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc4x4x3; + * and @def_vk_keyword{FORMAT_ASTC_4x4x3_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc4x4x3RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 4x4x4 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc4x4x4, + * @ref GL::TextureFormat::CompressedRGBAAstc4x4x4; + * and @def_vk_keyword{FORMAT_ASTC_4x4x4_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc4x4x4RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 4x4x4 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc4x4x4, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc4x4x4; + * and @def_vk_keyword{FORMAT_ASTC_4x4x4_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc4x4x4RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 5x4x4 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc5x4x4, + * @ref GL::TextureFormat::CompressedRGBAAstc5x4x4; + * and @def_vk_keyword{FORMAT_ASTC_5x4x4_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc5x4x4RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 5x4x4 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc5x4x4, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc5x4x4; + * and @def_vk_keyword{FORMAT_ASTC_5x4x4_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc5x4x4RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 5x5x4 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc5x5x4, + * @ref GL::TextureFormat::CompressedRGBAAstc5x5x4; + * and @def_vk_keyword{FORMAT_ASTC_5x5x4_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc5x5x4RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 5x5x4 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc5x5x4, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc5x5x4; + * and @def_vk_keyword{FORMAT_ASTC_5x5x4_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc5x5x4RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 5x5x5 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc5x5x5, + * @ref GL::TextureFormat::CompressedRGBAAstc5x5x5; + * and @def_vk_keyword{FORMAT_ASTC_5x5x5_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc5x5x5RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 5x5x5 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc5x5x5, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc5x5x5; + * and @def_vk_keyword{FORMAT_ASTC_5x5x5_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc5x5x5RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 6x5x5 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc6x5x5, + * @ref GL::TextureFormat::CompressedRGBAAstc6x5x5; + * and @def_vk_keyword{FORMAT_ASTC_6x5x5_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc6x5x5RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 6x5x5 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc6x5x5, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc6x5x5; + * and @def_vk_keyword{FORMAT_ASTC_6x5x5_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc6x5x5RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 6x6x5 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc6x6x5, + * @ref GL::TextureFormat::CompressedRGBAAstc6x6x5; + * and @def_vk_keyword{FORMAT_ASTC_6x6x5_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc6x6x5RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 6x6x5 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc6x6x5, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc6x6x5; + * and @def_vk_keyword{FORMAT_ASTC_6x6x5_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc6x6x5RGBASrgb, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed RGBA, normalized unsigned byte with 6x6x6 blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::RGBAAstc6x6x6, + * @ref GL::TextureFormat::CompressedRGBAAstc6x6x6; + * and @def_vk_keyword{FORMAT_ASTC_6x6x6_UNORM_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc6x6x6RGBAUnorm, + + /** + * 3D [ASTC](https://en.wikipedia.org/wiki/Adaptive_Scalable_Texture_Compression) + * compressed sRGB + linear alpha, normalized unsigned byte with 6x6x6 + * blocks. + * + * Corresponds to @ref GL::CompressedPixelFormat::SRGB8Alpha8Astc6x6x6, + * @ref GL::TextureFormat::CompressedSRGB8Alpha8Astc6x6x6; + * and @def_vk_keyword{FORMAT_ASTC_6x6x6_SRGB_BLOCK_EXT,Format} (not a + * part of the spec yet, [only defined in KTX](https://github.com/KhronosGroup/KTX-Specification/pull/97/files)). + * No equivalent in Metal or D3D. + */ + Astc6x6x6RGBASrgb, + /* See https://github.com/KhronosGroup/Vulkan-Docs/issues/512#issuecomment-307768667 for Vulkan mapping. Ugh. */ diff --git a/src/Magnum/Vk/Implementation/compressedFormatMapping.hpp b/src/Magnum/Vk/Implementation/compressedFormatMapping.hpp index b967f6136..f2dc65e84 100644 --- a/src/Magnum/Vk/Implementation/compressedFormatMapping.hpp +++ b/src/Magnum/Vk/Implementation/compressedFormatMapping.hpp @@ -79,6 +79,28 @@ _c(Astc12x10RGBAUnorm, ASTC_12x10_UNORM_BLOCK) _c(Astc12x10RGBASrgb, ASTC_12x10_SRGB_BLOCK) _c(Astc12x12RGBAUnorm, ASTC_12x12_UNORM_BLOCK) _c(Astc12x12RGBASrgb, ASTC_12x12_SRGB_BLOCK) + +/* https://github.com/KhronosGroup/KTX-Specification/pull/97 */ +_s(Astc3x3x3RGBAUnorm) //, ASTC_3x3x3_UNORM_BLOCK) +_s(Astc3x3x3RGBASrgb) //, ASTC_3x3x3_SRGB_BLOCK) +_s(Astc4x3x3RGBAUnorm) //, ASTC_4x3x3_UNORM_BLOCK) +_s(Astc4x3x3RGBASrgb) //, ASTC_4x3x3_SRGB_BLOCK) +_s(Astc4x4x3RGBAUnorm) //, ASTC_4x4x3_UNORM_BLOCK) +_s(Astc4x4x3RGBASrgb) //, ASTC_4x4x3_SRGB_BLOCK) +_s(Astc4x4x4RGBAUnorm) //, ASTC_4x4x4_UNORM_BLOCK) +_s(Astc4x4x4RGBASrgb) //, ASTC_4x4x4_SRGB_BLOCK) +_s(Astc5x4x4RGBAUnorm) //, ASTC_5x4x4_UNORM_BLOCK) +_s(Astc5x4x4RGBASrgb) //, ASTC_5x4x4_SRGB_BLOCK) +_s(Astc5x5x4RGBAUnorm) //, ASTC_5x5x4_UNORM_BLOCK) +_s(Astc5x5x4RGBASrgb) //, ASTC_5x5x4_SRGB_BLOCK) +_s(Astc5x5x5RGBAUnorm) //, ASTC_5x5x5_UNORM_BLOCK) +_s(Astc5x5x5RGBASrgb) //, ASTC_5x5x5_SRGB_BLOCK) +_s(Astc6x5x5RGBAUnorm) //, ASTC_6x5x5_UNORM_BLOCK) +_s(Astc6x5x5RGBASrgb) //, ASTC_6x5x5_SRGB_BLOCK) +_s(Astc6x6x5RGBAUnorm) //, ASTC_6x6x5_UNORM_BLOCK) +_s(Astc6x6x5RGBASrgb) //, ASTC_6x6x5_SRGB_BLOCK) +_s(Astc6x6x6RGBAUnorm) //, ASTC_6x6x6_UNORM_BLOCK) +_s(Astc6x6x6RGBASrgb) //, ASTC_6x6x6_SRGB_BLOCK) /* https://github.com/KhronosGroup/Vulkan-Docs/issues/512 */ _c(PvrtcRGB2bppUnorm, PVRTC1_2BPP_UNORM_BLOCK_IMG) _c(PvrtcRGB2bppSrgb, PVRTC1_2BPP_SRGB_BLOCK_IMG) diff --git a/src/Magnum/Vk/Test/EnumsTest.cpp b/src/Magnum/Vk/Test/EnumsTest.cpp index 73dabf523..081f22e2b 100644 --- a/src/Magnum/Vk/Test/EnumsTest.cpp +++ b/src/Magnum/Vk/Test/EnumsTest.cpp @@ -323,16 +323,12 @@ void EnumsTest::mapVkFormatCompressedImplementationSpecific() { } void EnumsTest::mapVkFormatCompressedUnsupported() { - #if 1 - CORRADE_SKIP("All compressed pixel formats are currently supported."); - #else - CORRADE_VERIFY(!hasVkFormat(Magnum::CompressedPixelFormat::Bc1RGBAUnorm)); + CORRADE_VERIFY(!hasVkFormat(Magnum::CompressedPixelFormat::Astc3x3x3RGBAUnorm)); std::ostringstream out; Error redirectError{&out}; - vkFormat(Magnum::CompressedPixelFormat::Bc1RGBAUnorm); - CORRADE_COMPARE(out.str(), "Vk::vkFormat(): unsupported format CompressedPixelFormat::Bc1RGBAUnorm\n"); - #endif + vkFormat(Magnum::CompressedPixelFormat::Astc3x3x3RGBAUnorm); + CORRADE_COMPARE(out.str(), "Vk::vkFormat(): unsupported format CompressedPixelFormat::Astc3x3x3RGBAUnorm\n"); } void EnumsTest::mapVkFormatCompressedInvalid() { diff --git a/src/MagnumExternal/OpenGL/GLES3/extensions.txt b/src/MagnumExternal/OpenGL/GLES3/extensions.txt index c8ec51765..a43b7fd19 100644 --- a/src/MagnumExternal/OpenGL/GLES3/extensions.txt +++ b/src/MagnumExternal/OpenGL/GLES3/extensions.txt @@ -22,6 +22,9 @@ extension KHR_debug optional extension KHR_blend_equation_advanced optional extension KHR_robustness optional extension KHR_robust_buffer_access_behavior optional +# unfortunately this adds back the KHR-suffixed ASTC enums I was so desperately +# trying to get rid of +extension OES_texture_compression_astc optional extension OES_sample_shading optional extension OES_sample_variables optional extension OES_shader_image_atomic optional diff --git a/src/MagnumExternal/OpenGL/GLES3/flextGL.h b/src/MagnumExternal/OpenGL/GLES3/flextGL.h index 6ac68c17c..a55138573 100644 --- a/src/MagnumExternal/OpenGL/GLES3/flextGL.h +++ b/src/MagnumExternal/OpenGL/GLES3/flextGL.h @@ -1377,6 +1377,57 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen #define GL_NO_RESET_NOTIFICATION_KHR 0x8261 #define GL_CONTEXT_LOST_KHR 0x0507 +/* GL_OES_texture_compression_astc */ + +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0 +#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1 +#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2 +#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3 +#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4 +#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5 +#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6 +#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7 +#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8 +#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9 + /* GL_OES_sample_shading */ #define GL_SAMPLE_SHADING_OES 0x8C36 diff --git a/src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h b/src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h index 950d4c43b..de3dd34ea 100644 --- a/src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h +++ b/src/MagnumExternal/OpenGL/GLES3/flextGLWindowsDesktop.h @@ -1369,6 +1369,57 @@ typedef void (APIENTRY *GLDEBUGPROCKHR)(GLenum source,GLenum type,GLuint id,GLen #define GL_NO_RESET_NOTIFICATION_KHR 0x8261 #define GL_CONTEXT_LOST_KHR 0x0507 +/* GL_OES_texture_compression_astc */ + +#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0 +#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1 +#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2 +#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3 +#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4 +#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5 +#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6 +#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7 +#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8 +#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9 +#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA +#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB +#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC +#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD +#define GL_COMPRESSED_RGBA_ASTC_3x3x3_OES 0x93C0 +#define GL_COMPRESSED_RGBA_ASTC_4x3x3_OES 0x93C1 +#define GL_COMPRESSED_RGBA_ASTC_4x4x3_OES 0x93C2 +#define GL_COMPRESSED_RGBA_ASTC_4x4x4_OES 0x93C3 +#define GL_COMPRESSED_RGBA_ASTC_5x4x4_OES 0x93C4 +#define GL_COMPRESSED_RGBA_ASTC_5x5x4_OES 0x93C5 +#define GL_COMPRESSED_RGBA_ASTC_5x5x5_OES 0x93C6 +#define GL_COMPRESSED_RGBA_ASTC_6x5x5_OES 0x93C7 +#define GL_COMPRESSED_RGBA_ASTC_6x6x5_OES 0x93C8 +#define GL_COMPRESSED_RGBA_ASTC_6x6x6_OES 0x93C9 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES 0x93E0 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES 0x93E1 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES 0x93E2 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES 0x93E3 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES 0x93E4 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES 0x93E5 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES 0x93E6 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES 0x93E7 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES 0x93E8 +#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES 0x93E9 + /* GL_OES_sample_shading */ #define GL_SAMPLE_SHADING_OES 0x8C36