nir_shader_add_variable(nir_shader *shader, nir_variable *var)
{
switch (var->data.mode) {
+ case nir_num_variable_modes:
case nir_var_all:
assert(!"invalid mode");
break;
case nir_var_system_value:
exec_list_push_tail(&shader->system_values, &var->node);
break;
+
+ case nir_var_mem_push_const:
+ assert(!"nir_var_push_constant is not supposed to be used for variables");
+ break;
}
}
nir_var_mem_ssbo = (1 << 7),
nir_var_mem_shared = (1 << 8),
nir_var_mem_global = (1 << 9),
- nir_var_all = (1 << 10) - 1,
+ nir_var_mem_push_const = (1 << 10), /* not actually used for variables */
+ nir_num_variable_modes = 11,
+ nir_var_all = (1 << nir_num_variable_modes) - 1,
} nir_variable_mode;
/**
*
* \sa nir_variable_mode
*/
- nir_variable_mode mode:10;
+ nir_variable_mode mode:11;
/**
* Is the variable read-only?