summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_emit.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2011-01-06 19:02:12 +0100
committerMarek Olšák <maraeo@gmail.com>2011-01-06 19:05:31 +0100
commitc60f1d8b007625f62a53010bb75e70462eb970ae (patch)
tree3085a9bc26af9e7a71382d4e4329ec1b4289254f /src/gallium/drivers/r300/r300_emit.c
parent6125cbe983b267846afb8f1e487d378bdf7a189c (diff)
downloadexternal_mesa3d-c60f1d8b007625f62a53010bb75e70462eb970ae.zip
external_mesa3d-c60f1d8b007625f62a53010bb75e70462eb970ae.tar.gz
external_mesa3d-c60f1d8b007625f62a53010bb75e70462eb970ae.tar.bz2
r300g: fix corruption when nr_cbufs==0 and multiwrites enabled
https://bugs.freedesktop.org/show_bug.cgi?id=32634
Diffstat (limited to 'src/gallium/drivers/r300/r300_emit.c')
-rw-r--r--src/gallium/drivers/r300/r300_emit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index e1a3714..f5e9f73 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -380,7 +380,8 @@ void r300_emit_fb_state(struct r300_context* r300, unsigned size, void* state)
if (r300->screen->caps.is_r500) {
rb3d_cctl = R300_RB3D_CCTL_INDEPENDENT_COLORFORMAT_ENABLE_ENABLE;
}
- if (r300_fragment_shader_writes_all(r300_fs(r300))) {
+ if (fb->nr_cbufs &&
+ r300_fragment_shader_writes_all(r300_fs(r300))) {
rb3d_cctl |= R300_RB3D_CCTL_NUM_MULTIWRITES(fb->nr_cbufs);
}