summaryrefslogtreecommitdiffstats
path: root/src/gallium/include/pipe/p_shader_tokens.h
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2015-11-07 02:25:20 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2016-01-08 15:10:32 -0500
commit50b8488926c4fa45ed79148217b81e54252788e7 (patch)
tree087c2e57e6be421f07dd7ce2951029ae9ac67485 /src/gallium/include/pipe/p_shader_tokens.h
parent888ddd632d7f6af635cc948f1b3e8982b43800d2 (diff)
downloadexternal_mesa3d-50b8488926c4fa45ed79148217b81e54252788e7.zip
external_mesa3d-50b8488926c4fa45ed79148217b81e54252788e7.tar.gz
external_mesa3d-50b8488926c4fa45ed79148217b81e54252788e7.tar.bz2
tgsi: provide a way to encode memory qualifiers for SSBO
Each load/store on most hardware can specify what caching to do. Since SSBO allows individual variables to also have separate caching modes, allow loads/stores to have the qualifiers instead of attempting to encode them in declarations. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/include/pipe/p_shader_tokens.h')
-rw-r--r--src/gallium/include/pipe/p_shader_tokens.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 815aff1..43a5561 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -572,7 +572,8 @@ struct tgsi_instruction
unsigned Predicate : 1; /* BOOL */
unsigned Label : 1;
unsigned Texture : 1;
- unsigned Padding : 2;
+ unsigned Memory : 1;
+ unsigned Padding : 1;
};
/*
@@ -729,6 +730,19 @@ struct tgsi_dst_register
unsigned Padding : 6;
};
+#define TGSI_MEMORY_COHERENT (1 << 0)
+#define TGSI_MEMORY_RESTRICT (1 << 1)
+#define TGSI_MEMORY_VOLATILE (1 << 2)
+
+/**
+ * Specifies the type of memory access to do for the LOAD/STORE instruction.
+ */
+struct tgsi_instruction_memory
+{
+ unsigned Qualifier : 3; /* TGSI_MEMORY_ */
+ unsigned Padding : 29;
+};
+
#ifdef __cplusplus
}