Mesa (i965g-restart): i965g: apply linear math to both linear and perspective attrs

Keith Whitwell keithw at kemper.freedesktop.org
Mon Nov 23 03:10:21 UTC 2009


Module: Mesa
Branch: i965g-restart
Commit: 21172d4358be5cce3bda244b33e3728a5fde3751
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=21172d4358be5cce3bda244b33e3728a5fde3751

Author: Keith Whitwell <keithw at vmware.com>
Date:   Mon Nov 23 00:58:13 2009 +0000

i965g: apply linear math to both linear and perspective attrs

---

 src/gallium/drivers/i965/brw_sf.c      |    3 +--
 src/gallium/drivers/i965/brw_sf_emit.c |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/i965/brw_sf.c b/src/gallium/drivers/i965/brw_sf.c
index a28fb71..e1986a9 100644
--- a/src/gallium/drivers/i965/brw_sf.c
+++ b/src/gallium/drivers/i965/brw_sf.c
@@ -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;
       }
diff --git a/src/gallium/drivers/i965/brw_sf_emit.c b/src/gallium/drivers/i965/brw_sf_emit.c
index 2983e8a..3b85725 100644
--- a/src/gallium/drivers/i965/brw_sf_emit.c
+++ b/src/gallium/drivers/i965/brw_sf_emit.c
@@ -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;




More information about the mesa-commit mailing list