summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r--src/compiler/spirv/vtn_variables.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index e1e2c8c26ba..53f52255dc3 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -646,6 +646,12 @@ _vtn_load_store_tail(struct vtn_builder *b, nir_intrinsic_op op, bool load,
nir_intrinsic_set_access(instr, access);
}
+ /* With extensions like relaxed_block_layout, we really can't guarantee
+ * much more than scalar alignment.
+ */
+ if (op != nir_intrinsic_load_push_constant)
+ nir_intrinsic_set_align(instr, data_bit_size / 8, 0);
+
if (index)
instr->src[src++] = nir_src_for_ssa(index);