nir/prog: Don't double-insert the fog-coord variable
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Oct 2015 16:20:24 +0000 (09:20 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 15 Oct 2015 17:48:21 +0000 (10:48 -0700)
nir_variable_create already inserts it in the right list for us so
inserting it again causes a linked list corruption.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/program/prog_to_nir.c

index fe8c238b15934fb069d352f1206d258380cd7934..da61a2b9bd326e99cc1ec31b09590fef06bb5d9e 100644 (file)
@@ -1001,11 +1001,10 @@ setup_registers_and_variables(struct ptn_compile *c)
             store->src[0] = nir_src_for_ssa(f001);
             nir_builder_instr_insert(b, &store->instr);
 
-            /* Insert the real input into the list so the driver has real
-             * inputs, but set c->input_vars[i] to the temporary so we use
+            /* We inserted the real input into the list so the driver has real
+             * inputs, but we set c->input_vars[i] to the temporary so we use
              * the splatted value.
              */
-            exec_list_push_tail(&shader->inputs, &var->node);
             c->input_vars[i] = fullvar;
             continue;
          }