diff --git a/src/compiler/nir/nir_lower_image_atomics_to_global.c b/src/compiler/nir/nir_lower_image_atomics_to_global.c index 3730d2989ba..3a1e6775b83 100644 --- a/src/compiler/nir/nir_lower_image_atomics_to_global.c +++ b/src/compiler/nir/nir_lower_image_atomics_to_global.c @@ -95,6 +95,8 @@ lower(nir_builder *b, nir_intrinsic_instr *intr, void *data) .atomic_op = atomic_op); } + b->shader->info.use_lowered_image_to_global = true; + /* Replace the image atomic with the global atomic. Remove the image * explicitly because it has side effects so is not DCE'd. */ diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index ce334909664..aa09ad9442e 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -253,6 +253,14 @@ typedef struct shader_info { /* Use ACO instead of LLVM on AMD. */ bool use_aco_amd:1; + /** + * Whether image intrinsics have been lowered to global intrinsics + * + * This is potentially useful on some implementation that need to know that + * an image barrier needs to include global barriers due to the lowering. + */ + bool use_lowered_image_to_global:1; + /** * Set if this shader uses legacy (DX9 or ARB assembly) math rules. *