Skip to content
Snippets Groups Projects
Commit 8ab628ab authored by Caio Oliveira's avatar Caio Oliveira Committed by Marge Bot
Browse files

nir: Don't reorder volatile intrinsics


Fixes issue with "is helper invocation" that in recent SPIR-V is mapped to
a volatile Load.  The CSE was catching the loads before they were transformed
in the new is_helper_invocation intrinsic (that is not reorderable).

Fixes: 729df14e ("nir: Handle volatile semantics for loading HelperInvocation builtin")
Reviewed-by: default avatarJason Ekstrand <jason.ekstrand@collabora.com>
Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Reviewed-by: default avatarM Henning <drawoc@darkrefraction.com>
Part-of: <mesa/mesa!19432>
parent 10b0a5dc
No related branches found
No related tags found
Loading
......@@ -1965,6 +1965,9 @@ void nir_rewrite_image_intrinsic(nir_intrinsic_instr *instr,
static inline bool
nir_intrinsic_can_reorder(nir_intrinsic_instr *instr)
{
if (nir_intrinsic_has_access(instr) &&
nir_intrinsic_access(instr) & ACCESS_VOLATILE)
return false;
if (instr->intrinsic == nir_intrinsic_load_deref) {
nir_deref_instr *deref = nir_src_as_deref(instr->src[0]);
return nir_deref_mode_is_in_set(deref, nir_var_read_only_modes) ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment