# Switch NX2 - read when the Lichii GUI starts.
# One NAME=VALUE per line. Lines starting with # are ignored.
# A variable already set in the environment wins over this file.
# Between files, the user copy (%APPDATA%\eden\nx2_switches.txt, or
# $XDG_CONFIG_HOME/eden/nx2_switches.txt) wins over this one, so editing this file is never
# needed: copy the lines you want into your own and restart.
# Beside-application files accept EDEN_NX2_* and the emulator's diagnostic switches only.
# Host environment settings, including library paths such as EDEN_STREAMLINE_DIR, must be
# set in the real environment or the user configuration file at an absolute config location.
#
# Restart the emulator after editing.

# --- Performance tuning defaults for Switch 2 ---
# Offload GPU method/macro execution to the back thread (SPLIT=2 delivers up to +54% FPS alone).
EDEN_NX2_SPLIT=2

# Batch GPU fence syncpoints to reduce host driver overhead and smooth frametimes.
EDEN_NX2_FENCE_BATCH=1

# Leave buffer downloads disabled on Switch 2 (default): forcing downloads (=1) copies back
# 90-220 MB/s of buffers CPU never touches, causing heavy mutex contention and dropping FPS by ~38-63%.
#EDEN_NX2_BUFFER_DOWNLOADS=1

# Which fence the game waits for when it presents. 1 = the previous frame's: the game prepares the
# next frame while the GPU finishes this one, and waits for this one too while the GPU is behind.
# 0 = this frame's: no overlap. Any value other than 1 means 0, so =2 does not run two frames ahead.
# Unset: per title. Ocarina of Time uses 1, Donkey Kong Bananza 0, and other titles wait for this
# frame unless a GPU channel waits on a semaphore the game releases after the present.
# Ocarina of Time with =0 (or =2): 30.9 fps against 38.9 unset, same spot and settings.
#EDEN_NX2_FRAMES_AHEAD=1

# --- Workarounds / Debug ---
# Terrain/indirect drawing fix for Donkey Kong Bananza: enabled by default. Set to 0 only to leave to GPU.
#EDEN_NX2_RESETFIX=0

# Drop reactive-flushing read traps on Switch 2 programs (opt-in; can reduce FPS from 29 to 24 in MKW).
#EDEN_NX2_NO_REACTIVE=1

#EDEN_NX2_MME_JIT=0
#EDEN_NX2_PBFLUSH=0
#EDEN_NX2_SKIP_SAME=0
#EDEN_NX2_INLINE_DEFER=0
#EDEN_NX2_SPLIT_SKIP=1
#EDEN_NX2_AUTO_STUB=1
#EDEN_NX2_KEEP_ASTC=1
