nir/spirv: Fix UBO loads of a single element of a row-major matrix
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 1 Feb 2016 22:00:25 +0000 (14:00 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 1 Feb 2016 22:03:05 +0000 (14:03 -0800)
src/glsl/nir/spirv/vtn_variables.c

index 7d44cf4be9e37ac3dac4d17e39f95cabfb779a65..3ad98aa5310342ae955b3359ba7045df887aadb5 100644 (file)
@@ -487,6 +487,8 @@ _vtn_block_load_store(struct vtn_builder *b, nir_intrinsic_op op, bool load,
                   vtn_access_link_as_ssa(b, chain->link[chain_idx + 1],
                                          type->stride);
                offset = nir_iadd(&b->nb, offset, row_offset);
+               if (load)
+                  *inout = vtn_create_ssa_value(b, glsl_scalar_type(base_type));
                _vtn_load_store_tail(b, op, load, index, offset, inout,
                                     glsl_scalar_type(base_type));
             } else {