Debug (2)

KeyDefaultEffect
fsr_input_conventions0Reverses what the runtime takes a game's DLSS inputs to mean when it gives them to FSR 2, a bit each: 1 the jitter's sign in x, 2 in y, 4 the motion vectors' sign, 8 inverted depth, 16 motion vectors that include the jitter, 32 FSR's own exposure, 64 HDR color input. For a game whose picture smears. The launcher's Settings have a box for each bit; the game's menu shows the value
log1Log detail, 0 to 3. 2 logs everything, which adds runtime overhead. 3 also logs the profiler's counters every window: the CPU work each kind of resource takes a frame, and the GPU's time in each pass, which needs the device's timestamps and is vk_gpu_profile's work
log_max16The game log's size in MiB, 1 to 1024. Past it the log keeps the run's start and its last lines, saying so in the log and once over the game. The 5 last runs' logs are kept, the ones before this run's in logs/ beside it
emulated_cores_mode21 (On) runs a guest thread only while it holds one of the console's cores, one thread per core at a time, in priority order. 0 (Off) runs every guest thread as soon as the host schedules it (svcGetCurrentProcessorNumber still answers the thread's core). 2 (Auto) is 0 for an Ounce program, whose eight cores run best without the ordering, and 1 for the others; an Ounce game says so as it starts
auto_stub_ipc1A service command the runtime doesn't know answers success, logged as [undeclared], and a service it doesn't have answers every command that way. 0 answers them with the console's UnknownCommandId instead, which shows the gap where the game makes the call
diag01 saves the data of each new compute shader to captures/compute, and each new shader's snx-shaderc corpus entry to captures/shaders, for debugging
vk_validation01 turns on the Vulkan validation layer (VK_LAYER_KHRONOS_validation, from the Vulkan SDK or the distribution's validation layers package), which logs each misuse of Vulkan it finds. It slows the game down a lot. Without the layer installed the run only warns. 2 also turns on GPU-assisted validation, which finds out-of-bounds and unwritten descriptor accesses in shaders, and is slower again
vk_pipeline_cache11 keeps the GPU driver's compiled pipelines between runs, in vk_pipelines.<driver>.bin of the game's shader cache, one file for each driver, and its shader objects' binaries in vk_shaders.<driver>.bin; a file another GPU or another build of the driver wrote, or one cut inside its header, is not given to the driver, and the log says why. A 3DS game takes it too, and where it draws with shader objects keeps their binaries instead, in vk_shaders.<driver>.bin. 0 neither reads nor writes those files, so every pipeline or shader compiles again as in a first run, to measure one
vk_mirror_past_limit11 makes the GPU mirror of guest memory, where an Ounce game's programs read and write their storage, even where it is bigger than the device's maxBufferSize, as feat/ounce makes it: RADV (4 GiB) makes and runs it, though the validation layer calls it invalid. 0 makes it only where it fits; elsewhere the storage results land through the CPU, several times slower in one game. With vk_validation on it is made only where it fits, as the layer would report it. Temporary, to compare
vk_apiautoThe Vulkan version the renderer runs at. auto takes the device's, up to 1.3: a device that has only 1.2 runs the 1.2 way where it has the extensions 1.3 took in (VK_KHR_synchronization2, VK_KHR_dynamic_rendering, the extended dynamic state 1 and 2, VK_KHR_maintenance4, VK_KHR_format_feature_flags2, demotion, pipeline creation feedback and store op NONE), and is refused, naming what it lacks, where it has not. 1.2 runs the 1.2 way on a 1.3 device too, to test it there: those extensions in place of the 1.3 core, shaders in SPIR-V 1.5, no Vulkan Video decode (FFmpeg's decoder needs 1.3), and the subgroup sizes of the mesh draws and of the compute subgroups of 32 from VK_EXT_subgroup_size_control where the device has it. The log says the way and why (vk_api=1.2 runs the Vulkan 1.2 way on this 1.3 device); any value but auto and 1.2 stops the game, naming it and those two
native_astc11 samples ASTC textures as the game's blocks where the GPU samples ASTC (most phone and tablet GPUs), in a quarter to a 36th of the memory. 0 decodes them to RGBA8 on the GPU, as on GPUs without ASTC (most desktop ones), to compare the two. On such a GPU 1 is a warning at start (ASTC)
native_bc11 samples BC1 to BC7 textures as the game's blocks where the GPU samples BCn (desktop GPUs and some phone ones). A GPU without BCn (most phone ones, Mali and Adreno's own driver among them) gets them encoded again on the GPU as ETC2 and EAC as they load, the same bytes a texel, where it samples those (native_etc2=1), BC6H decoded to half floats; else all decoded, four to eight times the memory (BCn without BCn). 0 sends BCn down that path on a GPU that samples BCn too, to compare the two on a desktop GPU
bcn_astc1On a GPU that samples ASTC and not BCn (most phone and tablet ones): 1 (Auto) encodes BC1, BC2, BC3 and BC7 textures again as ASTC 4x4 as they load, several times faster than as ETC2 and closer to the game's blocks (BCn without BCn). ASTC 4x4 is twice BC1's bytes, so once the GPU's memory runs short the BC1 textures loaded from then on are encoded as ETC2 (native_etc2) again, half the bytes and slower to load. 2 (Always) keeps BC1 as ASTC whatever the memory. 0 encodes all of them as ETC2. BC4 and BC5 are encoded as EAC either way
native_etc211 samples ETC2 and EAC textures as the game's blocks where the GPU samples ETC2 (most phone and tablet GPUs), in a quarter to an eighth of the memory, and so are the BCn textures a GPU without BCn gets encoded again as ETC2 (native_bc). 0 decodes them on the GPU, as on GPUs without ETC2 (most desktop ones), and BCn too there, to compare the two. On such a GPU 1 is a warning at start
cpu_extensions01 decodes LSE atomics, RCpc loads, and PAuth branches and signing with authentication off, for a Switch game. An Ounce game takes its Cortex-A78C's instructions without it (Ounce). It gives no pointer authentication protection. Recompile the game with the same value as each run
gdb_jit01, with the GDB stub (-S or -s), hands the code the JIT compiles to GDB (GDB). GDB stops the game for each compile while it is attached, and each compile's object stays in memory for the run
alias_pool11 has a view of guest memory (MapMemory, MapProcessMemory, code memory's owner and slave) share its source's host pages, as the console's do, where the host's pages are 4 KiB (Linux and Android). 0 makes every view a copy, which reaches the source at its unmap or at a flushed line after the write, as hosts without a pool run (Windows among them): for tests of that path, and a diagnosis
guest_files0 (iOS 1)1 puts the game's memory in unlinked files of 1 GiB (larger for a large address space) in the temporary folder (Apple), so the system counts its pages as file pages, which it can write to the disk, and not against the app's memory limit (iOS ends an app past it). The system writes the changed memory to the disk from time to time and under memory pressure, up to the game's memory: it needs that much free disk and 2 GiB more, or the game keeps anonymous memory. The files go away when the game ends. 0 is anonymous memory. macOS and iOS only
write_tracking0How the runtime finds the guest pages written since the caches last looked (Renderer coherence). 0 is the host's own: userfaultfd's write protection on Linux 6.7 and later, the reservation's write watch on Windows, page protection on the other hosts. 1 is page protection and the fault handler, as macOS, FreeBSD, Android and older Linux track (not on Windows, which says so at start). 2 is none: the caches compare guest memory's contents, to measure and test that path
write_tracking_hot_pages21, with page protection (write_tracking=1, or the host's own on macOS, iOS, FreeBSD, Android and Linux before 6.7), leaves a page the scans find written twice in a row writable, without its fault, and reports it written at each scan, for 32 scans; then it is protected again. A render target protects its pages again before each baseline, so its write-back keeps the GPU's pixels (Renderer coherence). 0 protects every written page again at each scan. 2, Auto, is 1 where page protection tracks the writes. Nothing where userfaultfd or Windows' write watch tracks them, which 1 says at start. In place of write_tracking_hot (deprecations)
memory_traps0How the runtime traps guest memory the GPU owns until the CPU touches it (GPU ownership). 0 is userfaultfd's minor faults where Linux has them, else page protection, which Windows uses with an exception handler; none yet on macOS and FreeBSD. 1 is page protection and the fault handler, as Android, Linux before 5.13 and Windows trap (Linux, Android and Windows only: elsewhere it says so at start). 2 is none: a GPU result lands in guest memory at its fence, to measure and test that path
host_page0The page size the runtime works in, in bytes: a power of two larger than the host's own, up to 1 MiB. 16384 or 65536 runs as a host with 16 or 64 KiB pages does, where views copy and a host page holds several guest pages (PowerPC64). 0 is the host's own; any other value runs with the host's own too, said at start
nce_foreign_scan0Under NCE, the seconds between two looks at what of the host's process lies in the game's addresses and is not the game's (another owner's mapping over its memory, a run nothing maps), 1 to 3600; each new finding is logged once. 0 is off: it looks only as the game's code starts and in a crash report (NCE). Each look reads /proc/self/maps, a few milliseconds
gpu_page_check01 counts the GPU's written pages (gpu/maxwell/maxwell3d.c and write_pages.c) and the renderer's pending results (gpu/vk/pending_pages.c), which the runtime counts by GPU page, by guest address too, and each lookup translates its range through the GMMU as well: the log warns of each write or result only that finds. Slow: for checking those tables
draw_state_check01 has a draw that keeps an earlier draw's shaders and pipeline make them again to compare, and the log names each difference (a register missing from a group, an input that is not compared, a kept key that is not the state's bytes). A kept constant buffer's bytes are hashed again (where the CPU wrote nothing since), a kept texture view or sampler is made again, and a descriptor kept from an earlier frame is encoded again, and compared too. A texture the quick check finds unchanged is checked the full way too, and the log counts where the full check found a change. The buffers and images of a draw past the count it has of each, which a draw leaves unwritten, hold a pattern, so a read past a count shows. Slow: for checking what a draw keeps

Made from docs/user/settings.md at 69237645142c. GPL-3.0-or-later.