Sign in to follow this  
subi211

Texture compression supported, but not working.

Recommended Posts

I'm trying to compress some generated textures to decrease the swapping. I can get it to work fine under Windows, but not under Linux. I check for GL_ARB_texture_compression, and it's present in all cases. I'm using GL_COMPRESSED_RGBA_ARB as the internal format. Yet when I check GL_TEXTURE_COMPRESSED_ARB, it's always 1 on Windows, and always 0 on Linux, be it Ubuntu, Slax or Gentoo. Is this something in Mesa? Or is there something extra I should be doing? Edit: It looks like the Mesa software rasterizer will do it, but not any of the hardware ones (Mesa DRI R300 20060815 AGP 8x x86/MMX/SSE2 TCL (1.3 Mesa 7.4) or Mesa DRI Intel(R) 915GM 20061017 x86/MMX/SSE2 (1.3 Mesa 6.5.2) depending on which machine I'm using). So, driver issue? It wouldn't be the first time I've had a driver fib to me ;) Edit 2: Hmmm. Despite claiming GL_ARB_texture_compression, the number returned by GL_COMPRESSED_TEXTURE_FORMATS_ARB is 0. So these drivers support compression, but don't actually have any formats available? Okay, now I am confused. ;) Edit 3: It turns out the Intel chip does support compression on Linux (GL_COMPRESSED_RGB_FXT1_3DFX and GL_COMPRESSED_RGBA_FXT1_3DFX to be precise) but still refuses to use it. Agh! [Edited by - subi211 on July 20, 2009 6:29:42 AM]

Share this post


Link to post
Share on other sites
I've half-solved the problem: According to the documentation, uploading raw RGBA data with the internal format set to GL_COMPRESSED_RGBA_ARB is supposed to automatically select a suitable compression format, the ID of which you can retrieve using GL_TEXTURE_INTERNAL_FORMAT once the data is uploaded.

Under Windows, this is exactly what happens. But under Linux (except using Mesa SW), you need to specify a specific compressed format, or it doesn't work.

As to why the R300 driver claims to support compression but has no formats in the enumeration... I know the enumeration is only for "normal" formats, so there may be a format available that isn't normal. But how can I find out what it is? There's nothing that immediately leaps out at me in the extensions string. :P

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this