Debug (3)

KeyDefaultEffect
pool_map_shadow01 has the renderer keep a record of what each texture and sampler header of the game's pools resolved to, which the header's writes, surface changes, draws into a cropped target, the scale, image swaps and views destroyed clear, and compare each draw's textures with the records it holds. The log counts the agreements and the differences by cause every 600 presents, and with draw_state_check=1 names the first differences. Draws still use their own textures, so nothing on the screen changes. Slow: for checking the map that bindless textures will read
tex_events_shadow01 judges each texture a draw keeps by the generations by address of the writes over its memory (the CPU's, the GPU side's, results added, targets drawn, surfaces made or freed): unchanged generations claim its texels are current. The renderer still checks each texture as before, and the log counts every 600 presents the claims each check contradicted, and with draw_state_check=1 names the first ones. Nothing on the screen changes. Slow: for checking the events that bindless textures will take (docs/dev/draw-cost.md, item 7b)
pool_map01 has an Ounce game's textures, where the GPU reads its global memory by address and has unified image layouts, come to each draw through a map of the game's texture and sampler pools on the GPU, which the draws that sampled them before taught: a draw writes no word for a texture the map holds, and leaves out the read barriers that the barriers at the writer cover (writer_barriers, on with it). The log counts the textures through the map, and why the others are not, every 600 presents. For measuring the step to bindless textures
writer_barriers01, with unified image layouts, puts an image that a pass, a copy, an upload or a storage write changes on a list, and the next rendering pass starts with one barrier that makes those writes visible to every later read. The barriers each read makes come too, so nothing on the screen changes: the log counts the images in the batches and the read barriers they cover every 600 presents. For measuring the step to bindless textures that moves the barriers to the writer
profile01 writes profile.txt every 10 seconds. The CPU profiler is Windows only
hooks11 runs the native handler of each of the game's exported functions the runtime has one for (nn/hooks.hook: the C library's memcpy, memmove and memset) instead of its own code. 0 runs every function's own code, to tell whether a problem comes from a hook (Hooks)
hooks_offemptyThe families of hooks (hooks.hook's family lines, such as libc) whose functions run their own code, and the hook modules turned off (Hooks, Modules), separated by commas or spaces, to tell which a problem comes from. Empty, every family and module is on. The launcher's Settings have a box for each family; the game's menu shows the value
hook_modules_diremptyThe folder of the hook modules built as libraries (Hooks, Modules in libraries): each NAME.so there (NAME.dll on Windows, NAME.dylib on macOS) is the module NAME, loaded at start when its hook ABI is the runtime's and hooks_off doesn't name it. Empty, hook_modules in the user's data folder. The recompile reads it too, and routes the functions the modules' CPU hooks name, so a recompile after installing a module gives its CPU hooks their calls (CPU hooks in libraries)
hooks_verifyemptyThe families of hooks whose pure hooks are checked on every call: the function's own code runs on copies of the memory it writes, then the handler on the game's, and the log names each call whose result, registers or bytes differ (Hooks). Slow: for checking a hook, never for playing. The launcher's Settings have a box for each family; the game's menu shows the value
native_cond_var11 has the game's std::condition_variable, std::mutex and std::recursive_mutex wait on the host's own (hooks.hook's cond_var family), and save states are refused, as a state can't hold a thread waiting there. 0 has the game's own code wait, and save states can be taken and loaded (Hooks)
native_os_sync11 has nn::os's sleeps, yields, locks and condition variables (hooks.hook's os_sync family) and its light events, semaphores and message queues (os_light) run on the host with no SVC, a lock's waiters waiting on its word with the host's futex, and save states are refused, as a state can't hold a thread waiting there. 0 has the game's own code make the SVCs, and save states can be taken and loaded (Hooks)
gpu_hook_trace0How many of an NVN game's draws and dispatches the log names: each dispatch's program hash, call site in main, grid, block, buffers and the images its handles name, each draw's fragment program hash, targets and viewport, and the records between them that aren't binds (Hooks, Finding a game's passes). For finding the passes a hook module replaces and the game's code that records them. 0 = none
gpu_hook_trace_from0How many presents gpu_hook_trace lets go by before it logs, to trace a scene the game reaches later. It marks each present while it logs. 0 = from the start
gpu_hook_trace_wordsemptyWith gpu_hook_trace, words of a constant buffer each traced draw binds, as floats: its stage (0 vertex to 4 fragment, 5 task, 6 mesh), slot, byte offset and how many 32-bit words (at most 128), separated by spaces or commas, such as 0,1,0x40,16. A draw whose words are the ones logged before says so
shader_corpusemptyA folder that keeps each translated shader for snx-shaderc. With it every shader is translated, and none is kept for the next run
pipeline_statsemptyA CSV file that gets the driver's statistics of each whole and optimized graphics pipeline, and of each compute pipeline: for each shader stage, the instructions, registers, spills and the others that the driver reports, by the program hashes of the log's lines (a shader corpus file of the program starts with the same first 8 hex digits). Draws that bind shader objects get no rows. On some drivers, pipelines made with it are not the ones in the pipeline cache of runs without it
gl_call_censusemptyA TSV file that gets, for a game that draws through its own OpenGL driver, each GL function it calls: the calls, the frames it is called in, the most in one frame, the first and last frame, and the driver's own calls of it apart. The driver's exported _gl functions and the addresses its eglGetProcAddress answers are counted in their dispatch slots, then run as before. Written every 600 frames and as the game ends
astc_dumpemptyA folder that keeps each whole ASTC texture level the game loads, as an .astc file (astcenc's format, the layers or slices as its depth), for snx-test-astc-vulkan --bench and the BC7 encoder's measurements (the game's own textures: keep them local). At most 2 GiB a run
sm86_dumpemptyA folder that keeps the bytes of each Ounce program (SM86) the translator refuses, and of each block of shader memory with no whole program in it, for tools/snx_sm86.c (the game's own code: keep it local)
gpu_trace_targetemptyaddress[:bytes]: logs the clears and draws that write a render target starting in that GPU address range
vk_early_copy_back11: a render target result that the game read back in the last 1200 presents is also copied to system memory as it is made, so the game's next read copies those bytes with no readback of its own. Discrete GPUs only
vk_early_landing11: a result copied back early lands in guest memory on a thread of its own once the GPU has made it, so the game's read finds the bytes there and does not stop to land them
vk_gpu_profile01 logs the GPU's time per rendering pass every 10 seconds, with the slowest passes and what they held. log=3 asks for the same counters, the CPU's per resource as well
vk_checkpoints01 logs the work each queue reached when the device is lost (VK_NV_device_diagnostic_checkpoints). On NVIDIA the driver also keeps shader debug info and what each resource is for the fault's report (VK_NV_device_diagnostics_config), at a cost of speed. 0 makes the device without that extension, so a RenderDoc capture also replays on a driver that lacks it
vk_debug_hide_commandsemptyVulkan device commands, separated by commas, that the check of each extension's commands takes as missing from the driver, to test that path: an extension that requires one goes off, and the device is made again without it, as with a driver that lists the extension without the command (Driver bans). One the renderer can go without (vkGetQueueCheckpointData2NV) leaves its extension on and is taken from the renderer. The log says each. Empty: none. A name that is no device command of a Vulkan extension stops the game, naming the nearest ones. The launcher's Settings have a box for each command of the extensions a renderer can use; the game's menu shows the value
vk_memory0How the GPU reads and writes guest buffers (vertices, indices, storage, the engines' results; GPU ownership). 1 copies them into the renderer's buffers when they change, and back. 2 reads and writes them where they are in guest memory (VK_EXT_external_memory_host; on Android without it, guest memory moves into AHardwareBuffers), as the console's GPU does: for a GPU that shares system memory; on a discrete GPU it goes across the bus. 0 is 2 on a GPU that shares system memory, but never the moves into AHardwareBuffers (unless uma_memory=2), and on a discrete GPU of amdgpu's drivers through Linux's dma-bufs (an import of a host pointer there costs every submission), and on Windows on a discrete GPU with resizable BAR and host imports where the GPU mirror can be (sparse residency of buffers): what the GPU only reads is copied there (uma_copies), and what it writes stays in its own memory or in the mirror. Else 1. A 3DS game takes it too (the launcher passes it to scarletnx-3ds as --vk-memory=N), for the board's RAM: 1 has the GPU work on a copy of it in its own memory, kept in step by page, 2 on the RAM in place, 0 the same choice by the device (3DS)
uma_memory0Android only. Where vk_memory has the GPU read guest memory in place, how it reaches it, to compare the two ways on one device. 0 (Auto) imports it where it is (VK_EXT_external_memory_host), and without that moves it into AHardwareBuffers when vk_memory=2. 1 (Import) only imports: without VK_EXT_external_memory_host guest memory is copied. 2 (Move) only moves it into AHardwareBuffers, on a driver that imports too and with vk_memory=0 as well; elsewhere than Android there are none, and guest memory is copied. The log's guest buffers line says the way taken

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