From: Marek Olšák Date: Wed, 14 Dec 2016 17:35:12 +0000 (+0100) Subject: radeonsi/gfx9: set the LLVM processor, require LLVM 5.0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9338ab0afd0ab82a9077e11651c61424039bd12c;p=mesa.git radeonsi/gfx9: set the LLVM processor, require LLVM 5.0 Reviewed-by: Nicolai Hähnle --- 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: