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
Windows 7 with Titan Xp
Windows 10 with 1080
Both with latest drivers