i965: Gen4-5: Don't enable hardware alpha test with MRT
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 26 Oct 2013 23:09:51 +0000 (12:09 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Wed, 6 Nov 2013 06:29:36 +0000 (19:29 +1300)
We have to do this in the shader instead, since these gens lack an
independent RT0 alpha value in their render target write messages.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_cc.c

index 6f85f6355cbd7dc25d62c30759dbec944afe0010..53466e714ec8bd1077562f00aeb76a9e58eb4ef7 100644 (file)
@@ -187,7 +187,8 @@ static void upload_cc_unit(struct brw_context *brw)
                                eqA != eqRGB);
    }
 
-   if (ctx->Color.AlphaEnabled) {
+   /* _NEW_BUFFERS */
+   if (ctx->Color.AlphaEnabled && ctx->DrawBuffer->_NumColorDrawBuffers <= 1) {
       cc->cc3.alpha_test = 1;
       cc->cc3.alpha_test_func =
         intel_translate_compare_func(ctx->Color.AlphaFunc);