summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_program.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2015-07-29 17:16:26 -0700
committerEric Anholt <[email protected]>2015-07-30 15:47:12 -0700
commit27f728cdc5d90f63839fbeb1942e6f27339b102a (patch)
tree581dfede354ff473f64543a7837ccc274205afa8 /src/gallium/drivers/vc4/vc4_program.c
parentb85f6ae4b24ee50948f14a9effa982eb0b9b3681 (diff)
vc4: Lower NIR inputs to scalar as well.
For now this is just scalarizing, but it also means we'll get to dump a bunch of QIR-based lowering in a moment.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_program.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_program.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 85bb1c48780..dfc3815c5c1 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1889,8 +1889,8 @@ ntq_emit_intrinsic(struct vc4_compile *c, nir_intrinsic_instr *instr)
break;
case nir_intrinsic_load_input:
- for (int i = 0; i < instr->num_components; i++)
- dest[i] = c->inputs[instr->const_index[0] * 4 + i];
+ assert(instr->num_components == 1);
+ *dest = c->inputs[instr->const_index[0]];
break;