summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2016-01-08 17:16:29 -0800
committerJordan Justen <[email protected]>2016-03-17 01:23:40 -0700
commit3c807607df4ab457037f2daa5ea9e5ce18392b7b (patch)
tree9f31a0e05d53086a2ce0df141907aa3726d937bc /src/compiler/nir/nir.h
parent26f8262698d9f48ab5dbb85ef14cb7d5cefd9d53 (diff)
nir: Add compute shader shared variable storage class
Previously we were receiving shared variable accesses via a lowered intrinsic function from glsl. This change allows us to send in variables instead. For example, when converting from SPIR-V. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 34f31eb9859..7d2bd03c914 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -90,6 +90,7 @@ typedef enum {
nir_var_shader_storage,
nir_var_system_value,
nir_var_param,
+ nir_var_shared,
} nir_variable_mode;
/**
@@ -172,7 +173,7 @@ typedef struct nir_variable {
*
* \sa nir_variable_mode
*/
- nir_variable_mode mode:4;
+ nir_variable_mode mode:5;
/**
* Interpolation mode for shader inputs / outputs
@@ -1660,6 +1661,9 @@ typedef struct nir_shader {
/** list of outputs (nir_variable) */
struct exec_list outputs;
+ /** list of shared compute variables (nir_variable) */
+ struct exec_list shared;
+
/** Set of driver-specific options for the shader.
*
* The memory for the options is expected to be kept in a single static