{
nir_shader *nir;
const nir_shader_compiler_options *nir_options =
- device->physical_device->use_aco ? &nir_options_aco :
- &nir_options_llvm;
+ device->physical_device->use_llvm ? &nir_options_llvm :
+ &nir_options_aco;
if (module->nir) {
/* Some things such as our meta clear/blit code will give us a NIR
.amd_gcn_shader = true,
.amd_image_gather_bias_lod = true,
.amd_image_read_write_lod = true,
- .amd_shader_ballot = device->physical_device->use_shader_ballot,
+ .amd_shader_ballot = true,
.amd_shader_explicit_vertex_parameter = true,
.amd_trinary_minmax = true,
.demote_to_helper_invocation = true,
NIR_PASS_V(nir, nir_split_per_member_structs);
if (nir->info.stage == MESA_SHADER_FRAGMENT &&
- device->physical_device->use_aco)
+ !device->physical_device->use_llvm)
NIR_PASS_V(nir, nir_lower_io_to_vector, nir_var_shader_out);
if (nir->info.stage == MESA_SHADER_FRAGMENT)
NIR_PASS_V(nir, nir_lower_input_attachments, true);
nir_lower_doubles_options lower_doubles =
nir->options->lower_doubles_options;
+ if (device->physical_device->rad_info.chip_class == GFX6) {
+ /* GFX6 doesn't support v_floor_f64 and the precision
+ * of v_fract_f64 which is used to implement 64-bit
+ * floor is less than what Vulkan requires.
+ */
+ lower_doubles |= nir_lower_dfloor;
+ }
+
NIR_PASS_V(nir, nir_lower_doubles, NULL, lower_doubles);
}
.lower_vote_eq_to_ballot = 1,
.lower_quad_broadcast_dynamic = 1,
.lower_quad_broadcast_dynamic_to_const = gfx7minus,
+ .lower_shuffle_to_swizzle_amd = 1,
});
nir_lower_load_const_to_scalar(nir);
radv_postprocess_config(device->physical_device, &config, &binary->info,
binary->stage, &variant->config);
- if (radv_device_use_secure_compile(device->instance)) {
- if (binary->type == RADV_BINARY_TYPE_RTLD)
- ac_rtld_close(&rtld_binary);
-
- return variant;
- }
-
void *dest_ptr = radv_alloc_shader_memory(device, variant);
if (!dest_ptr) {
if (binary->type == RADV_BINARY_TYPE_RTLD)
shader_count >= 2 ? shaders[shader_count - 2]->info.stage
: MESA_SHADER_VERTEX);
- if (!device->physical_device->use_aco ||
+ if (device->physical_device->use_llvm ||
options->dump_shader || options->record_ir)
ac_init_llvm_once();
- if (device->physical_device->use_aco) {
- aco_compile_shader(shader_count, shaders, &binary, &args);
- } else {
+ if (device->physical_device->use_llvm) {
llvm_compile_shader(device, shader_count, shaders, &binary, &args);
+ } else {
+ aco_compile_shader(shader_count, shaders, &binary, &args);
}
binary->info = *info;
if (key)
options.key = *key;
- options.explicit_scratch_args = device->physical_device->use_aco;
+ options.explicit_scratch_args = !device->physical_device->use_llvm;
options.robust_buffer_access = device->robust_buffer_access;
return shader_variant_compile(device, module, shaders, shader_count, shaders[shader_count - 1]->info.stage, info,
{
struct radv_nir_compiler_options options = {0};
- options.explicit_scratch_args = device->physical_device->use_aco;
+ options.explicit_scratch_args = !device->physical_device->use_llvm;
options.key.has_multiview_view_index = multiview;
return shader_variant_compile(device, NULL, &shader, 1, MESA_SHADER_VERTEX,