diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd895e44c013fbc6f4d3a4d45dbd5266a747cc05..4b8713bb0268944b04208b68c8ce5b0cdf9a19e2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1116,7 +1116,6 @@ arm64_a530_gles31: variables: VK_DRIVER: radeon ACO_DEBUG: validateir,validatera - RADV_PERFTEST: aco # Can only be triggered manually on personal branches because RADV is the only # driver that does Vulkan testing at the moment. diff --git a/docs/envvars.rst b/docs/envvars.rst index 5c9e851da8be596bc114fd2d810780bace063ca0..bc431ccf1f10bb30562d98fe5bc93f3e72d80a2d 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -510,6 +510,8 @@ RADV driver environment variables ``RADV_DEBUG`` a comma-separated list of named flags, which do various things: + ``llvm`` + enable LLVM compiler backend ``allbos`` force all allocated buffers to be referenced in submissions ``allentrypoints`` @@ -573,8 +575,6 @@ RADV driver environment variables ``RADV_PERFTEST`` a comma-separated list of named flags, which do various things: - ``aco`` - enable ACO experimental compiler ``bolist`` enable the global BO list ``cswave32`` diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index a0f3789877bd5b92e4b715ca7605d2908e236412..4260ad9010336451db6048884a251d0c7bbba0ad 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -12,3 +12,5 @@ VK_GOOGLE_user_type on ANV and RADV. VK_KHR_shader_subgroup_extended_types on RADV/ACO. GL_ARB_gl_spirv on nvc0/nir. GL_ARB_spirv_extensions on nvc0/nir. +RADV now uses ACO per default as backend +RADV_DEBUG=llvm option to enable LLVM backend for RADV diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index 247029cb70136fc72ec6f13f3ba2f62f2814f974..31930d738434f39ac37662dbc9c49a75279aa79e 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2953,7 +2953,7 @@ radv_dst_access_flush(struct radv_cmd_buffer *cmd_buffer, flush_bits |= RADV_CMD_FLAG_INV_VCACHE; /* Unlike LLVM, ACO uses SMEM for SSBOs and we have to * invalidate the scalar cache. */ - if (cmd_buffer->device->physical_device->use_aco) + if (!cmd_buffer->device->physical_device->use_llvm) flush_bits |= RADV_CMD_FLAG_INV_SCACHE; if (!image_is_coherent) diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index 77a136f94a12d5a8312697c08b280c7d0d972395..e86b0079df7803f68da9fcef59625a1341c5c973 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -433,7 +433,7 @@ radv_dump_shader(struct radv_pipeline *pipeline, } fprintf(f, "%s IR:\n%s\n", - pipeline->device->physical_device->use_aco ? "ACO" : "LLVM", + pipeline->device->physical_device->use_llvm ? "LLVM" : "ACO", shader->ir_string); fprintf(f, "DISASM:\n%s\n", shader->disasm_string); diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index 63605035815615b37fba316ebc446cb0c3b4d08a..c7559875de9b741ad509d7de0323c16574ab47a4 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -57,6 +57,7 @@ enum { RADV_DEBUG_DUMP_META_SHADERS = 0x4000000, RADV_DEBUG_NO_MEMORY_CACHE = 0x8000000, RADV_DEBUG_DISCARD_TO_DEMOTE = 0x10000000, + RADV_DEBUG_LLVM = 0x20000000, }; enum { @@ -69,7 +70,6 @@ enum { RADV_PERFTEST_PS_WAVE_32 = 0x40, RADV_PERFTEST_GE_WAVE_32 = 0x80, RADV_PERFTEST_DFSM = 0x100, - RADV_PERFTEST_ACO = 0x200, }; bool diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 534fd5fd47a02c6e43933204d6a710788d79f171..0a0443e3f0ea5aa2d0caaf871dce42ceebb95af2 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -230,7 +230,7 @@ radv_physical_device_init_mem_types(struct radv_physical_device *device) static const char * radv_get_compiler_string(struct radv_physical_device *pdevice) { - if (pdevice->use_aco) { + if (!pdevice->use_llvm) { /* Some games like SotTR apply shader workarounds if the LLVM * version is too old or if the LLVM version string is * missing. This gives 2-5% performance with SotTR and ACO. @@ -338,7 +338,7 @@ radv_physical_device_try_create(struct radv_instance *instance, device->local_fd = fd; device->ws->query_info(device->ws, &device->rad_info); - device->use_aco = instance->perftest_flags & RADV_PERFTEST_ACO; + device->use_llvm = instance->debug_flags & RADV_DEBUG_LLVM; snprintf(device->name, sizeof(device->name), "AMD RADV %s (%s)", @@ -351,7 +351,7 @@ radv_physical_device_try_create(struct radv_instance *instance, } /* These flags affect shader compilation. */ - uint64_t shader_env_flags = (device->use_aco ? 0x2 : 0); + uint64_t shader_env_flags = (device->use_llvm ? 0 : 0x2); /* The gpu id is already embedded in the uuid so we just pass "radv" * when creating the cache. @@ -360,7 +360,7 @@ radv_physical_device_try_create(struct radv_instance *instance, disk_cache_format_hex_id(buf, device->cache_uuid, VK_UUID_SIZE * 2); device->disk_cache = disk_cache_create(device->name, buf, shader_env_flags); - if (device->rad_info.chip_class < GFX8) + if (device->rad_info.chip_class < GFX8 || !device->use_llvm) fprintf(stderr, "WARNING: radv is not a conformant vulkan implementation, testing use only.\n"); radv_get_driver_uuid(&device->driver_uuid); @@ -372,7 +372,7 @@ radv_physical_device_try_create(struct radv_instance *instance, device->dcc_msaa_allowed = (device->instance->perftest_flags & RADV_PERFTEST_DCC_MSAA); - device->use_shader_ballot = (device->use_aco && device->rad_info.chip_class >= GFX8) || + device->use_shader_ballot = (!device->use_llvm && device->rad_info.chip_class >= GFX8) || (device->instance->perftest_flags & RADV_PERFTEST_SHADER_BALLOT); device->use_ngg = device->rad_info.chip_class >= GFX10 && @@ -380,7 +380,7 @@ radv_physical_device_try_create(struct radv_instance *instance, !(device->instance->debug_flags & RADV_DEBUG_NO_NGG); /* TODO: Implement NGG GS with ACO. */ - device->use_ngg_gs = device->use_ngg && !device->use_aco; + device->use_ngg_gs = device->use_ngg && device->use_llvm; device->use_ngg_streamout = false; /* Determine the number of threads per wave for all stages. */ @@ -507,6 +507,7 @@ static const struct debug_control radv_debug_options[] = { {"allentrypoints", RADV_DEBUG_ALL_ENTRYPOINTS}, {"metashaders", RADV_DEBUG_DUMP_META_SHADERS}, {"nomemorycache", RADV_DEBUG_NO_MEMORY_CACHE}, + {"llvm", RADV_DEBUG_LLVM}, {NULL, 0} }; @@ -527,7 +528,6 @@ static const struct debug_control radv_perftest_options[] = { {"pswave32", RADV_PERFTEST_PS_WAVE_32}, {"gewave32", RADV_PERFTEST_GE_WAVE_32}, {"dfsm", RADV_PERFTEST_DFSM}, - {"aco", RADV_PERFTEST_ACO}, {NULL, 0} }; @@ -558,7 +558,7 @@ radv_handle_per_app_options(struct radv_instance *instance, instance->debug_flags |= RADV_DEBUG_NO_LOAD_STORE_OPT; } else if (!strcmp(name, "Wolfenstein: Youngblood")) { if (!(instance->debug_flags & RADV_DEBUG_NO_SHADER_BALLOT) && - !(instance->perftest_flags & RADV_PERFTEST_ACO)) { + (instance->debug_flags & RADV_DEBUG_LLVM)) { /* Force enable VK_AMD_shader_ballot because it looks * safe and it gives a nice boost (+20% on Vega 56 at * this time). It also prevents corruption on LLVM. @@ -677,9 +677,6 @@ VkResult radv_CreateInstance( instance->perftest_flags = parse_debug_string(getenv("RADV_PERFTEST"), radv_perftest_options); - if (instance->perftest_flags & RADV_PERFTEST_ACO) - fprintf(stderr, "WARNING: Experimental compiler backend enabled. Here be dragons! Incorrect rendering, GPU hangs and/or resets are likely\n"); - if (instance->debug_flags & RADV_DEBUG_STARTUP) radv_logi("Created an instance"); @@ -971,7 +968,7 @@ radv_get_physical_device_features_1_1(struct radv_physical_device *pdevice, f->storageBuffer16BitAccess = true; f->uniformAndStorageBuffer16BitAccess = true; f->storagePushConstant16 = true; - f->storageInputOutput16 = pdevice->rad_info.has_packed_math_16bit && (LLVM_VERSION_MAJOR >= 9 || pdevice->use_aco); + f->storageInputOutput16 = pdevice->rad_info.has_packed_math_16bit && (LLVM_VERSION_MAJOR >= 9 || !pdevice->use_llvm); f->multiview = true; f->multiviewGeometryShader = true; f->multiviewTessellationShader = true; @@ -993,8 +990,8 @@ radv_get_physical_device_features_1_2(struct radv_physical_device *pdevice, f->storageBuffer8BitAccess = true; f->uniformAndStorageBuffer8BitAccess = true; f->storagePushConstant8 = true; - f->shaderBufferInt64Atomics = LLVM_VERSION_MAJOR >= 9 || pdevice->use_aco; - f->shaderSharedInt64Atomics = LLVM_VERSION_MAJOR >= 9 || pdevice->use_aco; + f->shaderBufferInt64Atomics = LLVM_VERSION_MAJOR >= 9 || !pdevice->use_llvm; + f->shaderSharedInt64Atomics = LLVM_VERSION_MAJOR >= 9 || !pdevice->use_llvm; f->shaderFloat16 = pdevice->rad_info.has_packed_math_16bit; f->shaderInt8 = true; @@ -1212,7 +1209,7 @@ void radv_GetPhysicalDeviceFeatures2( case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT: { VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT *features = (VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT *)ext; - features->shaderDemoteToHelperInvocation = LLVM_VERSION_MAJOR >= 9 || pdevice->use_aco; + features->shaderDemoteToHelperInvocation = LLVM_VERSION_MAJOR >= 9 || !pdevice->use_llvm; break; } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT: { diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index 68984000d561a73c09ba101c54917350c187a6c2..4027eec0c385f367cfcfb9e549f07c9ef5ccbc1a 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -94,7 +94,7 @@ EXTENSIONS = [ Extension('VK_KHR_sampler_mirror_clamp_to_edge', 1, True), Extension('VK_KHR_sampler_ycbcr_conversion', 1, True), Extension('VK_KHR_separate_depth_stencil_layouts', 1, True), - Extension('VK_KHR_shader_atomic_int64', 1, 'LLVM_VERSION_MAJOR >= 9 || device->use_aco'), + Extension('VK_KHR_shader_atomic_int64', 1, 'LLVM_VERSION_MAJOR >= 9 || !device->use_llvm'), Extension('VK_KHR_shader_clock', 1, True), Extension('VK_KHR_shader_draw_parameters', 1, True), Extension('VK_KHR_shader_float_controls', 1, True), @@ -151,7 +151,7 @@ EXTENSIONS = [ Extension('VK_EXT_sample_locations', 1, 'device->rad_info.chip_class < GFX10'), Extension('VK_EXT_sampler_filter_minmax', 1, True), Extension('VK_EXT_scalar_block_layout', 1, 'device->rad_info.chip_class >= GFX7'), - Extension('VK_EXT_shader_demote_to_helper_invocation',1, 'LLVM_VERSION_MAJOR >= 9 || device->use_aco'), + Extension('VK_EXT_shader_demote_to_helper_invocation',1, 'LLVM_VERSION_MAJOR >= 9 || !device->use_llvm'), Extension('VK_EXT_shader_viewport_index_layer', 1, True), Extension('VK_EXT_shader_stencil_export', 1, True), Extension('VK_EXT_shader_subgroup_ballot', 1, True), diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 312611adc07125c630273a96359e6fb2d5b6cef9..2816712bb2e2c62a011d13d4d8df7696fb7916ab 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -222,8 +222,8 @@ static uint32_t get_hash_flags(struct radv_device *device) hash_flags |= RADV_HASH_SHADER_PS_WAVE32; if (device->physical_device->ge_wave_size == 32) hash_flags |= RADV_HASH_SHADER_GE_WAVE32; - if (device->physical_device->use_aco) - hash_flags |= RADV_HASH_SHADER_ACO; + if (device->physical_device->use_llvm) + hash_flags |= RADV_HASH_SHADER_LLVM; return hash_flags; } @@ -2521,7 +2521,7 @@ radv_fill_shader_info(struct radv_pipeline *pipeline, pipeline->layout, &keys[MESA_SHADER_FRAGMENT], &infos[MESA_SHADER_FRAGMENT], - pipeline->device->physical_device->use_aco); + pipeline->device->physical_device->use_llvm); /* TODO: These are no longer used as keys we should refactor this */ keys[MESA_SHADER_VERTEX].vs_common_out.export_prim_id = @@ -2573,7 +2573,7 @@ radv_fill_shader_info(struct radv_pipeline *pipeline, radv_nir_shader_info_pass(combined_nir[i], pipeline->layout, &key, &infos[MESA_SHADER_TESS_CTRL], - pipeline->device->physical_device->use_aco); + pipeline->device->physical_device->use_llvm); } keys[MESA_SHADER_TESS_EVAL].tes.num_patches = @@ -2597,7 +2597,7 @@ radv_fill_shader_info(struct radv_pipeline *pipeline, pipeline->layout, &keys[pre_stage], &infos[MESA_SHADER_GEOMETRY], - pipeline->device->physical_device->use_aco); + pipeline->device->physical_device->use_llvm); } filled_stages |= (1 << pre_stage); @@ -2622,7 +2622,7 @@ radv_fill_shader_info(struct radv_pipeline *pipeline, radv_nir_shader_info_init(&infos[i]); radv_nir_shader_info_pass(nir[i], pipeline->layout, - &keys[i], &infos[i], pipeline->device->physical_device->use_aco); + &keys[i], &infos[i], pipeline->device->physical_device->use_llvm); } for (int i = 0; i < MESA_SHADER_STAGES; i++) { @@ -2832,14 +2832,15 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline, /* do this again since information such as outputs_read can be out-of-date */ nir_shader_gather_info(nir[i], nir_shader_get_entrypoint(nir[i])); - if (device->physical_device->use_aco) { + if (device->physical_device->use_llvm) { + NIR_PASS_V(nir[i], nir_lower_bool_to_int32); + } else { NIR_PASS_V(nir[i], nir_lower_non_uniform_access, nir_lower_non_uniform_ubo_access | nir_lower_non_uniform_ssbo_access | nir_lower_non_uniform_texture_access | nir_lower_non_uniform_image_access); - } else - NIR_PASS_V(nir[i], nir_lower_bool_to_int32); + } } } @@ -2888,7 +2889,7 @@ VkResult radv_create_shaders(struct radv_pipeline *pipeline, radv_nir_shader_info_pass(nir[MESA_SHADER_GEOMETRY], pipeline->layout, &key, - &info, pipeline->device->physical_device->use_aco); + &info, pipeline->device->physical_device->use_llvm); info.wave_size = 64; /* Wave32 not supported. */ info.ballot_bit_size = 64; @@ -5744,12 +5745,12 @@ VkResult radv_GetPipelineExecutableInternalRepresentationsKHR( /* backend IR */ if (p < end) { p->isText = true; - if (pipeline->device->physical_device->use_aco) { - desc_copy(p->name, "ACO IR"); - desc_copy(p->description, "The ACO IR after some optimizations"); - } else { + if (pipeline->device->physical_device->use_llvm) { desc_copy(p->name, "LLVM IR"); desc_copy(p->description, "The LLVM IR after some optimizations"); + } else { + desc_copy(p->name, "ACO IR"); + desc_copy(p->description, "The ACO IR after some optimizations"); } if (radv_copy_representation(p->pData, &p->dataSize, shader->ir_string) != VK_SUCCESS) result = VK_INCOMPLETE; diff --git a/src/amd/vulkan/radv_private.h b/src/amd/vulkan/radv_private.h index 820644f5f8d532703dcea501d98a4cb900b68b8a..902893a7d40d815ff4bdc2a62f55795d7c131ec6 100644 --- a/src/amd/vulkan/radv_private.h +++ b/src/amd/vulkan/radv_private.h @@ -311,8 +311,8 @@ struct radv_physical_device { uint8_t cs_wave_size; uint8_t ge_wave_size; - /* Whether to use the experimental compiler backend */ - bool use_aco; + /* Whether to use the LLVM compiler backend */ + bool use_llvm; /* This is the drivers on-disk cache used as a fallback as opposed to * the pipeline cache defined by apps. @@ -1581,7 +1581,7 @@ struct radv_shader_module; #define RADV_HASH_SHADER_CS_WAVE32 (1 << 1) #define RADV_HASH_SHADER_PS_WAVE32 (1 << 2) #define RADV_HASH_SHADER_GE_WAVE32 (1 << 3) -#define RADV_HASH_SHADER_ACO (1 << 4) +#define RADV_HASH_SHADER_LLVM (1 << 4) void radv_hash_shaders(unsigned char *hash, @@ -2396,7 +2396,7 @@ void radv_nir_shader_info_pass(const struct nir_shader *nir, const struct radv_pipeline_layout *layout, const struct radv_shader_variant_key *key, struct radv_shader_info *info, - bool use_aco); + bool use_llvm); void radv_nir_shader_info_init(struct radv_shader_info *info); diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c index 1d653e786c553baea3a2a9ac005cde5328997c32..2aa6b191699093afe3ca1f0f3df7262388a0b31d 100644 --- a/src/amd/vulkan/radv_shader.c +++ b/src/amd/vulkan/radv_shader.c @@ -309,8 +309,8 @@ radv_shader_compile_to_nir(struct radv_device *device, { 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 @@ -458,7 +458,7 @@ radv_shader_compile_to_nir(struct radv_device *device, 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); @@ -1166,14 +1166,14 @@ shader_variant_compile(struct radv_device *device, 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; @@ -1234,7 +1234,7 @@ radv_shader_variant_compile(struct radv_device *device, 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, @@ -1251,7 +1251,7 @@ radv_create_gs_copy_shader(struct radv_device *device, { 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, diff --git a/src/amd/vulkan/radv_shader_info.c b/src/amd/vulkan/radv_shader_info.c index dc4aea1d2198bb141007128b9123a1164773aad2..d8cb194d059691c220a30a73e51688b58a30e1ed 100644 --- a/src/amd/vulkan/radv_shader_info.c +++ b/src/amd/vulkan/radv_shader_info.c @@ -668,7 +668,7 @@ radv_nir_shader_info_pass(const struct nir_shader *nir, const struct radv_pipeline_layout *layout, const struct radv_shader_variant_key *key, struct radv_shader_info *info, - bool use_aco) + bool use_llvm) { struct nir_function *func = (struct nir_function *)exec_list_get_head_const(&nir->functions); @@ -822,13 +822,7 @@ radv_nir_shader_info_pass(const struct nir_shader *nir, struct radv_es_output_info *es_info = nir->info.stage == MESA_SHADER_VERTEX ? &info->vs.es_info : &info->tes.es_info; - if (use_aco) { - /* The outputs don't contain gaps, se we can use the number of outputs */ - uint32_t num_outputs_written = nir->info.stage == MESA_SHADER_VERTEX - ? info->vs.num_linked_outputs - : info->tes.num_linked_outputs; - es_info->esgs_itemsize = num_outputs_written * 16; - } else { + if (use_llvm) { /* The outputs may contain gaps, use the highest output index + 1 */ uint32_t max_output_written = 0; uint64_t output_mask = nir->info.outputs_written; @@ -839,8 +833,13 @@ radv_nir_shader_info_pass(const struct nir_shader *nir, max_output_written = MAX2(param_index, max_output_written); } - es_info->esgs_itemsize = (max_output_written + 1) * 16; + } else { + /* The outputs don't contain gaps, se we can use the number of outputs */ + uint32_t num_outputs_written = nir->info.stage == MESA_SHADER_VERTEX + ? info->vs.num_linked_outputs + : info->tes.num_linked_outputs; + es_info->esgs_itemsize = num_outputs_written * 16; } } diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c index 3c0e6a52332d00e10dd157a4ed428f5037980f51..29e7b20b886e2645bd37140733bd0a85b2641f37 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c @@ -46,13 +46,13 @@ do_winsys_init(struct radv_amdgpu_winsys *ws, int fd) return false; /* LLVM 11 is required for GFX10.3. */ - if (ws->info.chip_class == GFX10_3 && !ws->use_aco && LLVM_VERSION_MAJOR < 11) { + if (ws->info.chip_class == GFX10_3 && ws->use_llvm && LLVM_VERSION_MAJOR < 11) { fprintf(stderr, "radv: GFX 10.3 requires LLVM 11 or higher\n"); return false; } /* LLVM 9.0 is required for GFX10. */ - if (ws->info.chip_class == GFX10 && !ws->use_aco && LLVM_VERSION_MAJOR < 9) { + if (ws->info.chip_class == GFX10 && ws->use_llvm && LLVM_VERSION_MAJOR < 9) { fprintf(stderr, "radv: Navi family support requires LLVM 9 or higher\n"); return false; } @@ -194,7 +194,7 @@ radv_amdgpu_winsys_create(int fd, uint64_t debug_flags, uint64_t perftest_flags) ws->use_local_bos = perftest_flags & RADV_PERFTEST_LOCAL_BOS; ws->zero_all_vram_allocs = debug_flags & RADV_DEBUG_ZERO_VRAM; - ws->use_aco = perftest_flags & RADV_PERFTEST_ACO; + ws->use_llvm = debug_flags & RADV_DEBUG_LLVM; list_inithead(&ws->global_bo_list); pthread_mutex_init(&ws->global_bo_list_lock, NULL); ws->base.query_info = radv_amdgpu_winsys_query_info; diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h index 2ec223df3d8cfdff0e3626f48556d139e304eacb..0601481625c622ebecf1bfaa2aeaf863681e4303 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h @@ -46,7 +46,7 @@ struct radv_amdgpu_winsys { bool use_ib_bos; bool zero_all_vram_allocs; bool use_local_bos; - bool use_aco; + bool use_llvm; unsigned num_buffers; pthread_mutex_t global_bo_list_lock;