aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_clear.c
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2014-04-23 20:00:03 +0200
committerRoland Scheidegger <[email protected]>2014-04-25 19:29:30 +0200
commitfa4082320acaf0a1a22ae56144eef94b2997818d (patch)
tree3b18c83012d42ce24c248e23e4ee3cf239c6153c /src/gallium/drivers/i915/i915_clear.c
parent2f65f61beac3a45fdf27bf25d7b13cd1fa2bbb8c (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/i915/i915_clear.c')
-rw-r--r--src/gallium/drivers/i915/i915_clear.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915/i915_clear.c b/src/gallium/drivers/i915/i915_clear.c
index b17707f3f64..57244a65bb5 100644
--- a/src/gallium/drivers/i915/i915_clear.c
+++ b/src/gallium/drivers/i915/i915_clear.c
@@ -66,10 +66,10 @@ i915_clear_emit(struct pipe_context *pipe, unsigned buffers,
util_pack_color(color->f, cbuf->format, &u_color);
if (util_format_get_blocksize(cbuf_tex->b.b.format) == 4) {
- clear_color = u_color.ui;
+ clear_color = u_color.ui[0];
color_clear_bbp = 32;
} else {
- clear_color = (u_color.ui & 0xffff) | (u_color.ui << 16);
+ clear_color = (u_color.ui[0] & 0xffff) | (u_color.ui[0] << 16);
color_clear_bbp = 16;
}
@@ -78,7 +78,7 @@ i915_clear_emit(struct pipe_context *pipe, unsigned buffers,
util_pack_color(color->f, cbuf->format, &u_color);
else
util_pack_color(color->f, PIPE_FORMAT_B8G8R8A8_UNORM, &u_color);
- clear_color8888 = u_color.ui;
+ clear_color8888 = u_color.ui[0];
} else
clear_color = clear_color8888 = 0;