summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2010-02-09 13:53:30 -0800
committerCorbin Simpson <[email protected]>2010-02-09 13:53:30 -0800
commit8c85002951e29462a7c2852b4b59fe0d438da137 (patch)
tree41f9f39d8b4808dac5746738788d2a07fa494497 /src/gallium
parent67b60b99348f50ead92e617a5085422da9d8c022 (diff)
r300g: Don't write non-existent bit on non-r500.
Might help with compiz being funky with MRTs.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index ae83511a856..de6ba651d14 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -381,6 +381,7 @@ void r500_emit_fs_constant_buffer(struct r300_context* r300,
void r300_emit_fb_state(struct r300_context* r300, void* state)
{
struct pipe_framebuffer_state* fb = (struct pipe_framebuffer_state*)state;
+ struct r300_screen* r300screen = r300_screen(r300->context.screen);
struct r300_texture* tex;
struct pipe_surface* surf;
int i;
@@ -399,10 +400,16 @@ void r300_emit_fb_state(struct r300_context* r300, void* state)
/* Set the number of colorbuffers. */
if (fb->nr_cbufs > 1) {
- OUT_CS_REG(R300_RB3D_CCTL,
- R300_RB3D_CCTL_NUM_MULTIWRITES(fb->nr_cbufs) |
- R300_RB3D_CCTL_INDEPENDENT_COLOR_CHANNEL_MASK_ENABLE |
- R300_RB3D_CCTL_INDEPENDENT_COLORFORMAT_ENABLE_ENABLE);
+ if (r300screen->caps->is_r500) {
+ OUT_CS_REG(R300_RB3D_CCTL,
+ R300_RB3D_CCTL_NUM_MULTIWRITES(fb->nr_cbufs) |
+ R300_RB3D_CCTL_INDEPENDENT_COLORFORMAT_ENABLE_ENABLE |
+ R300_RB3D_CCTL_INDEPENDENT_COLOR_CHANNEL_MASK_ENABLE);
+ } else {
+ 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, 0x0);
}