SGIS auto-mipmaps & fp textures


i want to use the SGIS_generate_mipmap functionality to get the average value of a RGBA texture. however, this seems to be VERY slow when using a floating-point texture (GL_RGBA_FLOAT16_ATI) on a 6800GT. if i do a glreadpixels() and average on the CPU, i have ~100fps, but with auto-mipmaps only 2fps (using normal 8-bit textures it’s 100fps with CPU and ~300fps with mipmaps)

is this normal or am i missing some detail?


The current Release 65 drivers do not do mipmap generation for float textures in hardware. The hardware accelerated path will be implemented in a future driver release.

Originally posted by demonoid:
using normal 8-bit textures it’s 100fps with CPU and ~300fps with mipmaps

How can you use mippmapping to do this so fast? Can you somehow just read last LOD level (1x1)?

so the GPU is actually capable of mipmapping floating-points but disabled by drivers? not nice.
can the hardware do mipmapping on both 16-bit and 32-bit floats, or just 16?

yes - instead of reading the whole texture (256x256) to the system ram (glreadpixels()) i use glcopytexsubimage2d() to get the stuff into a texture object with auto mipmaps, then i glgetteximage2d() just the 2x2 mipmap (the 1x1 seems to always be black - i dont know if that changed with newer drivers). although this is much faster, be aware that it’s not too accurate, as you’re repeatedly averaging on 8bit numbers (the GPU seems to always round up to the next higher value - again, might have changed with drivers) and thus get considerable rounding errors.