case nir_var_mem_ssbo:
case nir_var_mem_shared:
case nir_var_system_value:
+ case nir_var_mem_constant:
break;
case nir_var_mem_global:
nir_var_mem_shared = (1 << 8),
nir_var_mem_global = (1 << 9),
nir_var_mem_push_const = (1 << 10), /* not actually used for variables */
- nir_num_variable_modes = 11,
+ nir_var_mem_constant = (1 << 11),
+ nir_num_variable_modes = 12,
nir_var_all = (1 << nir_num_variable_modes) - 1,
} nir_variable_mode;
MESA_DEFINE_CPP_ENUM_BITFIELD_OPERATORS(nir_variable_mode)
*
* \sa nir_variable_mode
*/
- unsigned mode:11;
+ unsigned mode:12;
/**
* Is the variable read-only?
return "shared";
case nir_var_mem_global:
return "global";
+ case nir_var_mem_constant:
+ return "constant";
case nir_var_shader_temp:
return want_local_global_mode ? "shader_temp" : "";
case nir_var_function_temp:
unsigned instr_type:4;
unsigned deref_type:3;
unsigned cast_type_same_as_last:1;
- unsigned mode:10; /* deref_var redefines this */
+ unsigned mode:12; /* deref_var redefines this */
unsigned packed_src_ssa_16bit:1; /* deref_var redefines this */
- unsigned _pad:5; /* deref_var redefines this */
+ unsigned _pad:3; /* deref_var redefines this */
unsigned dest:8;
} deref;
struct {
write_deref(write_ctx *ctx, const nir_deref_instr *deref)
{
assert(deref->deref_type < 8);
- assert(deref->mode < (1 << 10));
+ assert(deref->mode < (1 << 12));
union packed_instr header;
header.u32 = 0;
validate_assert(state, instr->mode == nir_var_mem_ubo ||
instr->mode == nir_var_mem_ssbo ||
instr->mode == nir_var_mem_shared ||
- instr->mode == nir_var_mem_global);
+ instr->mode == nir_var_mem_global ||
+ instr->mode == nir_var_mem_constant);
}
}
}
nir_var_mem_ubo |
nir_var_system_value |
nir_var_mem_ssbo |
- nir_var_mem_shared;
+ nir_var_mem_shared |
+ nir_var_mem_constant;
exec_list_validate(&shader->variables);
nir_foreach_variable_in_shader(var, shader)