nir: Add memory coherency information to shaders.

Signed-off-by: Amber Amber <amber@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21260>
This commit is contained in:
Amber 2023-03-02 17:42:57 +01:00 committed by Marge Bot
parent 1462da2a70
commit ca92183845
2 changed files with 4 additions and 1 deletions

View file

@ -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 &&

View file

@ -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;
/**