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
- * support.
- */
- bool constant_as_global;
-
struct {
void (*func)(void *private_data,
enum nir_spirv_debug_level level,
spirv_opts.caps.int16 = true;
spirv_opts.caps.int64 = true;
spirv_opts.caps.kernel = true;
- spirv_opts.constant_as_global = true;
}
nir_shader *nir = spirv_to_nir(map, word_count, NULL, 0,
assert(nir_address_format_num_components(b->options->global_addr_format) == 1);
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->constant_addr_format) == 32);
- assert(nir_address_format_num_components(b->options->constant_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:
vtn_fail_if(b->shader->info.stage != MESA_SHADER_KERNEL,
assert(nir_address_format_num_components(b->options->global_addr_format) == 1);
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->constant_addr_format) == 64);
- assert(nir_address_format_num_components(b->options->constant_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_fail_if(b->shader->info.stage == MESA_SHADER_KERNEL,
break;
case SpvStorageClassUniformConstant:
if (b->shader->info.stage == MESA_SHADER_KERNEL) {
- if (b->options->constant_as_global) {
- mode = vtn_variable_mode_cross_workgroup;
- nir_mode = nir_var_mem_global;
- } else {
- mode = vtn_variable_mode_constant;
- nir_mode = nir_var_mem_constant;
- }
+ mode = vtn_variable_mode_constant;
+ nir_mode = nir_var_mem_constant;
} else {
mode = vtn_variable_mode_uniform;
nir_mode = nir_var_uniform;