When we compute output swizzle, avoid reusing it as the source of the
computation because, otherwise, it could calculate it wrongly.
Signed-off-by: Samuel Iglesias Gonsalvez
---
src/glsl/nir/nir_opt_peephole_ffma.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/glsl/
Upon further consideration and actually seeing the patch, I think
using num_components would be better. Calling it writemask isn't
really true since it isn't the writemask for the mul. I thought about
calling it read_mask but that isn't really true either because it
isn't the components of the mu
When we compute the output swizzle we want to consider the writemask of the
add operation, not the one from the multiplication.
---
src/glsl/nir/nir_opt_peephole_ffma.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/glsl/nir/nir_opt_peephole_ffma.c
b/src/gl