diff options
author | Marek Olšák <[email protected]> | 2010-06-12 21:56:37 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-06-13 17:43:38 +0200 |
commit | 7d5230ce90b5271b440da81c64ef20cdcb61491d (patch) | |
tree | b5f90a6a8d7f55aa6fc40557f2c1e5d01409d85a | |
parent | ea0ec0b48e5adc0b71e52cd298fd71193ffd4a54 (diff) |
r300g: fix multiple render targets
This fixes tests/drawbuffers.
-rw-r--r-- | src/gallium/drivers/r300/r300_emit.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index dd9bca88f10..13ea7fdad17 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -464,18 +464,13 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state) R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE | R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE); - /* Set the number of colorbuffers. */ - if (fb->nr_cbufs > 1) { - if (r300->screen->caps.is_r500) { - OUT_CS_REG(R300_RB3D_CCTL, - R300_RB3D_CCTL_NUM_MULTIWRITES(fb->nr_cbufs) | - R300_RB3D_CCTL_INDEPENDENT_COLORFORMAT_ENABLE_ENABLE); - } else { - OUT_CS_REG(R300_RB3D_CCTL, - R300_RB3D_CCTL_NUM_MULTIWRITES(fb->nr_cbufs)); - } + /* NUM_MULTIWRITES replicates COLOR[0] to all colorbuffers, which is not + * what we usually want. */ + if (r300->screen->caps.is_r500) { + OUT_CS_REG(R300_RB3D_CCTL, + R300_RB3D_CCTL_INDEPENDENT_COLORFORMAT_ENABLE_ENABLE); } else { - OUT_CS_REG(R300_RB3D_CCTL, 0x0); + OUT_CS_REG(R300_RB3D_CCTL, 0); } /* Set up colorbuffers. */ |