tgsi: remove special-case code for fragment position
authorBrian Paul <brianp@vmware.com>
Fri, 5 Feb 2010 16:42:00 +0000 (09:42 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 5 Feb 2010 17:00:00 +0000 (10:00 -0700)
Since the origin_lower_left / pixel_center_origin changes, we need
to use the fragcoord info that's set up in setup_fragcoord_coeff().
The code in exec_declaration() was clobbering the the interpolated
fragment position.

Fixes progs/glsl/fragcoord.c demo.

src/gallium/auxiliary/tgsi/tgsi_exec.c

index f7a1bb74a9d12f9858536c49dd67f84459404758..262422364bf3879c382af60bf7dc7d63158ae1af 100644 (file)
@@ -1761,13 +1761,7 @@ exec_declaration(struct tgsi_exec_machine *mach,
          last = decl->Range.Last;
          mask = decl->Declaration.UsageMask;
 
-         if (decl->Semantic.Name == TGSI_SEMANTIC_POSITION) {
-            assert(decl->Semantic.Index == 0);
-            assert(first == last);
-            assert(mask == TGSI_WRITEMASK_XYZW);
-
-            mach->Inputs[first] = mach->QuadPos;
-         } else if (decl->Semantic.Name == TGSI_SEMANTIC_FACE) {
+         if (decl->Semantic.Name == TGSI_SEMANTIC_FACE) {
             uint i;
 
             assert(decl->Semantic.Index == 0);