ac: completely remove +auto-waitcnt-before-barrier
authorMarek Olšák <marek.olsak@amd.com>
Thu, 16 Aug 2018 01:14:47 +0000 (21:14 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 22 Aug 2018 00:50:37 +0000 (20:50 -0400)
it causes corruption on several different GPU generations.

Cc: 18.2 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/amd/common/ac_llvm_util.c
src/amd/common/ac_llvm_util.h
src/gallium/drivers/radeonsi/si_pipe.c

index 42bc538b4d75e58c60b72fd5fa473f6fdfe43e38..cd3525187a00653727d3ce3584c7e3326e533789 100644 (file)
@@ -149,16 +149,13 @@ static LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family,
        char features[256];
        const char *triple = (tm_options & AC_TM_SUPPORTS_SPILL) ? "amdgcn-mesa-mesa3d" : "amdgcn--";
        LLVMTargetRef target = ac_get_llvm_target(triple);
-       bool barrier_does_waitcnt = (tm_options & AC_TM_AUTO_WAITCNT_BEFORE_BARRIER) &&
-                                   family != CHIP_VEGA20;
 
        snprintf(features, sizeof(features),
-                "+DumpCode,+vgpr-spilling,-fp32-denormals,+fp64-denormals%s%s%s%s%s",
+                "+DumpCode,+vgpr-spilling,-fp32-denormals,+fp64-denormals%s%s%s%s",
                 tm_options & AC_TM_SISCHED ? ",+si-scheduler" : "",
                 tm_options & AC_TM_FORCE_ENABLE_XNACK ? ",+xnack" : "",
                 tm_options & AC_TM_FORCE_DISABLE_XNACK ? ",-xnack" : "",
-                tm_options & AC_TM_PROMOTE_ALLOCA_TO_SCRATCH ? ",-promote-alloca" : "",
-                barrier_does_waitcnt ? ",+auto-waitcnt-before-barrier" : "");
+                tm_options & AC_TM_PROMOTE_ALLOCA_TO_SCRATCH ? ",-promote-alloca" : "");
        
        LLVMTargetMachineRef tm = LLVMCreateTargetMachine(
                                     target,
index e252bed3bb676a6fe37c8124046a58063dfd9c9d..eaf5f21876b99b610765566fff28b4f4500713db 100644 (file)
@@ -65,7 +65,6 @@ enum ac_target_machine_options {
        AC_TM_CHECK_IR = (1 << 5),
        AC_TM_ENABLE_GLOBAL_ISEL = (1 << 6),
        AC_TM_CREATE_LOW_OPT = (1 << 7),
-       AC_TM_AUTO_WAITCNT_BEFORE_BARRIER = (1 << 8),
 };
 
 enum ac_float_mode {
index 4327a3f749b1bc19c60039fee9f480c2d7683869..13fcf1f3aeaac27e94f187a989854839f1cf6d85 100644 (file)
@@ -115,7 +115,6 @@ static void si_init_compiler(struct si_screen *sscreen,
                                       sscreen->info.chip_class <= VI;
 
        enum ac_target_machine_options tm_options =
-               AC_TM_AUTO_WAITCNT_BEFORE_BARRIER |
                (sscreen->debug_flags & DBG(SI_SCHED) ? AC_TM_SISCHED : 0) |
                (sscreen->debug_flags & DBG(GISEL) ? AC_TM_ENABLE_GLOBAL_ISEL : 0) |
                (sscreen->info.chip_class >= GFX9 ? AC_TM_FORCE_ENABLE_XNACK : 0) |