softpipe: implement blend color clamping
authorBrian Paul <brianp@vmware.com>
Wed, 14 Sep 2011 14:15:14 +0000 (08:15 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 14 Sep 2011 14:15:59 +0000 (08:15 -0600)
commitec22b75be1c57f991f48bf6cc1d4b910911e8bf2
tree452e1c4c36630428075b61c2910a52a9903b98f9
parent4fc50d457065b974a7cfc3e63ab2a6da77490559
softpipe: implement blend color clamping

Per the GL spec, clamp incoming colors prior to blending depending on
whether the destination buffer stores normalized (non-float) values.
Note that the constant blend color needs to be clamped too (we always
get the unclamped color from Mesa).

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=40412
src/gallium/drivers/softpipe/sp_context.h
src/gallium/drivers/softpipe/sp_quad_blend.c
src/gallium/drivers/softpipe/sp_state_blend.c