From: Samuel Pitoiset Date: Fri, 26 Jun 2020 07:27:46 +0000 (+0200) Subject: radv: remove the load/store workaround for Monster Hunter World with LLVM X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f13d79f519db446df616347138cb0e897758c1d1;p=mesa.git radv: remove the load/store workaround for Monster Hunter World with LLVM Now that ACO is default, this is pointless. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- diff --git a/docs/envvars.rst b/docs/envvars.rst index 4ad5e72d79d..3177347eab5 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -540,8 +540,6 @@ RADV driver environment variables disable HIZ for depthstencil images ``noibs`` disable directly recording command buffers in GPU-visible memory - ``noloadstoreopt`` - disable LLVM SILoadStoreOptimizer pass ``nomemorycache`` disable memory shaders cache ``nongg`` diff --git a/src/amd/llvm/ac_llvm_util.c b/src/amd/llvm/ac_llvm_util.c index 10a931b150f..62e163b0057 100644 --- a/src/amd/llvm/ac_llvm_util.c +++ b/src/amd/llvm/ac_llvm_util.c @@ -175,14 +175,13 @@ static LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family, LLVMTargetRef target = ac_get_llvm_target(triple); snprintf(features, sizeof(features), - "+DumpCode%s%s%s%s%s%s", + "+DumpCode%s%s%s%s%s", LLVM_VERSION_MAJOR >= 11 ? "" : ",-fp32-denormals,+fp64-denormals", family >= CHIP_NAVI10 && !(tm_options & AC_TM_WAVE32) ? ",+wavefrontsize64,-wavefrontsize32" : "", family <= CHIP_NAVI14 && tm_options & AC_TM_FORCE_ENABLE_XNACK ? ",+xnack" : "", family <= CHIP_NAVI14 && tm_options & AC_TM_FORCE_DISABLE_XNACK ? ",-xnack" : "", - tm_options & AC_TM_PROMOTE_ALLOCA_TO_SCRATCH ? ",-promote-alloca" : "", - tm_options & AC_TM_NO_LOAD_STORE_OPT ? ",-load-store-opt" : ""); + tm_options & AC_TM_PROMOTE_ALLOCA_TO_SCRATCH ? ",-promote-alloca" : ""); LLVMTargetMachineRef tm = LLVMCreateTargetMachine( target, diff --git a/src/amd/llvm/ac_llvm_util.h b/src/amd/llvm/ac_llvm_util.h index f9650bdf4f1..1d90a6a1a03 100644 --- a/src/amd/llvm/ac_llvm_util.h +++ b/src/amd/llvm/ac_llvm_util.h @@ -64,8 +64,7 @@ enum ac_target_machine_options { AC_TM_CHECK_IR = (1 << 4), AC_TM_ENABLE_GLOBAL_ISEL = (1 << 5), AC_TM_CREATE_LOW_OPT = (1 << 6), - AC_TM_NO_LOAD_STORE_OPT = (1 << 7), - AC_TM_WAVE32 = (1 << 8), + AC_TM_WAVE32 = (1 << 7), }; enum ac_float_mode { diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index 557e402105f..df7d4d2374f 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -50,13 +50,12 @@ enum { RADV_DEBUG_CHECKIR = 0x80000, RADV_DEBUG_NOTHREADLLVM = 0x100000, RADV_DEBUG_NOBINNING = 0x200000, - RADV_DEBUG_NO_LOAD_STORE_OPT = 0x400000, - RADV_DEBUG_NO_NGG = 0x800000, - RADV_DEBUG_ALL_ENTRYPOINTS = 0x1000000, - RADV_DEBUG_DUMP_META_SHADERS = 0x2000000, - RADV_DEBUG_NO_MEMORY_CACHE = 0x4000000, - RADV_DEBUG_DISCARD_TO_DEMOTE = 0x8000000, - RADV_DEBUG_LLVM = 0x10000000, + RADV_DEBUG_NO_NGG = 0x400000, + RADV_DEBUG_ALL_ENTRYPOINTS = 0x800000, + RADV_DEBUG_DUMP_META_SHADERS = 0x1000000, + RADV_DEBUG_NO_MEMORY_CACHE = 0x2000000, + RADV_DEBUG_DISCARD_TO_DEMOTE = 0x4000000, + RADV_DEBUG_LLVM = 0x8000000, }; enum { diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 84f7707def9..ef309249fd8 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -501,7 +501,6 @@ static const struct debug_control radv_debug_options[] = { {"checkir", RADV_DEBUG_CHECKIR}, {"nothreadllvm", RADV_DEBUG_NOTHREADLLVM}, {"nobinning", RADV_DEBUG_NOBINNING}, - {"noloadstoreopt", RADV_DEBUG_NO_LOAD_STORE_OPT}, {"nongg", RADV_DEBUG_NO_NGG}, {"allentrypoints", RADV_DEBUG_ALL_ENTRYPOINTS}, {"metashaders", RADV_DEBUG_DUMP_META_SHADERS}, @@ -548,13 +547,6 @@ radv_handle_per_app_options(struct radv_instance *instance, if (!strcmp(name, "DOOM_VFR")) { /* Work around a Doom VFR game bug */ instance->debug_flags |= RADV_DEBUG_NO_DYNAMIC_BOUNDS; - } else if (!strcmp(name, "MonsterHunterWorld.exe")) { - /* Workaround for a WaW hazard when LLVM moves/merges - * load/store memory operations. - * See https://reviews.llvm.org/D61313 - */ - if (LLVM_VERSION_MAJOR < 9) - instance->debug_flags |= RADV_DEBUG_NO_LOAD_STORE_OPT; } else if (!strcmp(name, "Fledge")) { /* * Zero VRAM for "The Surge 2" diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c index 6ad327b2003..987d1054356 100644 --- a/src/amd/vulkan/radv_nir_to_llvm.c +++ b/src/amd/vulkan/radv_nir_to_llvm.c @@ -4440,8 +4440,6 @@ llvm_compile_shader(struct radv_device *device, tm_options |= AC_TM_SUPPORTS_SPILL; if (args->options->check_ir) tm_options |= AC_TM_CHECK_IR; - if (device->instance->debug_flags & RADV_DEBUG_NO_LOAD_STORE_OPT) - tm_options |= AC_TM_NO_LOAD_STORE_OPT; thread_compiler = !(device->instance->debug_flags & RADV_DEBUG_NOTHREADLLVM);