Skip to content

virgl: stricter usage of compressed 3d textures

Erik Faye-Lund requested to merge kusma/mesa:virgl-compressed-3d-formats into master

Using RGTC or ETC1 or ETC2 for 3D-textures isn't alowed by any of OpenGL 4.6, OpenGL ES 3.2, ARB_texture_compression_rgtc, EXT_texture_compression_rgtc, or OES_compressed_ETC1_RGB8_texture specifications.

Similarly, using S3TC or ASTC isn't allowed by any of S3_s3tc, KHR_texture_compression_astc_ldr or KHR_texture_compression_astc_hdr specifications either either. However, both EXT_texture_compression_s3tc and KHR_texture_compression_astc_sliced_3d does allow this, but we need a cap from virglrenderer if we want to allow this in a robust way.

BPTC on the other hand, is supported by both ARB_texture_compression_bptc and EXT_texture_compression_bptc, which it currently the only extensions for this. So we know that it's supported for 3D texturing.

So let's not allow RGTC, ETC, S3TC nor ASTC compressed 3d-textures at all. We can add a cap for S3TC and ASTC 3d-textures later if we really want to.

While we're at it, disallow these for buffers as well. No sane code would ever try this anyway, but it's nice to have it here for completion.

Signed-off-by: Erik Faye-Lund erik.faye-lund@collabora.com

Merge request reports