From: Marek Olšák Date: Thu, 24 Mar 2011 22:35:16 +0000 (+0100) Subject: r300g: fix alpha-test with no colorbuffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=226ae9d6c8f282de788404b4d98af7ddf8ee30f4;p=mesa.git r300g: fix alpha-test with no colorbuffer Piglit: - fbo-alphatest-nocolor NOTE: This is a candidate for the stable branches. --- diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index e17a907e77e..3b79b36221d 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -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); }