nir_address_format shared_addr_format;
nir_address_format global_addr_format;
nir_address_format temp_addr_format;
+ nir_address_format constant_addr_format;
/* Whether UniformConstant memory should be treated as normal global memory.
* This is usefull for CL 2.0 implementations with fine grain system SVM
assert(nir_address_format_bit_size(b->options->shared_addr_format) == 32);
assert(nir_address_format_num_components(b->options->shared_addr_format) == 1);
if (!b->options->constant_as_global) {
- assert(nir_address_format_bit_size(b->options->ubo_addr_format) == 32);
- assert(nir_address_format_num_components(b->options->ubo_addr_format) == 1);
+ assert(nir_address_format_bit_size(b->options->constant_addr_format) == 32);
+ assert(nir_address_format_num_components(b->options->constant_addr_format) == 1);
}
break;
case SpvAddressingModelPhysical64:
assert(nir_address_format_bit_size(b->options->shared_addr_format) == 64);
assert(nir_address_format_num_components(b->options->shared_addr_format) == 1);
if (!b->options->constant_as_global) {
- assert(nir_address_format_bit_size(b->options->ubo_addr_format) == 64);
- assert(nir_address_format_num_components(b->options->ubo_addr_format) == 1);
+ assert(nir_address_format_bit_size(b->options->constant_addr_format) == 64);
+ assert(nir_address_format_num_components(b->options->constant_addr_format) == 1);
}
break;
case SpvAddressingModelLogical:
vtn_variable_mode_push_constant,
vtn_variable_mode_workgroup,
vtn_variable_mode_cross_workgroup,
+ vtn_variable_mode_constant,
vtn_variable_mode_input,
vtn_variable_mode_output,
vtn_variable_mode_image,
mode = vtn_variable_mode_cross_workgroup;
nir_mode = nir_var_mem_global;
} else {
- mode = vtn_variable_mode_ubo;
- nir_mode = nir_var_mem_ubo;
+ mode = vtn_variable_mode_constant;
+ nir_mode = nir_var_mem_constant;
}
} else {
mode = vtn_variable_mode_uniform;
case vtn_variable_mode_cross_workgroup:
return b->options->global_addr_format;
+ case vtn_variable_mode_constant:
+ return b->options->constant_addr_format;
+
case vtn_variable_mode_function:
if (b->physical_ptrs)
return b->options->temp_addr_format;
case vtn_variable_mode_private:
case vtn_variable_mode_uniform:
case vtn_variable_mode_atomic_counter:
+ case vtn_variable_mode_constant:
/* For these, we create the variable normally */
var->var = rzalloc(b->shader, nir_variable);
var->var->name = ralloc_strdup(var->var, val->name);