diff options
author | Roland Scheidegger <[email protected]> | 2013-01-10 18:10:20 -0800 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2013-01-10 18:10:20 -0800 |
commit | babab2876080af0fe65249dff559244aebd0b87e (patch) | |
tree | f4d44a31ed1a35ba76001c57695947985daa9f1e /src/gallium/auxiliary | |
parent | 5785f22d230bc7249dfcd91bbbaa4e77816128e4 (diff) |
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
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_pack_color.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h index 50ec226d887..6c6d9669cbd 100644 --- a/src/gallium/auxiliary/util/u_pack_color.h +++ b/src/gallium/auxiliary/util/u_pack_color.h @@ -329,6 +329,8 @@ util_unpack_color_ub(enum pipe_format format, union util_color *uc, /** * Note rgba outside [0,1] will be clamped for int pixel formats. + * This will not work (and might not really be useful with float input) + * for pure integer formats (which lack the pack_rgba_float function). */ static INLINE void util_pack_color(const float rgba[4], enum pipe_format format, union util_color *uc) |