mesa: Move OES_read_format support from drivers into the core.
authorEric Anholt <eric@anholt.net>
Wed, 9 Dec 2009 18:08:07 +0000 (10:08 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 9 Dec 2009 18:37:36 +0000 (10:37 -0800)
commitcd6b8dd9e82fedc55d033131fbc0f8ee950567c8
treec9ac30b607861e22e77d8b0f526fc8c615d5a2a1
parentdd9eb8774ad7918187afebf8cd3be6f4b80f0f3b
mesa: Move OES_read_format support from drivers into the core.

The assertion is that the correct read type to be using is the native
type of the underlying read renderbuffer.  For some fallback paths, this
may be worse than GL_RGBA/GL_UNSIGNED_BYTE for reads today, but it gets
all drivers the expected GL_BGRA/GL_UNSIGNED_BYTE for ARGB8888 or
GL_BGR//GL_UNSIGNED_SHORT_5_6_5_REV for rgb565 with no work.

This fixes the intel (and other) DRI drivers to report read formats that
should hit blit PBO readpixels paths.
src/mesa/main/context.c
src/mesa/main/framebuffer.c
src/mesa/main/framebuffer.h
src/mesa/main/get.c
src/mesa/main/get_gen.py
src/mesa/main/mtypes.h
src/mesa/sources.mak
src/mesa/state_tracker/st_cb_get.c [deleted file]
src/mesa/state_tracker/st_cb_get.h [deleted file]
src/mesa/state_tracker/st_context.c