aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-07-16 12:38:10 -0700
committerEric Anholt <[email protected]>2019-07-17 10:30:43 -0700
commit28a808a11b0dac153115776b4cf1c32c73a891a4 (patch)
treef03e21be79c0f2d0ce8795e7f096d004d43581bc /src
parenta301250ece2e3d656008941308db83145b2579ca (diff)
nir: Fix nir_lower_alu_to_scalar's instr filtering.
It was checking if the dest or src[0] SSA values were vectors, rather than whether the ALU op was using the source as a vector resulting in a nir_fdot4 making it through to vc4 and v3d: vec1 32 ssa_6 = fdot4 ssa_4.xxxx, ssa_5 Fixes: c1cffa4249ca ("nir/alu_to_scalar: Use the new NIR lowering framework") v2: Use Jason's recommendation to look at input_sizes. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_alu_to_scalar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_lower_alu_to_scalar.c b/src/compiler/nir/nir_lower_alu_to_scalar.c
index d346ee7a94a..b16624bd8aa 100644
--- a/src/compiler/nir/nir_lower_alu_to_scalar.c
+++ b/src/compiler/nir/nir_lower_alu_to_scalar.c
@@ -44,7 +44,7 @@ inst_is_vector_alu(const nir_instr *instr, const void *_state)
assert(alu->dest.dest.is_ssa);
assert(alu->src[0].src.is_ssa);
return alu->dest.dest.ssa.num_components > 1 ||
- alu->src[0].src.ssa->num_components > 1;
+ nir_op_infos[alu->op].input_sizes[0] > 1;
}
static void