From: Jason Ekstrand Date: Fri, 8 Jan 2016 20:27:25 +0000 (-0800) Subject: nir/spirv: Fix a small bug in row-major matrix loading X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4e15d26e47c7b8f11ab9fd1bfefb9b7515a71427;p=mesa.git nir/spirv: Fix a small bug in row-major matrix loading --- 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; }