i965g: apply linear math to both linear and perspective attrs
authorKeith Whitwell <keithw@vmware.com>
Mon, 23 Nov 2009 00:58:13 +0000 (00:58 +0000)
committerKeith Whitwell <keithw@vmware.com>
Mon, 23 Nov 2009 00:58:13 +0000 (00:58 +0000)
src/gallium/drivers/i965/brw_sf.c
src/gallium/drivers/i965/brw_sf_emit.c

index a28fb71589fc9e2fd48ca06840e1b958f00f218f..e1986a9dbbd4c47890e8e7adf74484eb3aec634c 100644 (file)
@@ -153,10 +153,9 @@ static enum pipe_error upload_sf_prog(struct brw_context *brw)
       case TGSI_INTERPOLATE_CONSTANT:
          break;
       case TGSI_INTERPOLATE_LINEAR:
-      case TGSI_INTERPOLATE_PERSPECTIVE:
          key.linear_attrs |= 1 << (i+1);
          break;
-//      case TGSI_INTERPOLATE_PERSPECTIVE:
+      case TGSI_INTERPOLATE_PERSPECTIVE:
          key.persp_attrs |= 1 << (i+1);
          break;
       }
index 2983e8a9dd4a3aab1b9260dbe9279a37e8323696..3b85725e368e4ee76b4d06225f73c8166d0e7d98 100644 (file)
@@ -324,7 +324,7 @@ static GLboolean calculate_masks( struct brw_sf_compile *c,
 {
    GLboolean is_last_attr = (reg == c->nr_setup_regs - 1);
    GLuint persp_mask = c->key.persp_attrs;
-   GLuint linear_mask = c->key.linear_attrs;
+   GLuint linear_mask = (c->key.persp_attrs | c->key.linear_attrs);
 
    *pc_persp = 0;
    *pc_linear = 0;