From fa149b996d1541106c6aa950d06e0275e6556935 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Sat, 13 Jun 2020 14:23:17 +0200 Subject: [PATCH] radv: only requires LLVM 9 for GFX10 if not using ACO MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In case someone links RADV with LLVM 8 and wants to use ACO. Signed-off-by: Samuel Pitoiset Reviewed-by: Daniel Schürmann Part-of: --- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c | 3 ++- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c index 0f7f5bcf3bf..16c950542d7 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c @@ -46,7 +46,7 @@ do_winsys_init(struct radv_amdgpu_winsys *ws, int fd) return false; /* LLVM 9.0 is required for GFX10. */ - if (ws->info.chip_class == GFX10 && LLVM_VERSION_MAJOR < 9) { + if (ws->info.chip_class == GFX10 && !ws->use_aco && LLVM_VERSION_MAJOR < 9) { fprintf(stderr, "radv: Navi family support requires LLVM 9 or higher\n"); return false; } @@ -188,6 +188,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; 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 166b2dfe1ca..2ec223df3d8 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h @@ -46,6 +46,7 @@ struct radv_amdgpu_winsys { bool use_ib_bos; bool zero_all_vram_allocs; bool use_local_bos; + bool use_aco; unsigned num_buffers; pthread_mutex_t global_bo_list_lock; -- 2.30.2