case ir_var_uniform:
if (ir->get_interface_type())
- var->data.mode = nir_var_ubo;
+ var->data.mode = nir_var_mem_ubo;
else
var->data.mode = nir_var_uniform;
break;
break;
case nir_var_uniform:
- case nir_var_ubo:
+ case nir_var_mem_ubo:
case nir_var_ssbo:
exec_list_push_tail(&shader->uniforms, &var->node);
break;
nir_var_shader_temp = (1 << 2),
nir_var_function_temp = (1 << 3),
nir_var_uniform = (1 << 4),
- nir_var_ubo = (1 << 5),
+ nir_var_mem_ubo = (1 << 5),
nir_var_system_value = (1 << 6),
nir_var_ssbo = (1 << 7),
nir_var_shared = (1 << 8),
* UBOs have their own address spaces, so don't count them towards the
* number of global uniforms
*/
- if (var->data.mode == nir_var_ubo || var->data.mode == nir_var_ssbo)
+ if (var->data.mode == nir_var_mem_ubo || var->data.mode == nir_var_ssbo)
continue;
var->data.driver_location = location;
nir_intrinsic_op op;
switch (mode) {
- case nir_var_ubo:
+ case nir_var_mem_ubo:
op = nir_intrinsic_load_ubo;
break;
case nir_var_ssbo:
load->src[0] = nir_src_for_ssa(addr_to_index(b, addr, addr_format));
load->src[1] = nir_src_for_ssa(addr_to_offset(b, addr, addr_format));
- if (mode != nir_var_ubo)
+ if (mode != nir_var_mem_ubo)
nir_intrinsic_set_access(load, nir_intrinsic_access(intrin));
/* TODO: We should try and provide a better alignment. For OpenCL, we need
return "shader_out";
case nir_var_uniform:
return "uniform";
- case nir_var_ubo:
+ case nir_var_mem_ubo:
return "ubo";
case nir_var_system_value:
return "system";
if (var->data.mode == nir_var_shader_in ||
var->data.mode == nir_var_shader_out ||
var->data.mode == nir_var_uniform ||
- var->data.mode == nir_var_ubo ||
+ var->data.mode == nir_var_mem_ubo ||
var->data.mode == nir_var_ssbo) {
const char *loc = NULL;
char buf[4];
case nir_deref_type_array:
case nir_deref_type_array_wildcard:
- if (instr->mode == nir_var_ubo ||
+ if (instr->mode == nir_var_mem_ubo ||
instr->mode == nir_var_ssbo ||
instr->mode == nir_var_shared) {
/* Shared variables and UBO/SSBOs have a bit more relaxed rules
assert(base->mode == vtn_variable_mode_ssbo ||
base->mode == vtn_variable_mode_ubo);
nir_variable_mode nir_mode =
- base->mode == vtn_variable_mode_ssbo ? nir_var_ssbo : nir_var_ubo;
+ base->mode == vtn_variable_mode_ssbo ? nir_var_ssbo : nir_var_mem_ubo;
tail = nir_build_deref_cast(&b->nb, desc, nir_mode, type->type,
base->ptr_type->stride);
case SpvStorageClassUniform:
if (interface_type->block) {
mode = vtn_variable_mode_ubo;
- nir_mode = nir_var_ubo;
+ nir_mode = nir_var_mem_ubo;
} else if (interface_type->buffer_block) {
mode = vtn_variable_mode_ssbo;
nir_mode = nir_var_ssbo;
*/
if (variable->interface_type != NULL) {
if (variable->data.mode == nir_var_uniform ||
- variable->data.mode == nir_var_ubo) {
+ variable->data.mode == nir_var_mem_ubo) {
unsigned block_count;
if (base_type != GLSL_TYPE_INTERFACE) {
NIR_PASS_V(nir, nir_remove_dead_variables,
nir_var_shader_in | nir_var_shader_out | nir_var_system_value);
- NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_ubo | nir_var_ssbo,
+ NIR_PASS_V(nir, nir_lower_explicit_io, nir_var_mem_ubo | nir_var_ssbo,
nir_address_format_vk_index_offset);
NIR_PASS_V(nir, nir_propagate_invariant);
* UBO's have their own address spaces, so don't count them towards the
* number of global uniforms
*/
- if (uniform->data.mode == nir_var_ubo || uniform->data.mode == nir_var_ssbo)
+ if (uniform->data.mode == nir_var_mem_ubo || uniform->data.mode == nir_var_ssbo)
continue;
const struct glsl_type *type = glsl_without_array(uniform->type);