diff options
author | Eric Anholt <[email protected]> | 2015-01-11 10:58:58 +1300 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-01-11 17:17:19 +1300 |
commit | c1226629846613f9442e5fc5ad9be305176a4f0f (patch) | |
tree | b7ff07f7a7be8f706fc5625dae0a31953db91ebb /src/gallium | |
parent | 355156d2f75ffb5fae90dd6583ae3cf465ba40b4 (diff) |
vc4: Fix clear color setup for RGB565.
The util_pack_color() thing only sets up the low bits of the union, so
only return them, too. Fixes intermittent failure on
fbo-alphatest-formats and es3conform's framebuffer-objects test under
simulation.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_draw.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_draw.c b/src/gallium/drivers/vc4/vc4_draw.c index bb4b9a42217..3a6d6254a1b 100644 --- a/src/gallium/drivers/vc4/vc4_draw.c +++ b/src/gallium/drivers/vc4/vc4_draw.c @@ -288,7 +288,10 @@ pack_rgba(enum pipe_format format, const float *rgba) { union util_color uc; util_pack_color(rgba, format, &uc); - return uc.ui[0]; + if (util_format_get_blocksize(format) == 2) + return uc.us; + else + return uc.ui[0]; } static void |