简体   繁体   中英

GL_INVALID_VALUE error generated. Invalid texture dimensions. on Cubemap texture 427*240*6

Hi I'm currently emulating a set of Nintendo Switch games and I receive a Cubemap Texture of 427x240 6 faces obviously. When doing glTextureStorage2D on that texture, I receive this error: "GL_INVALID_VALUE error generated. Invalid texture dimensions." I've looked everywhere in the OpenGL specification and I can't find a limitation that fits the description for this case. Furthermore, I tested in our Vulkan backend and it does not hit any validation layers and accepts it without any trouble.

Other things I've done:

  • I've tracked this data all the way back to the TIC (a TIC is a texture descriptor in NVIDIA Maxwell 2nd Gen). The data is consistent with what the emulated GPU really wants. I've also tracked the texture in our Vulkan backend and all data is consistent.
  • I've checked if a similar issue exists, can't find any.

Should I report a driver bug to NVIDIA or am I missing something?

Using OpenGL 4.3 on NVIDIA GTX 1060. (Vulkan 1.1 if interested).

I receive a Cubemap Texture of 427x240

Cubemap faces must be squares. They don't have to be powers of two, but they are required to be squares.

Yes, even in Vulkan : if you create a "CUBE_COMPATIBLE" 2D image, then its width & height must be equal. If your validation layers didn't catch this, then something is wrong with them, or you specified the right values to it while specifying the wrong values to OpenGL.

Indeed, I'm rather surprised that the Switch's GPU allows this. Even AMD's Mantle required square cubemap faces.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM