summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-08-19 13:18:19 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2014-08-27 13:38:29 +0100
commit0931f475fa08fdb5b6ea3521cd3dbebd60952fa9 (patch)
treeb32912ac72d7c424d277462abccf2c4915b0996c /src
parent6f8d2db2ef9f9d33039ef01206417d6c5a1f01a1 (diff)
radeon: Add work-around for missing Hainan support in clang < 3.6 v2
v2: - Add missing break. https://bugs.freedesktop.org/show_bug.cgi?id=82709 CC: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 8109664dedee588dc98c9a7c25bd40c0eb56c35f)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index dde019992d8..4c9d2961f32 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -437,7 +437,20 @@ 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";
+ break;
+#endif
+ default:
+ gpu = r600_get_llvm_processor_name(rscreen->family);
+ break;
+ }
if (ret) {
sprintf(ret, "%s-r600--", gpu);
}