nir: Add a new "param" variable mode for parameters and return variables

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Jason Ekstrand
2016-02-12 11:58:06 -08:00
parent 41ae553fda
commit 2ef4754a20
3 changed files with 13 additions and 2 deletions

View File

@@ -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;