OSDN Git Service

osmesa: fix renderbuffer format selection
authorBrian Paul <brianp@vmware.com>
Fri, 13 Jan 2012 15:31:26 +0000 (08:31 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 13 Jan 2012 16:50:33 +0000 (09:50 -0700)
commit540a8b2cfdedbf5a635f33c720aa795fae74e08b
tree37d07cd81ebd858da0a75d2dabcf56b19780bad2
parent0c14bbbc8634f516d75a06e2a52d11d674e41170
osmesa: fix renderbuffer format selection

The gl_renderbuffer::Format field wasn't always set properly.  This
didn't matter much in the past but with the recent swrast/renderbuffer
mapping changes, core Mesa will be directly touching OSMesa colorbuffers
so using the right MESA_FORMAT_x value is important.

Unfortunately, there aren't MESA_FORMATs for all the possible OSmesa
format/type combinations, such as GL_FLOAT / OSMESA_ARGB.  If anyone
runs into these we can add new Mesa formats.

v2: add warnings for unsupported formats, fix ARGB_REV mix-up.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/drivers/osmesa/osmesa.c