nir: add how_declared to nir_variable.data
Equivalent to the already existing how_declared at GLSL IR. The only difference is that we are not adding all the declaration_type available on GLSL, only the one that we will use on the short term. We would add more mode if needed on the future. Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
@@ -162,6 +162,22 @@ typedef enum {
|
||||
nir_depth_layout_unchanged
|
||||
} 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.
|
||||
@@ -349,6 +365,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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user