aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-10-15 09:20:24 -0700
committerJason Ekstrand <[email protected]>2015-10-15 10:48:21 -0700
commit5f106153f55219d5092f9ba7c019316ea69baef4 (patch)
treea59c240cce63b0fda055381435a62d0174ac9d18 /src
parentb705005584730cff75f5bbe057832d8b1106124a (diff)
nir/prog: Don't double-insert the fog-coord variable
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/program/prog_to_nir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index fe8c238b159..da61a2b9bd3 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -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;
}