From c0561808c0442a10a47707cfc9f002e195316552 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 5 Oct 2017 15:40:18 -0700 Subject: broadcom/vc5: Set up per-MRT clear colors. Fixes fbo-mrt-alphatest. --- src/gallium/drivers/vc5/vc5_rcl.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/gallium/drivers/vc5/vc5_rcl.c') diff --git a/src/gallium/drivers/vc5/vc5_rcl.c b/src/gallium/drivers/vc5/vc5_rcl.c index ebc77dcce06..83b383acd1a 100644 --- a/src/gallium/drivers/vc5/vc5_rcl.c +++ b/src/gallium/drivers/vc5/vc5_rcl.c @@ -147,6 +147,13 @@ vc5_emit_rcl(struct vc5_job *job) if (job->resolve & PIPE_CLEAR_COLOR0 << i) rsc->writes++; } + + cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART1, + clear) { + clear.clear_color_low_32_bits = job->clear_color[i][0]; + clear.clear_color_next_24_bits = job->clear_color[i][1] & 0xffffff; + clear.render_target_number = i; + }; } /* TODO: Don't bother emitting if we don't load/clear Z/S. */ @@ -174,11 +181,6 @@ vc5_emit_rcl(struct vc5_job *job) rsc->writes++; } - cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_CLEAR_COLORS_PART1, - clear) { - clear.clear_color_low_32_bits = job->clear_color[0]; - }; - /* Ends rendering mode config. */ cl_emit(&job->rcl, TILE_RENDERING_MODE_CONFIGURATION_Z_STENCIL_CLEAR_VALUES, clear) { -- cgit v1.2.3