Mesa (master): nvc0: fix PointCoord enable in FP header

Christoph Bumiller chrisbmr at kemper.freedesktop.org
Thu Feb 24 16:36:25 UTC 2011


Module: Mesa
Branch: master
Commit: 11b9f4439c56045a8f718e483844135dd9fbcb58
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=11b9f4439c56045a8f718e483844135dd9fbcb58

Author: Christoph Bumiller <e0425955 at student.tuwien.ac.at>
Date:   Wed Feb 23 14:54:25 2011 +0100

nvc0: fix PointCoord enable in FP header

---

 src/gallium/drivers/nvc0/nvc0_program.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/nvc0/nvc0_program.c b/src/gallium/drivers/nvc0/nvc0_program.c
index 0685a84..899fe14 100644
--- a/src/gallium/drivers/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nvc0/nvc0_program.c
@@ -535,8 +535,11 @@ nvc0_fp_gen_header(struct nvc0_program *fp, struct nvc0_translation_info *ti)
          a = ti->input_loc[i][c] / 2;
          if (ti->input_loc[i][c] >= 0x2c0)
             a -= 32;
-         if ((a & ~7) == 0x70/2)
-            fp->hdr[5] |= 1 << (28 + (a & 7) / 2); /* FRAG_COORD_UMASK */
+         if (ti->input_loc[i][0] == 0x70)
+            fp->hdr[5] |= 1 << (28 + c); /* FRAG_COORD_UMASK */
+         else
+         if (ti->input_loc[i][0] == 0x2e0)
+            fp->hdr[14] |= 1 << (24 + c); /* POINT_COORD */
          else
             fp->hdr[4 + a / 32] |= m << (a % 32);
       }




More information about the mesa-commit mailing list