swrast: When reading from a 0-bits r,g,b channel, return 0 not 1.
authorEric Anholt <eric@anholt.net>
Thu, 10 Jun 2010 07:15:48 +0000 (00:15 -0700)
committerEric Anholt <eric@anholt.net>
Thu, 10 Jun 2010 07:22:00 +0000 (00:22 -0700)
commitceba688cb54016a9f6ff70761b2c459698bfd7f0
tree885aaae8993d7198dc6a0e0c09b323ed4e1f6a10
parent94731797c671d6e46e3e0c94c1a0cec5071c0ac3
swrast: When reading from a 0-bits r,g,b channel, return 0 not 1.

It looks like we were reading a fractional value, multiplying by an
enormous negative value, then stuffing that value into a bitfield
assuming it was already clamped.  This becomes relevant for GL_ALPHA
or R/RG FBOs.
src/mesa/swrast/s_readpix.c