# Switch NX2 - read when the Eglantine 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.
#
# 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

# Paces frame submission 2 frames ahead. Reduces frametime spikes, but adds ~1-2 frames of input latency.
# Enable only if frame pacing stability is preferred over responsive controls.
#EDEN_NX2_FRAMES_AHEAD=2

# --- 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
# Size the temporary ASTC decode images exactly (=0) instead of rounding them up to a multiple of 64
# texels so textures of nearly the same size share one.
#EDEN_NX2_ASTC_SCRATCH_BUCKET=0
# Submit after the ASTC decode (=0) instead of recording the decode and the BC encode in one submit.
#EDEN_NX2_ASTC_ONE_SUBMIT=0
# Only move finished ASTC decode images back to the pool once a frame, and drop the newest one when
# the pool is full (=0), instead of when a texture asks for one and evicting the oldest.
#EDEN_NX2_ASTC_POOL_V2=0
# Only reuse an ASTC decode image of exactly the size asked for (=0), not a larger one.
#EDEN_NX2_ASTC_POOL_FIT=0
