diff --git a/src/compiler/nir/nir_divergence_analysis.c b/src/compiler/nir/nir_divergence_analysis.c index ea4ef613b0d..56506b18213 100644 --- a/src/compiler/nir/nir_divergence_analysis.c +++ b/src/compiler/nir/nir_divergence_analysis.c @@ -973,6 +973,10 @@ visit_intrinsic(nir_intrinsic_instr *instr, struct divergence_state *state) #endif } + if (nir_intrinsic_has_access(instr) && + (nir_intrinsic_access(instr) & ACCESS_SKIP_HELPERS)) + is_divergent = true; + instr->def.divergent = is_divergent; return is_divergent; } diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index 4d01473ebf8..4a2132cda87 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -850,6 +850,7 @@ print_access(enum gl_access_qualifier access, print_state *state, const char *se { ACCESS_IN_BOUNDS, "in-bounds" }, { ACCESS_KEEP_SCALAR, "keep-scalar" }, { ACCESS_SMEM_AMD, "smem-amd" }, + { ACCESS_SKIP_HELPERS, "skip-helpers" }, }; bool first = true; diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index 5a4eb55f3aa..7a0df2a62d5 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -1167,6 +1167,11 @@ enum gl_access_qualifier * Indicates that this load will use SMEM. */ ACCESS_SMEM_AMD = (1 << 16), + + /** + * Indicates that this load must be skipped by helper invocations. + */ + ACCESS_SKIP_HELPERS = (1 << 17), }; /**