Mesa (7.10): r300g: fix alpha-test with no colorbuffer

Marek Olšák mareko at kemper.freedesktop.org
Thu Mar 24 22:50:04 UTC 2011


Module: Mesa
Branch: 7.10
Commit: d464f5908f29a6cf893f4869dc92c3ecdd6260b8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d464f5908f29a6cf893f4869dc92c3ecdd6260b8

Author: Marek Olšák <maraeo at gmail.com>
Date:   Thu Mar 24 23:35:16 2011 +0100

r300g: fix alpha-test with no colorbuffer

Piglit:
- fbo-alphatest-nocolor

NOTE: This is a candidate for the stable branches.
(cherry picked from commit 226ae9d6c8f282de788404b4d98af7ddf8ee30f4)

---

 src/gallium/drivers/r300/r300_emit.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 04a5bd9..972f58f 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -494,6 +494,11 @@ void r300_emit_fb_state_pipelined(struct r300_context *r300,
     for (i = 0; i < fb->nr_cbufs; i++) {
         OUT_CS(r300_surface(fb->cbufs[i])->format);
     }
+    for (; i < 1; i++) {
+        OUT_CS(R300_US_OUT_FMT_C4_8 |
+               R300_C0_SEL_B | R300_C1_SEL_G |
+               R300_C2_SEL_R | R300_C3_SEL_A);
+    }
     for (; i < 4; i++) {
         OUT_CS(R300_US_OUT_FMT_UNUSED);
     }




More information about the mesa-commit mailing list