diff options
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index bca6a32c956..1ccbccc8bbb 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -163,6 +163,22 @@ typedef enum { } nir_depth_layout; /** + * Enum keeping track of how a variable was declared. + */ +typedef enum { + /** + * Normal declaration. + */ + nir_var_declared_normally = 0, + + /** + * Variable is implicitly generated by the compiler and should not be + * visible via the API. + */ + nir_var_hidden, +} nir_var_declaration_type; + +/** * Either a uniform, global variable, shader input, or shader output. Based on * ir_variable - it should be easy to translate between the two. */ @@ -350,6 +366,14 @@ typedef struct nir_variable { unsigned xfb_stride; /** + * How the variable was declared. See nir_var_declaration_type. + * + * This is used to detect variables generated by the compiler, so should + * not be visible via the API. + */ + unsigned how_declared:2; + + /** * ARB_shader_image_load_store qualifiers. */ struct { |