llvmpipe: fix clearing integer color buffers
authorRoland Scheidegger <sroland@vmware.com>
Fri, 11 Jan 2013 02:10:20 +0000 (18:10 -0800)
committerRoland Scheidegger <sroland@vmware.com>
Fri, 11 Jan 2013 02:10:20 +0000 (18:10 -0800)
commitbabab2876080af0fe65249dff559244aebd0b87e
treef4d44a31ed1a35ba76001c57695947985daa9f1e
parent5785f22d230bc7249dfcd91bbbaa4e77816128e4
llvmpipe: fix clearing integer color buffers

We get int/uint clear color value in this case, and util_pack_color can't
handle these formats at all (even if it could, float input color isn't what
we want).
Pass through the color union appropriately and handle the packing ourselves
(as I couldn't think of a good generic util solution).
This gets piglit fbo_integer_precision_clear and
fbo_integer_readpixels_sint_uint from the ext_texture_integer test group from
segfault to pass (which only leaves fbo-blending from that group not working).

v2: fix up comments
src/gallium/auxiliary/util/u_pack_color.h
src/gallium/drivers/llvmpipe/lp_clear.c
src/gallium/drivers/llvmpipe/lp_rast.c
src/gallium/drivers/llvmpipe/lp_rast.h
src/gallium/drivers/llvmpipe/lp_setup.c
src/gallium/drivers/llvmpipe/lp_setup.h