From eb0307107d9ca47a3114f3a35b873e032461fc77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Thu, 27 Apr 2023 23:12:46 -0400 Subject: [PATCH] nir: add/update comments for gl_access_qualifier Reviewed-by: Rob Clark Part-of: --- src/compiler/shader_enums.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index d86df6c59f0..a79867864c1 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -977,12 +977,27 @@ enum gl_frag_stencil_layout }; /** - * \brief Buffer access qualifiers + * \brief Memory access qualifiers */ enum gl_access_qualifier { + /** + * This means that the memory scope is the current device. It indicates + * that reads and writes are coherent with reads and writes from other + * shader invocations and other workgroups. + */ ACCESS_COHERENT = (1 << 0), + + /** + * This means non-aliased. It indicates that the accessed address is not + * accessible through any other memory resource in the shader. + */ ACCESS_RESTRICT = (1 << 1), + + /** + * The access cannot be eliminated, duplicated, or combined with other + * accesses. + */ ACCESS_VOLATILE = (1 << 2), /* The memory used by the access/variable is not read. */