Jump to content
  • Advertisement
Sign in to follow this  
subi211

Texture compression supported, but not working.

This topic is 3429 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!