summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_pipe.c
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2014-12-23 10:26:23 -0500
committerTom Stellard <[email protected]>2015-01-06 12:53:21 -0800
commita8ef880a1b38cbcfc26e9f829338739d16cece99 (patch)
tree5a65fa8ae3ce7115a4b687c7394ced18a43b3054 /src/gallium/drivers/radeonsi/si_pipe.c
parent761e36b4caab4e8e09a4c2b1409a825902fc7d2c (diff)
radeon/llvm: Use amdgcn triple for SI+ on LLVM >= 3.6
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_pipe.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 4b7156140b7..02c02ab07d3 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -485,6 +485,11 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
{
struct si_screen *sscreen = CALLOC_STRUCT(si_screen);
LLVMTargetRef r600_target;
+#if HAVE_LLVM >= 0x0306
+ const char *triple = "amdgcn--";
+#else
+ const char *triple = "r600--";
+#endif
if (sscreen == NULL) {
return NULL;
}
@@ -514,8 +519,8 @@ struct pipe_screen *radeonsi_screen_create(struct radeon_winsys *ws)
#if HAVE_LLVM >= 0x0306
/* Initialize LLVM TargetMachine */
- r600_target = radeon_llvm_get_r600_target();
- sscreen->tm = LLVMCreateTargetMachine(r600_target, "r600--",
+ r600_target = radeon_llvm_get_r600_target(triple);
+ sscreen->tm = LLVMCreateTargetMachine(r600_target, triple,
r600_get_llvm_processor_name(sscreen->b.family),
"+DumpCode", LLVMCodeGenLevelDefault, LLVMRelocDefault,
LLVMCodeModelDefault);