From 4e15d26e47c7b8f11ab9fd1bfefb9b7515a71427 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 8 Jan 2016 12:27:25 -0800 Subject: [PATCH] nir/spirv: Fix a small bug in row-major matrix loading --- src/glsl/nir/spirv/spirv_to_nir.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/glsl/nir/spirv/spirv_to_nir.c b/src/glsl/nir/spirv/spirv_to_nir.c index 4f5639c4cf4..49b9a6500f8 100644 --- a/src/glsl/nir/spirv/spirv_to_nir.c +++ b/src/glsl/nir/spirv/spirv_to_nir.c @@ -1350,7 +1350,11 @@ _vtn_block_load_store(struct vtn_builder *b, nir_intrinsic_op op, bool load, if (type->row_major) { num_ops = glsl_get_vector_elements(type->type); vec_width = glsl_get_matrix_columns(type->type); - if (!load) { + if (load) { + const struct glsl_type *transpose_type = + glsl_matrix_type(base_type, vec_width, num_ops); + *inout = vtn_create_ssa_value(b, transpose_type); + } else { transpose = vtn_ssa_transpose(b, *inout); inout = &transpose; } -- 2.30.2