diff options
author | Eric Anholt <[email protected]> | 2017-11-07 15:42:04 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2017-11-17 16:09:55 -0800 |
commit | c40ac132e4ba44f1d086112ebd27d3ec06aea8e9 (patch) | |
tree | 6248a6382c07741eede07a2d56e17b1f13c610f3 /src | |
parent | 52f3e9e43c0244751f0cf84dbe4d20ffc60de0b0 (diff) |
broadcom/vc5: Fix clear color for swap_color_rb render targets.
Fixes dEQP-GLES3.functional.depth_stencil_clear.depth.*
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc5/vc5_draw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc5/vc5_draw.c b/src/gallium/drivers/vc5/vc5_draw.c index f834207863d..c4f73f65dc4 100644 --- a/src/gallium/drivers/vc5/vc5_draw.c +++ b/src/gallium/drivers/vc5/vc5_draw.c @@ -517,6 +517,15 @@ vc5_clear(struct pipe_context *pctx, unsigned buffers, union util_color uc; uint32_t internal_size = 4 << surf->internal_bpp; + static union pipe_color_union swapped_color; + if (vc5->swap_color_rb & (1 << i)) { + swapped_color.f[0] = color->f[2]; + swapped_color.f[1] = color->f[1]; + swapped_color.f[2] = color->f[0]; + swapped_color.f[3] = color->f[3]; + color = &swapped_color; + } + switch (surf->internal_type) { case INTERNAL_TYPE_8: if (surf->format == PIPE_FORMAT_B4G4R4A4_UNORM || |