i965: SF: Stop using nr_setup_attrs in compute_masks.
authorPaul Berry <stereotype441@gmail.com>
Thu, 25 Aug 2011 01:57:32 +0000 (18:57 -0700)
committerPaul Berry <stereotype441@gmail.com>
Tue, 6 Sep 2011 18:04:50 +0000 (11:04 -0700)
Previously, the SF used nr_setup_attrs to determine whether it was
looking at the last element of the VUE.  Changed this code to use the
VUE map.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_sf_emit.c

index 0532d4ee468257d074c97e1048a2854b0efaed2c..532d327293444748a21330bc1473708b89ab0f58 100644 (file)
@@ -358,7 +358,7 @@ static GLboolean calculate_masks( struct brw_sf_compile *c,
 
    /* Maybe only processs one attribute on the final round:
     */
-   if (reg*2+1 < c->nr_setup_attrs) {
+   if (vert_reg_to_vert_result(c, reg, 1) != BRW_VERT_RESULT_MAX) {
       *pc |= 0xf0;
 
       if (persp_mask & BITFIELD64_BIT(vert_reg_to_vert_result(c, reg, 1)))