diff options
author | Marek Olšák <[email protected]> | 2017-04-07 18:30:28 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-05-22 19:23:39 +0200 |
commit | 2beb31bd7c186641a2bb9abf6d2e13d42e43d944 (patch) | |
tree | c285488fa61a33ceb9c4dd320936135baaef0c9d /src/gallium | |
parent | 499f45163a35f1dbaa0eea30e41c889e4aa4cb3a (diff) |
radeonsi/gfx9: compile shaders with +xnack
so that LLVM doesn't allocate SGPRs where XNACK is.
Cc: 17.1 <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index eaa3348bcb7..6f82e294bde 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -33,9 +33,6 @@ #include "vl/vl_decoder.h" #include "../ddebug/dd_util.h" -#define SI_LLVM_DEFAULT_FEATURES \ - "+DumpCode,+vgpr-spilling,-fp32-denormals,-xnack" - /* * pipe_context */ @@ -127,12 +124,16 @@ static LLVMTargetMachineRef si_create_llvm_target_machine(struct si_screen *sscreen) { const char *triple = "amdgcn--"; + char features[256]; + + snprintf(features, sizeof(features), + "+DumpCode,+vgpr-spilling,-fp32-denormals,+fp64-denormals%s%s", + sscreen->b.chip_class >= GFX9 ? ",+xnack" : ",-xnack", + sscreen->b.debug_flags & DBG_SI_SCHED ? ",+si-scheduler" : ""); return LLVMCreateTargetMachine(si_llvm_get_amdgpu_target(triple), triple, r600_get_llvm_processor_name(sscreen->b.family), - sscreen->b.debug_flags & DBG_SI_SCHED ? - SI_LLVM_DEFAULT_FEATURES ",+si-scheduler" : - SI_LLVM_DEFAULT_FEATURES, + features, LLVMCodeGenLevelDefault, LLVMRelocDefault, LLVMCodeModelDefault); |