OSDN Git Service

gallium: compare the actual register, not all the inputs
authorZack Rusin <zackr@vmware.com>
Sat, 11 Jul 2009 17:48:41 +0000 (13:48 -0400)
committerZack Rusin <zackr@vmware.com>
Sat, 11 Jul 2009 17:48:41 +0000 (13:48 -0400)
otherwise we decrement indexes for all registers

src/mesa/state_tracker/st_atom_shader.c

index 5219119..8b3bb5c 100644 (file)
@@ -139,7 +139,7 @@ find_translated_vp(struct st_context *st,
          if (fragInputsRead & (1 << inAttr)) {
             stfp->input_to_slot[inAttr] = numIn;
             numIn++;
-            if ((fragInputsRead & FRAG_BIT_FOGC)) {
+            if (((1 << inAttr) & FRAG_BIT_FOGC)) {
                /* leave placeholders for the
                 * extra registers we extract from fog */
                if (stfp->Base.UsesFrontFacing) {