Nabla
Nabla copied to clipboard
GLES possible additional <internalformat> extensions
(A) Extensions I'm sure that are NOT in GLES 3.1 core
https://www.khronos.org/registry/OpenGL/extensions/AMD/AMD_compressed_3DC_texture.txt https://www.khronos.org/registry/OpenGL/extensions/AMD/AMD_compressed_ATC_texture.txt https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_dxt1.txt https://www.khronos.org/registry/OpenGL/extensions/NV/NV_texture_compression_s3tc.txt https://www.khronos.org/registry/OpenGL/extensions/NV/NV_texture_compression_s3tc_update.txt https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_s3tc.txt https://www.khronos.org/registry/OpenGL/extensions/IMG/IMG_texture_compression_pvrtc.txt https://www.khronos.org/registry/OpenGL/extensions/ANGLE/ANGLE_texture_compression_dxt.txt https://www.khronos.org/registry/OpenGL/extensions/OES/OES_texture_compression_astc.txt https://www.khronos.org/registry/OpenGL/extensions/KHR/KHR_texture_compression_astc_hdr.txt https://www.khronos.org/registry/OpenGL/extensions/NV/NV_texture_compression_latc.txt https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_pvrtc_sRGB.txt https://www.khronos.org/registry/OpenGL/extensions/IMG/IMG_texture_compression_pvrtc2.txt https://www.khronos.org/registry/OpenGL/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt (its not etc2) https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_s3tc_srgb.txt https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_bptc.txt
(B) Suspected non core Extensions
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_half_float.txt read carefully https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_float.txt read carefully https://www.khronos.org/registry/OpenGL/extensions/NV/NV_packed_float.txt (NV_packed_float_linear a linear filtered sampler, NV_packed_float for renderable, storage and nearest sampler) https://www.khronos.org/registry/OpenGL/extensions/MESA/MESA_bgra.txt https://www.khronos.org/registry/OpenGL/extensions/QCOM/QCOM_render_shared_exponent.txt RGB9E5 as a renderable https://www.khronos.org/registry/OpenGL/extensions/NV/NV_image_formats.txt (adds a lot of desktop GL formats) https://www.khronos.org/registry/OpenGL/extensions/NV/NV_shader_atomic_fp16_vector.txt it interacts with a lot of extensions so please read the spec! https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_sRGB_RG8.txt https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_sRGB_R8.txt https://www.khronos.org/registry/OpenGL/extensions/NV/NV_sRGB_formats.txt (stronger than the above two) https://www.khronos.org/registry/OpenGL/extensions/OES/OES_texture_stencil8.txt https://www.khronos.org/registry/OpenGL/extensions/OES/OES_shader_image_atomic.txt (atomic Image and BufferView only core in ES 3.2, 3.1 needs an extension) https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_render_snorm.txt https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_norm16.txt https://www.khronos.org/registry/OpenGL/extensions/OES/OES_texture_buffer.txt (ability to use BufferViews at all) https://www.khronos.org/registry/OpenGL/extensions/OES/OES_vertex_type_10_10_10_2.txt OES_texture_float_linear OES_depth_texture_cube_map • EXT_texture_type_2_10_10_10_REV • NV_fbo_color_attachments • NV_read_buffer • NV_read_depth_stencil
(C) Extensions and Features added to GLES 3.1 core (I'm sure of)
• OES_texture_half_float • OES_texture_half_float_linear • OES_texture_float https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_sRGB.txt (but doesn't provide R8_SRGB) https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_format_BGRA8888.txt https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_read_format_bgra.txt https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_type_2_10_10_10_REV.txt https://www.khronos.org/registry/OpenGL/extensions/OES/OES_vertex_half_float.txt (half float usable as vertex format) https://www.khronos.org/registry/OpenGL/extensions/OES/OES_texture_float_linear.txt & https://www.khronos.org/registry/OpenGL/extensions/OES/OES_texture_float.txt ( 32bit and 16bit float textures used as sampled formats) https://www.khronos.org/registry/OpenGL/extensions/NV/NV_read_depth_stencil.txt (stuff that completes the support of depth and stencil formats) https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_rg.txt (single and dual channel support, but no R8_SRGB or RG8_SRGB) https://www.khronos.org/registry/OpenGL/extensions/OES/OES_packed_depth_stencil.txt (depth+stencil formats) • 32-bit, 16-bit, and 8-bit signed and unsigned integer textures and vertex attributes • 11/11/10 floating-point RGB textures (same as NV_packed_float_linear ? ) • shared exponent RGB 9/9/9/5 textures (same as NV_packed_float_linear ? ) • 10/10/10/2 unsigned normalized and unnormalized integer textures (unsure if wholly equivalent to EXT_texture_type_2_10_10_10_REV) • 8-bit-per-component signed normalized textures • ETC2/EAC texture compression formats • depth textures • 24-bit depth textures • 24/8 depth/stencil extures • 32-bit depth and 32F/8 depth/stencil textures • Stencil texturing • Multisample formats for immutable textures
Plan of action
- Remove any conditionals and checks for extensions listed in (C)
- Add all the formats unconditionally to the switch cases for formats provided by GLES 3.1 spec and (C)
- Add the formats introduced by (A) with cnditional extension checks
- Check if new formats introduced by (B) are not in the GLES 3.1 spec and produce a filtered list (D)
- Read valid usage for
glBindImage,glTexBuffer,glFramebufferTextureto know further format constraints on BufferView, Image Storage, color attachment, etc. - Implement checks for formats provided by D
- disregard the distrinction between filterable and non filterable GLES samplers where it could differ for a format due to an extension (but document it exists)
- Fix the 2 little mistakes in @achal's code
P.S. Before checking extensions, ensure you handle ANDROID_extension_pack_es31a implicitly enabling others.