Commit c8604be4 authored by Jesse Natalie's avatar Jesse Natalie Committed by Erik Faye-Lund

vtn/opencl: Add alignment info to vload/vstore derefs

parent 51d56001
......@@ -656,7 +656,9 @@ _handle_v_load_store(struct vtn_builder *b, enum OpenCLstd_Entrypoints opcode,
nir_ssa_def *ncomps[NIR_MAX_VEC_COMPONENTS];
nir_ssa_def *moffset = nir_imul_imm(&b->nb, offset, (aligned && components == 3) ? 4 : components);
nir_deref_instr *deref = vtn_pointer_to_deref(b, p->pointer);
deref = nir_alignment_deref_cast(&b->nb, deref, aligned ? glsl_get_cl_alignment(dest_type) : glsl_get_bit_size(dest_type) / 8, 0);
for (int i = 0; i < components; i++) {
nir_ssa_def *coffset = nir_iadd_imm(&b->nb, moffset, i);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment