OSDN Git Service

meta: fix GetTexImage() for luminance, l/a, intensity formats
authorBrian Paul <brianp@vmware.com>
Fri, 30 Sep 2011 14:15:30 +0000 (08:15 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 30 Sep 2011 14:16:34 +0000 (08:16 -0600)
commita8ca786ba69f6af0120a24f473b2ae7e6a41495d
tree2909eca9a45a420af02ecd0a4c1b63adf216f949
parent57169c469406f1880107a6b9f052708ce078942d
meta: fix GetTexImage() for luminance, l/a, intensity formats

The GL spec says that luminance values are returned as (l, 0, 0, 1),
L/A values as (l, 0, 0, a) and intensity values as (i, 0, 0, 1).
Use the pixel transfer scale controls to implement that.
This fixes a few failures in the new piglit getteximage-formats
test when getting a compressed L or L/A image.
src/mesa/drivers/common/meta.c
src/mesa/main/pixel.c
src/mesa/main/pixel.h