anyoldname3

glCompressedTextureSubImage2DEXT cubemap bug

Discussion created by anyoldname3 on Aug 16, 2019
Latest reply on Oct 14, 2019 by dorisyan

I'm (indirectly via Qt's QOpenGLTexture) using EXT_direct_state_access to upload textures to the GPU. With the EXT version of DSA, I should be able to call glGenTextures to get a texture name, call glTextureStorage2DEXT to initialise it (without having to bind it first) and allocate immutable storage, and then call glCompressedTextureSubImage2DEXT with the cubemap face as the target parameter. However, even though glTextureSubImage2DEXT works just fine when used like this, the compressed version gives a GL_INVALID_OPERATION error. This doesn't change if I bind the texture first, so I'm assuming it's down to someone confusing it with the ARB/Core version of DSA, which requires that the 3D version of the function is used, and cubemap faces to be treated as array layers. The same data works fine if I hack around QOpenGL's mechanisms and use the non-DSA version, glCompressedTexSubImage2D, so I know it's not a data error.

 

Apparently, this is a regression introduced between 18.9.3 and 19.4.1 (according to someone else who worked around the issue without reporting it), although I've not tested that myself. I've had the issue on my on Vega 56 with 19.8.1, and a user with an RX 580 (but an unknown driver version) reported the same problem.

 

I have APITraces for various behaviours, so can upload those on request, which I imagine might be more useful than an example application that requires Qt, and that would be easier for me as I already have them (whereas a minimal example would involve starting from scratch, as the application I'm working on has a lot of dependencies).

Outcomes