diff options
author | Eric Anholt <[email protected]> | 2018-03-27 22:02:17 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-03-28 17:48:41 -0700 |
commit | 1fe4c748f743d003fc9052f4a7d0925ab8c5919e (patch) | |
tree | affa9188adc734af850a779a8778c6e31bd76650 /src/gallium/drivers/vc5/vc5_draw.c | |
parent | 123ee3762722e2703459cc9b966b8cbf64a63769 (diff) |
broadcom/vc5: Fix setup of integer surface clear values.
I'm disappointed that the compiler didn't warn me about use of
uninitialized uc in these paths. Just use the incoming clear color
instead of the packing temporary if we're doing our own packing.
Fixes GTF-GLES3.gtf.GL3Tests.color_buffer_float.color_buffer_float_clamp_*
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_draw.c')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_draw.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/vc5/vc5_draw.c b/src/gallium/drivers/vc5/vc5_draw.c index 841c991d205..ff14d1c1358 100644 --- a/src/gallium/drivers/vc5/vc5_draw.c +++ b/src/gallium/drivers/vc5/vc5_draw.c @@ -633,10 +633,10 @@ vc5_clear(struct pipe_context *pctx, unsigned buffers, break; case V3D_INTERNAL_TYPE_8I: case V3D_INTERNAL_TYPE_8UI: - job->clear_color[i][0] = ((uc.ui[0] & 0xff) | - (uc.ui[1] & 0xff) << 8 | - (uc.ui[2] & 0xff) << 16 | - (uc.ui[3] & 0xff) << 24); + job->clear_color[i][0] = ((color->ui[0] & 0xff) | + (color->ui[1] & 0xff) << 8 | + (color->ui[2] & 0xff) << 16 | + (color->ui[3] & 0xff) << 24); break; case V3D_INTERNAL_TYPE_16F: util_pack_color(color->f, PIPE_FORMAT_R16G16B16A16_FLOAT, @@ -645,10 +645,10 @@ vc5_clear(struct pipe_context *pctx, unsigned buffers, break; case V3D_INTERNAL_TYPE_16I: case V3D_INTERNAL_TYPE_16UI: - job->clear_color[i][0] = ((uc.ui[0] & 0xffff) | - uc.ui[1] << 16); - job->clear_color[i][1] = ((uc.ui[2] & 0xffff) | - uc.ui[3] << 16); + job->clear_color[i][0] = ((color->ui[0] & 0xffff) | + color->ui[1] << 16); + job->clear_color[i][1] = ((color->ui[2] & 0xffff) | + color->ui[3] << 16); break; case V3D_INTERNAL_TYPE_32F: case V3D_INTERNAL_TYPE_32I: |