ac/llvm: set xnack like radeonsi does.
authorDave Airlie <airlied@redhat.com>
Thu, 6 Jul 2017 02:01:56 +0000 (03:01 +0100)
committerDave Airlie <airlied@redhat.com>
Thu, 6 Jul 2017 22:07:45 +0000 (23:07 +0100)
Use family, but only set xnack+ for gfx9.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/common/ac_llvm_util.c

index 4f32d4bb974122dec160da13008a596270cb76e8..84ed73f164e1d3f9553c8fc3cd5ce5b950c38dcb 100644 (file)
@@ -126,7 +126,9 @@ LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family, enum ac
        LLVMTargetRef target = ac_get_llvm_target(triple);
 
        snprintf(features, sizeof(features),
-                "+DumpCode,+vgpr-spilling,-fp32-denormals,-xnack");
+                "+DumpCode,+vgpr-spilling,-fp32-denormals%s",
+                family >= CHIP_VEGA10 ? ",+xnack" : ",-xnack");
+       
        LLVMTargetMachineRef tm = LLVMCreateTargetMachine(
                                     target,
                                     triple,