r300g: fix alpha-test with no colorbuffer
authorMarek Olšák <maraeo@gmail.com>
Thu, 24 Mar 2011 22:35:16 +0000 (23:35 +0100)
committerMarek Olšák <maraeo@gmail.com>
Thu, 24 Mar 2011 22:37:51 +0000 (23:37 +0100)
Piglit:
- fbo-alphatest-nocolor

NOTE: This is a candidate for the stable branches.

src/gallium/drivers/r300/r300_emit.c

index e17a907e77e0c2816d842c3e476a04c8a2678c0f..3b79b36221d2afee0dff09e754d5d1ba50ed2940 100644 (file)
@@ -495,6 +495,11 @@ void r300_emit_fb_state_pipelined(struct r300_context *r300,
     for (i = 0; i < num_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);
     }