From 6d8bc862c32a1e0c65d6e27560ecad5ba3b2f837 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 19 Aug 2014 13:18:19 -0700 Subject: [PATCH] radeon: Add work-around for missing Hainan support in clang < 3.6 https://bugs.freedesktop.org/show_bug.cgi?id=82709 CC: "10.2" --- src/gallium/drivers/radeon/r600_pipe_common.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index a6bba8f..78070d4 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -499,7 +499,18 @@ static int r600_get_compute_param(struct pipe_screen *screen, //TODO: select these params by asic switch (param) { case PIPE_COMPUTE_CAP_IR_TARGET: { - const char *gpu = r600_get_llvm_processor_name(rscreen->family); + const char *gpu; + switch(rscreen->family) { + /* Clang < 3.6 is missing Hainan in its list of + * GPUs, so we need to use the name of a similar GPU. + */ +#if HAVE_LLVM < 0x0306 + case CHIP_HAINAN: + gpu = "oland"; +#endif + default: + gpu = r600_get_llvm_processor_name(rscreen->family); + } if (ret) { sprintf(ret, "%s-r600--", gpu); } -- 1.8.3.1