summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/evergreen_state.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2012-04-27 09:38:46 +0100
committerDave Airlie <[email protected]>2012-05-12 08:25:21 +0100
commit31a25dac98ea20ba853128f98987c6358d8e0598 (patch)
treeb4018bddd143a950c370438ab198f597a5508c7f /src/gallium/drivers/r600/evergreen_state.c
parente253ead78e65a64b606e8f46cdceec2689aaf9f4 (diff)
r600g: setup COLOR1 for possible dual-src in the framebuffer bind
As pointed out by Marek, if we have only one cb, we may as well add this single register write here rather than adding it in the draw loop. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r--src/gallium/drivers/r600/evergreen_state.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 81aedb5c0ac..1bc9d00801f 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -1461,8 +1461,12 @@ static void evergreen_cb(struct r600_context *rctx, struct r600_pipe_state *rsta
}
rctx->alpha_ref_dirty = true;
- if (cb == 0)
- rctx->color0_format = color_info;
+ /* for possible dual-src MRT */
+ if (cb == 0 && rctx->framebuffer.nr_cbufs == 1) {
+ r600_pipe_state_add_reg_bo(rstate,
+ R_028C70_CB_COLOR0_INFO + 1 * 0x3C,
+ color_info, &rtex->resource, RADEON_USAGE_READWRITE);
+ }
offset += r600_resource_va(rctx->context.screen, state->cbufs[cb]->texture);
offset >>= 8;