BUG: Sparse Compressed Texture Arrays

It seems there is a bug when allocating sparse texture arrays with S3TC compressed textures.

glTexStorage3D(GL_TEXTURE_2D_ARRAY, 15, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, 16384, 16384, 16)
Does not work correctly. Trying to commit the mip maps fails, and using glGetTextureLevelParameteriv()
with GL_TEXTURE_WIDTH gets 0 for all mip levels except 0.

Although… putting a non power of 2 for the Depth does work as intended… so 15 and 17 work correctly
and glGetTextureLevelParameteriv() with GL_TEXTURE_WIDTH returns the correct results for all mips.

This does not happen for GL_RGBA8 textures.

I have another issue with sparse textures as well… It seems that there is some limit on sparse textures not related to the size of GPU memory. This could also be me not understanding the allocation of sparse textures in general.

using glTexStorage2D(GL_TEXTURE_2D, 1, GL_RGBA8, 32768, 32768), and doing no commits, I can only allocate 252 textures before hitting an out of memory error. Given a page size of 128x128, there should be a page table of size 256x256 or 65,536 entries each, giving a total of 16,515,072 entries… For a 12 GB Titan Xp, that’s basically ~780 bytes a table entry??? seems odd

Test Setups:
Windows 7 with Titan Xp
Windows 10 with 1080
Both with latest drivers

Not a helpful response but just to say that I’m also seeing the first issue on a GTX1050. Thought I was going mad so happy to find that I’m not.

I’m suspicious that this is because of trying to reserve exactly 4GB.

Tried 8192x8192x64 and that fails too (x65 succeeds).
4096x4096x64 succeeds, so not inherently a problem with using a power of 2 for z.


Thanks for reporting. Could you provide a minimum application/project to reproduce the issue for our engineer to investigate it?