Zonai Fieldworks' native-font renderer (Cryonis in its BotW Abilities member) records it, and the weak stub ended the
game with "NVN nvnCommandBufferFenceSync is not implemented". The record is a new op, OP_FENCE_SYNC, that every replay
skips; at QueueSubmitCommands the syncs named in the submitted handles get that submit's fence value, which completes
no earlier than the console's point. The game itself never records the op, so its submits pay one flag load.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
QueryMemory still reports the permission the game asked for. Material Columns swaps 11 dispatch slots in main's
RELRO from its own code at switch time; on the platforms the mod is made for that write goes through, here it
faulted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new setting starts off: on by default, Steam Deck (1280x800) and other 16:10, 3:2 and 4:3 players would get a
wider view than the game's with a GPU cost nobody measured on the weakest target. The toggle is live, as
resolution.c res_fov_live re-reads it. res_fov_live starts from the game's own view (shown_vp 0), so at 16:9 the
first present writes nothing and logs nothing, as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plugin built with default visibility calls its own exported functions
through its PLT. Challenge Mode's Enemy Health Regeneration plugin
(exefs subsdk8) does so for the std::vector<const char*> constructor it
carries, and the service run counted that as a library call outside the
reviewed list, so the plugin was refused and its whole mod stayed off.
runtime/loader.c resolve binds such a JUMP_SLOT straight to the plugin's
own definition (a host override still wins and stays counted), and
tools/exefs_plugins.py plt_imports maps the PLT stub to that code, so
the reach check follows into it instead of naming an import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The game converts the end and then the begin report of a pair and subtracts them unsigned. With the frame wait one
frame late the end could be unwritten (0) or hold the value of the report before it, and the difference wrapped to
about 2^64: an over-budget frame for the controller, two in a row drop the game to its lowest quality level. Reads of
a report that holds 0, a time after the bound, or whose newest replayed report is not done read the bound instead,
so a pair in submission order never reads end < begin. Guest memory, RENDER_COND and samples-passed counts are
unchanged. TOTK_SYNC_AHEAD_TIMESTAMPS=0 turns it off, =check counts without replacing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gameplay_tweaks.c map_zoom_allowed zooms only on the map that menu_cursor.c finds in eui's open screens, and with menu_cursor = 0 that scan did not run, so the scroll wheel neither zoomed the map nor did the mouse move its cursor, with gameplay_map_zoom = 1 set. menu_cursor_poll now scans for the map while that zoom is on, as it scans for the dialogue box for dialogue_click; the pointer, the menus, the strips and the camera stay off with menu_cursor = 0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Since #971, SDL passes gamepad events to the game while its window has no focus (SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS). On Linux the window is SDL's, and under Steam the focus goes to Steam's overlay and menus while they are open (the Quick Access menu in SteamOS's Game Mode): the game took the presses meant for them too, which 0.4.1 did not.
The new setting pad_background (auto, 1, 0; read at start) decides the hint. auto, the default, keeps it on unless Steam started the game (SteamGameId or SteamOverlayGameId in the environment, set for Steam games and non-Steam shortcuts alike); 1 keeps the gamepad playing behind other windows under Steam too, 0 pauses it everywhere. input_map.c input_pad_background_pick holds the decision and cfg_probe checks it. On Windows the game window is not SDL's, and nothing changes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
It takes the 32:9 layout folder (3840x1080's, cfg.c cfg_shape_size); totk.ini.example names the common 21:9 and 32:9 sizes and hud_width for the HUD in the middle.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The camera kept the game's vertical view angle at every shape, so 16:10, 3:2 and 4:3 showed less of the world at the sides than 16:9. res_fov_live now also multiplies the fov patch's factor by 2 atan(tan(v/2) k) / v, k = 16:9 over the aspect and v = 51.2 degrees, the game's default vertical angle measured from a 4:3 frame at fov 130 against 16:9 (scale 0.730). Measured after: 4:3 frames are 16:9 ones scaled by 0.752 (0.750 is exact), 16:10 by 1.000 (1.106 without). vert_plus = 0 keeps the game's vertical view; it multiplies with fov.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A game resolution whose shape the fifteen listed sizes did not cover (13:6 on a phone streamed to, 4:3) drew 16:9 with bars: neither the setup's Shapes step (installer/screens.py shape_size) nor the game's background generator (runtime/romfs.c romfs_folders_prepare) made a layout for it, though tools/ultrawide_layout.py handles any aspect ratio and runtime/romfs.c overlay_init already loads a folder of the exact size. cfg.c cfg_shape_size and screens.py shape_size now give an unlisted shape from 4:3 to 32:9 its own size, so both make romfs-patches-<w>x<h> for it; a display of an unlisted shape still keeps the 1920x1080 default and gets no folder. The list gains 4:3 (1440x1080, 1600x1200, 2048x1536, 2732x2048) and 19.5:9 and 20:9 phone sizes (2340x1080, 3120x1440, 2400x1080, 3200x1440), in the menu's game resolution row too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The expect line of such a word says `* *` (tools/exefs_plugins.py plugin_lines), recomp/patches.py carries it into
RT_PLUGIN_WRITES as a flag, and runtime/plugin_init.c check_writes accepts any value there through
runtime/plugin_writes.h plugin_write_find. Hook branches in .text and pointers into a plugin's .text keep the exact
match. Zonai Fieldworks' Self Recall takes its storage off a pool size at main+0x3ad6eb8 that grows with the texture
heap of render_scale, so its plugin went off at every start with a grown heap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Issue #1402 reports a GPU hang on Intel (Mesa ANV) right after the startup logo on game 1.2.1, which the pass marks put in one dispatch of cs 75be3722f62cb67e. #994 reports the same freeze on Intel's Windows driver with 1.2.1, while 1.4.3 boots. The cause is not found yet. skip_cs takes the named dispatches out so a tester can confirm the shader is the cause and get past it, at the cost of what the shader would write. An id shorter than 16 hex digits matches every shader whose id starts with it. The log names each listed id and the first dispatch skipped of each. The setting is registered in cfg.c, documented as Risky in docs/settings.md, and docs/agents/symptoms.md gets a row for the freeze.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the unwritten-read rule every read that stays merged comes from a draw that samples a target it also writes,
the case Savage Wind runs the same way on every GPU. Shrine on the RDNA2 iGPU (AMD Windows driver, 1080p): passes
581 -> 128 a frame, GPU time unchanged (37.2 ms off, 38.0 and 36.5 ms on), the picture the same. PR #1237 measured
the waterfall on RADV at 1105 -> 117 passes and GPU 8.3 -> 4.1 ms, and an RTX 4080 shrine at +3% mean fps with the
1% low 83 -> 98. barrier_merge = 0 brings back a full barrier at each such Barrier.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The by-region barrier inside a merged pass orders only the pixel a fragment writes. A draw that reads a target other
draws wrote, without writing it, may read neighbouring pixels (blur, ambient occlusion, light composites), which only
the game's full Barrier orders on every driver. Such a draw now ends the pass, as Savage Wind does for the same case.
TOTK_TRACE=gfx counts these restarts by colour and depth. Shrine, town and field on 1.4.3: 0 restarts; every read
after a merged Barrier comes from a draw that writes the target it samples.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spirv_demote turned every OpKill inside a selection into OpDemoteToHelperInvocation on AMD's Windows driver. A
demoted fragment runs the rest of the shader, so every alpha-tested draw (grass, foliage, hair) paid for its
discarded pixels. The cloud fringe of #164 came from OpImageQueryLod after the discard. Now a discard is demoted only
when an OpImageQueryLod, an explicit derivative or a function call follows it in its function; the rest keep the
plain discard, as before 0.4.1. On the field save 1 of 128 shaders with a discard is demoted, and the picture keeps
the fix.
demote has a row in the settings table and a description in totk.ini.example, so demote = 0 or 1 in the ini no
longer logs an unknown key.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The option draws the particles and the dust over the upscaler's picture; the fog layer and the clouds' composite
before them decide sky or surface from the jittered scene depth and belong under the upscaler with either engine.
DLSS is not yet checked on NVIDIA hardware.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The upscaler ran at the first pass into the light target after the lighting. The fog layer and the half-size clouds'
composite that follow it decide per pixel from the scene depth, still jittered, whether a pixel is sky; over the
upscaler's steady picture a sky pixel on a silhouette took the surface's side in some frames and got no clouds there,
a bright dot that the upscaler never resolved. effects_point now waits for the first full-size pass without depth into
the light target and runs before the next pass with a depth (the particles), behind TOTK_DLAA_FX_COMPOSITE: on by
default with FSR, off with DLSS until measured on NVIDIA hardware. Frame dumps at 2560x1440 with FSR 4: ridge pixels
brighter than both sides fall from 34 % of the columns to 15 %.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #1369: the settings row still said 64 KiB though LAZY_CHUNK is 1 MiB, and two changes ran for every player.
ipc.c and svc.c readable() ask the OS again unless TOTK_HEAP_LAZY is on (mem_heap_lazy), and fs_host.c write_file calls
mem_heap_commit, which commits the buffer's reserved heap chunks in lazy mode and does nothing otherwise, instead of
mem_thaw.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the switch off, the draw path now pays one load of vk_caps.null_attach per gkey_fill and per empty slot in
target_wmask instead of a call into vk_exec.c, and vk_exec_pass_begin one flag test per pass. The switch is read in
vk_caps_init, before the pipeline prewarm makes the first key.
With it on, only empty slots below the pass's last target get a dummy, which is where the pipelines'
colorAttachmentCount ends (vk_pipeline.c target_count); a pass without colour targets keeps none, so a depth-only or
attachment-free pass never gets a 16384-wide image. All empty slots of a pass share one view, and an image serves
every pass it covers with its sample count: 1.4.3 at 1600x896 makes one image of 1.75 MiB instead of three. The
images are destroyed in destroy_all before the allocator goes, and the log line gives each one's size.
The settings row no longer states that empty slots caused #1343: the dumps do not show it. totk.ini.example gets
the player entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
restbl_cache now defaults to 0. Its key adds the path and identity of the running exe (a dev or source build that
changes the merge code keeps the VERSION string, so the port version alone served the old table), the RomFS image's
identity, the number of shipped tables and the overlays of the port's own folders, which the old filter left out.
The table's SHA-256 is taken from the bytes the build wrote instead of a read back from disk. A miss logs why the
table is built again. totk.ini.example and docs/settings.md describe the setting, its default and what the key does
not see (a rewrite that keeps size and write time).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>