nvc0: fix PointCoord enable in FP header
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Wed, 23 Feb 2011 13:54:25 +0000 (14:54 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 24 Feb 2011 16:35:36 +0000 (17:35 +0100)
src/gallium/drivers/nvc0/nvc0_program.c

index 0685a842304ec73e5256e7130766092960882d56..899fe147c6a3c82d90634aeaefad724533b22244 100644 (file)
@@ -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);
       }