diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 60bc189e4f1..dbfb9c8fdea 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -111,7 +111,8 @@ static void si_init_compiler(struct si_screen *sscreen, (sscreen->info.chip_class < GFX9 ? AC_TM_FORCE_DISABLE_XNACK : 0) | (!sscreen->llvm_has_working_vgpr_indexing ? AC_TM_PROMOTE_ALLOCA_TO_SCRATCH : 0); - compiler->tm = ac_create_target_machine(sscreen->info.family, tm_options); + compiler->tm = ac_create_target_machine(sscreen->info.family, + tm_options, &compiler->triple); } static void si_destroy_compiler(struct si_compiler *compiler) diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 8c479d638a9..e6205a204c1 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -314,6 +314,7 @@ struct si_shader; /* Per-thread persistent LLVM objects. */ struct si_compiler { LLVMTargetMachineRef tm; + const char *triple; }; /* State of the context creating the shader object. */ diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c index d0332a6078c..cad81487d7e 100644 --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c @@ -1009,7 +1009,7 @@ void si_llvm_context_init(struct si_shader_context *ctx, ctx->gallivm.context = LLVMContextCreate(); ctx->gallivm.module = LLVMModuleCreateWithNameInContext("tgsi", ctx->gallivm.context); - LLVMSetTarget(ctx->gallivm.module, "amdgcn--"); + LLVMSetTarget(ctx->gallivm.module, compiler->triple); LLVMTargetDataRef data_layout = LLVMCreateTargetDataLayout(compiler->tm); char *data_layout_str = LLVMCopyStringRepOfTargetData(data_layout); |