radv: only requires LLVM 9 for GFX10 if not using ACO
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 13 Jun 2020 12:23:17 +0000 (14:23 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 18 Jun 2020 09:45:20 +0000 (09:45 +0000)
In case someone links RADV with LLVM 8 and wants to use ACO.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5454>

src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h

index 0f7f5bcf3bfa91a933629dbcaf20a4bf18254927..16c950542d76f48cc1fc468edfeab37ab122d4d6 100644 (file)
@@ -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;
index 166b2dfe1ca04b67d8af02f230c49108417b1e11..2ec223df3d8cfdff0e3626f48556d139e304eacb 100644 (file)
@@ -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;