[Mesa-dev] Bug in _mesa_meta_GenerateMipmap

Maciej Cencora m.cencora at gmail.com
Sun Jul 11 08:06:14 PDT 2010


Hi,

while working on failing piglit tests I've stumbled on a problem with 
_mesa_meta_GenerateMipmap. The function creates new texture images for lower 
mipmap levels, but during call to glTexImage the format and type are hardcoded 
to GL_RGBA and GL_UNSIGNED_BYTE respectivily. And that's where the problem 
arise because base image (the one that other levels are generated from) could 
have other format and type specified (in failing test texturing/gen-teximage 
these are GL_RGBA, GL_FLOAT).
The result is that for base image MESA_FORMAT_ARGB8888 is chosen and for next 
levels it's MESA_FORMAT_RGBA8888_REV. Of course such texture with images of 
different formats is invalid and will be missampled by GPU.

As the fix is not straightforward for me (not sure where to get format and type 
from, since the gl_texture_image doesn't hold them) could someone more 
familiar with core mesa take a look at this?

Regards,
Maciej Cencora


More information about the mesa-dev mailing list