OSDN Git Service

mesa: fix PACK_COLOR_5551(), PACK_COLOR_1555() macros
authorBrian Paul <brianp@vmware.com>
Tue, 20 Sep 2011 00:25:38 +0000 (18:25 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 21 Sep 2011 02:17:42 +0000 (20:17 -0600)
commit4731a598f00c8a229df7b36d9a2a7505b679de1d
tree6aa743366e97d6581edf30ec181a981f1a11d106
parent4d53fb525db56d0695eaa5b91bd8f0cefbc25866
mesa: fix PACK_COLOR_5551(), PACK_COLOR_1555() macros

The 1-bit alpha channel was incorrectly encoded.  Previously, any non-zero
alpha value for the ubyte alpha value would set A=1.  Instead, use the
most significant bit of the ubyte alpha to determine the A bit.  This is
consistent with the other channels and other OpenGL implementations.

Note: This is a candidate for the 7.11 branch.

Reviewed-by: Michel Dänzer <michel@daenzer.net>
src/mesa/main/colormac.h