r600g: take alpha ref update out of line.
authorDave Airlie <airlied@redhat.com>
Tue, 7 Jun 2011 05:39:29 +0000 (15:39 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 8 Jun 2011 01:47:00 +0000 (11:47 +1000)
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_state_common.c

index 0928d964dc253959f4bf2504357086e4929cda1b..a670ac02be290cda36f1cb90c1cbc8a3de2b1702 100644 (file)
@@ -318,12 +318,10 @@ void r600_delete_vs_shader(struct pipe_context *ctx, void *state)
 
 static void r600_update_alpha_ref(struct r600_pipe_context *rctx)
 {
-       unsigned alpha_ref = rctx->alpha_ref;
+       unsigned alpha_ref;
        struct r600_pipe_state rstate;
 
-       if (!rctx->alpha_ref_dirty)
-               return;
-
+       alpha_ref = rctx->alpha_ref;
        rstate.nregs = 0;
        if (rctx->export_16bpc)
                alpha_ref &= ~0x1FFF;
@@ -595,7 +593,8 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
                return;
        }
 
-       r600_update_alpha_ref(rctx);
+       if (rctx->alpha_ref_dirty)
+               r600_update_alpha_ref(rctx);
 
        mask = 0;
        for (int i = 0; i < rctx->framebuffer.nr_cbufs; i++) {