Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Erik Faye-Lund
mesa
Commits
c8604be4
Commit
c8604be4
authored
Sep 17, 2020
by
Jesse Natalie
Committed by
Erik Faye-Lund
Oct 28, 2020
Browse files
vtn/opencl: Add alignment info to vload/vstore derefs
parent
51d56001
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/compiler/spirv/vtn_opencl.c
View file @
c8604be4
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment