summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2009-12-14 05:47:54 +0100
committerCorbin Simpson <[email protected]>2009-12-15 19:04:46 -0800
commitcf85bf9cd0c168caed6210a896df285c3d86db03 (patch)
tree97df62e03d0b594435784f46293f7b936ce1d6e8 /src/gallium/drivers/r300/r300_emit.c
parentde0befc4b2e3061f865a5b39295d64a8f003e9e8 (diff)
r300g: set the number of colorbuffers in RB3D_CCTL
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index f784e1fa8e5..9644efb7174 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -335,7 +335,7 @@ void r300_emit_fb_state(struct r300_context* r300,
assert(fb->nr_cbufs <= 4);
BEGIN_CS((10 * fb->nr_cbufs) + (2 * (4 - fb->nr_cbufs)) +
- (fb->zsbuf ? 10 : 0) + 4);
+ (fb->zsbuf ? 10 : 0) + 6);
/* Flush and free renderbuffer caches. */
OUT_CS_REG(R300_RB3D_DSTCACHE_CTLSTAT,
@@ -345,6 +345,9 @@ void r300_emit_fb_state(struct r300_context* r300,
R300_ZB_ZCACHE_CTLSTAT_ZC_FLUSH_FLUSH_AND_FREE |
R300_ZB_ZCACHE_CTLSTAT_ZC_FREE_FREE);
+ /* Set the number of colorbuffers. */
+ OUT_CS_REG(R300_RB3D_CCTL, R300_RB3D_CCTL_NUM_MULTIWRITES(fb->nr_cbufs));
+
/* Set up colorbuffers. */
for (i = 0; i < fb->nr_cbufs; i++) {
surf = fb->cbufs[i];