diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index 85034a55003..76c89c06db7 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/nir/nir_gather_info.c @@ -173,8 +173,10 @@ set_io_mask(nir_shader *shader, nir_variable *var, int offset, int len, if (var->data.fb_fetch_output) { shader->info.outputs_read |= bitfield; - if (shader->info.stage == MESA_SHADER_FRAGMENT) + if (shader->info.stage == MESA_SHADER_FRAGMENT) { shader->info.fs.uses_fbfetch_output = true; + shader->info.fs.fbfetch_coherent = var->data.access & ACCESS_COHERENT; + } } if (shader->info.stage == MESA_SHADER_FRAGMENT && diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h index 2fd60fac53b..c771526dc34 100644 --- a/src/compiler/shader_info.h +++ b/src/compiler/shader_info.h @@ -403,6 +403,7 @@ typedef struct shader_info { bool uses_discard:1; bool uses_demote:1; bool uses_fbfetch_output:1; + bool fbfetch_coherent:1; bool color_is_dual_source:1; /**