From 2e823d5754137c7ecb8f766540ff48b39ada48fc Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 23 Dec 2015 13:17:18 -0800 Subject: [PATCH] nir/spirv: Properly handle vector times matrix --- src/glsl/nir/spirv_to_nir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/glsl/nir/spirv_to_nir.c b/src/glsl/nir/spirv_to_nir.c index 91667e11225..a6b770ef2b7 100644 --- a/src/glsl/nir/spirv_to_nir.c +++ b/src/glsl/nir/spirv_to_nir.c @@ -2493,7 +2493,11 @@ vtn_handle_matrix_alu(struct vtn_builder *b, SpvOp opcode, struct vtn_ssa_value *src0 = vtn_ssa_value(b, w[3]); struct vtn_ssa_value *src1 = vtn_ssa_value(b, w[4]); - val->ssa = vtn_matrix_multiply(b, src0, src1); + if (opcode == SpvOpVectorTimesMatrix) { + val->ssa = vtn_matrix_multiply(b, vtn_transpose(b, src1), src0); + } else { + val->ssa = vtn_matrix_multiply(b, src0, src1); + } break; } -- 2.30.2