diff options
author | Roland Scheidegger <[email protected]> | 2014-04-23 20:00:03 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2014-04-25 19:29:30 +0200 |
commit | fa4082320acaf0a1a22ae56144eef94b2997818d (patch) | |
tree | 3b18c83012d42ce24c248e23e4ee3cf239c6153c /src/gallium/drivers/r300/r300_blit.c | |
parent | 2f65f61beac3a45fdf27bf25d7b13cd1fa2bbb8c (diff) |
gallium/util: use ui[4] instead of ui in union util_color
util_color often merely represents a collection of bytes, however it is
inconvenient if those bytes can only be accessed as floats/doubles for int
formats exceeding 32bits.
(Note that since rgba8 formats use one uint, not 4 bytes, hence the byte and
short member were left as is.)
Diffstat (limited to 'src/gallium/drivers/r300/r300_blit.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_blit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_blit.c b/src/gallium/drivers/r300/r300_blit.c index 05e55f3665e..2b516d284d1 100644 --- a/src/gallium/drivers/r300/r300_blit.c +++ b/src/gallium/drivers/r300/r300_blit.c @@ -118,7 +118,7 @@ static uint32_t r300_depth_clear_cb_value(enum pipe_format format, util_pack_color(rgba, format, &uc); if (util_format_get_blocksizebits(format) == 32) - return uc.ui; + return uc.ui[0]; else return uc.us | (uc.us << 16); } @@ -193,7 +193,7 @@ static void r300_set_clear_color(struct r300_context *r300, r300->color_clear_value_gb = uc.h[0] | ((uint32_t)uc.h[1] << 16); r300->color_clear_value_ar = uc.h[2] | ((uint32_t)uc.h[3] << 16); } else { - r300->color_clear_value = uc.ui; + r300->color_clear_value = uc.ui[0]; } } |