diff options
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r-- | src/compiler/nir/nir.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index cfbac81dbb1..ede56953d0a 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -88,7 +88,8 @@ typedef enum { nir_var_local, nir_var_uniform, nir_var_shader_storage, - nir_var_system_value + nir_var_system_value, + nir_var_param, } nir_variable_mode; /** @@ -331,6 +332,12 @@ typedef struct nir_variable { #define nir_foreach_variable(var, var_list) \ foreach_list_typed(nir_variable, var, node, var_list) +static inline bool +nir_variable_is_global(const nir_variable *var) +{ + return var->data.mode != nir_var_local && var->data.mode != nir_var_param; +} + typedef struct nir_register { struct exec_node node; |