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 <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5658>
This commit is contained in:
@@ -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``
|
||||
|
@@ -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,
|
||||
|
@@ -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 {
|
||||
|
@@ -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 {
|
||||
|
@@ -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"
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user