From 9338ab0afd0ab82a9077e11651c61424039bd12c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 14 Dec 2016 18:35:12 +0100 Subject: [PATCH] radeonsi/gfx9: set the LLVM processor, require LLVM 5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/gallium/drivers/radeon/r600_pipe_common.c | 2 ++ src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 7ec57031412..052054b421d 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -952,6 +952,8 @@ const char *r600_get_llvm_processor_name(enum radeon_family family) case CHIP_POLARIS11: case CHIP_POLARIS12: /* same as polaris11 */ return HAVE_LLVM >= 0x0309 ? "polaris11" : "carrizo"; + case CHIP_VEGA10: + return "gfx900"; default: return ""; } diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c index 25f08ef0acd..4becd2a6818 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c @@ -232,6 +232,13 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd) goto fail; } + /* LLVM 5.0 is required for GFX9. */ + if (ws->info.chip_class >= GFX9 && HAVE_LLVM < 0x0500) { + fprintf(stderr, "amdgpu: LLVM 5.0 is required, got LLVM %i.%i\n", + HAVE_LLVM >> 8, HAVE_LLVM & 255); + goto fail; + } + /* family and rev_id are for addrlib */ switch (ws->info.family) { case CHIP_TAHITI: -- 2.30.2