Commit Graph
1563 Commits
Author SHA1 Message Date
Valiantsin Dzerakh 9aec84889c Merge pull request #1465 2026-11-25 16:22:22 +03:00
Valiantsin DzerakhandClaude Opus 5.5 20e27a2d33 Merge task/drs: with sync_ahead, timestamps the late frame wait did not cover read as the newest one written at that wait, so dynamic resolution no longer drops to its lowest level for half a second at a time (#1123)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 16:17:45 +03:00
Valiantsin DzerakhandClaude Opus 5.5 47eb44d1b2 With sync_ahead, a timestamp the frame wait did not cover reads as the newest one written at that wait, so the dynamic resolution controller never reads a wrapped GPU time (#1123)
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>
2026-11-25 15:46:45 +03:00
ShannoonRuaaaandClaude Opus 5.5 58fd4f6f68 The gamepad pauses while the window has no focus in a game Steam started, so Steam's overlay and menus get its presses alone (#1462)
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>
2026-11-24 19:08:22 -08:00
Valiantsin DzerakhandClaude Opus 5.5 ed8fa04034 Merge task/plugstale: a mod plugin whose start-up writes a value into the game's data that redirects nothing (Zonai Fieldworks' Self Recall and its memory pool size) no longer goes stale when render_scale grows the pool, and a plugin the game found stale makes the rebuild lift and compile again instead of looping (#1437, #1388)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 23:00:15 +03:00
Valiantsin DzerakhandClaude Opus 5.5 6205940caf Merge pull request #1448: skip_cs leaves out the dispatches of listed compute shaders, a bisecting tool for the Intel 1.2.1 boot freeze (ShannoonRuaaa) (#1402, #994)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:12:15 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c91046781f skip_cs names the offending entry when it is not 1 to 16 hex digits, not the whole value
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 22:12:06 +03:00
Valiantsin DzerakhandClaude Opus 5.5 28d8a43bfe A plugin the game found stale makes the rebuild run the lift and the compile (#1437, #1388)
build-cache/plugins.stale changes no input of the lift or compile key, so the rebuild the game started planned only
check and cleanup, never ran the plugin's service run again, and the plugin stayed stale. A non-empty plugins.stale
now makes Lift and Compile not current (installer/steps.py plugins_stale); Compile too, since the transient lift runs
only with the step after it. Lift.run clears the file, so the next start plans nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 21:46:41 +03:00
Valiantsin DzerakhandClaude Opus 5.5 cc749d8679 A plugin's write into main's data that points at no plugin code is matched by place only at start (#1437, #1388)
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>
2026-11-24 21:46:33 +03:00
Valiantsin Dzerakh 453e83f564 Merge branch 'pr1448' into task/pr1448 2026-11-24 21:30:20 +03:00
ShannoonRuaaaandClaude Opus 5.5 1910ffb609 The skip_cs setting leaves out every dispatch of the compute shaders it lists, named by the id the pass marks print.
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>
2026-11-23 22:59:15 -08:00
Valiantsin DzerakhandClaude Opus 5.5 7da078d1ab Merge task/bmerge: barrier_merge is on by default and ends the pass when a draw samples a target written in the pass that it does not write itself, as Savage Wind does; shrine passes 581 -> 128 a frame on an RDNA2 iGPU with the GPU time unchanged on AMD's Windows driver, RADV waterfall GPU 8.3 -> 4.1 ms (#1237)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 09:15:52 +03:00
Valiantsin DzerakhandClaude Opus 5.5 dca69306fb barrier_merge is on by default
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>
2026-11-24 09:15:23 +03:00
Valiantsin DzerakhandClaude Opus 5.5 3c977bf78c Merge pull request #1435: Linux opens a text entry window for the software keyboard (horse naming) with keyboard and controller grid input, and falls back to the default name when no window opens (cheat45681) (#401)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 09:07:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c3cd1e31c2 Text entry on SDL: hint lines come from the catalog, a password shows stars, a surrogate pair goes in and out whole and obeys the length limit, TOTK_SWKBD_TEST=ok presses OK, and the window redraws when exposed (#401)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 09:07:09 +03:00
Valiantsin DzerakhandClaude Opus 5.5 5aaa718eb6 barrier_merge ends the pass when a draw samples a target written in the pass that it does not write itself
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>
2026-11-24 09:04:48 +03:00
cheat45681 37551aedad Linux text entry: controller letter grid (D-pad, bottom add, right delete, Start OK, top cancel); keyboard unchanged 2026-11-24 09:03:38 +03:00
cheat45681 a5c95fb971 Linux: add a text entry window for the software keyboard (horse naming, #401) 2026-11-24 09:03:38 +03:00
Valiantsin DzerakhandClaude Opus 5.5 be7ca2c275 Merge task/demoteini: on AMD's Windows driver a discarded pixel keeps running only in shaders that take a derivative after the discard, so grass, foliage and other alpha-tested draws no longer pay for their discarded pixels; demote is a totk.ini key (#1365, #164)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:57:41 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c8b88f7428 Demote a discard only where a derivative follows it, and read demote from the ini (#164, #1365)
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>
2026-11-24 08:56:03 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4f5a9d4754 Merge task/pr1369: heap_lazy = 1 commits the game heap on first use on Windows, off by default; the Vulkan import also commits the chunks its alignment widens into, and the commit census shows the heap's faults (ShannoonRuaaa)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:50:35 +03:00
Valiantsin DzerakhandClaude Opus 5.5 de0b1f899f heap_lazy adds the committed heap and the first-use faults with their total time to the commit census lines, so a log shows what the setting saved and cost
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:44:45 +03:00
Valiantsin DzerakhandClaude Opus 5.5 a0587b59e7 heap_lazy also commits the chunks a Vulkan import widens into when the driver's host pointer alignment is above 4 KiB, and the memory.c comment names mem_heap_commit for save writes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:39:29 +03:00
Valiantsin DzerakhandClaude Opus 5.5 d66aeef75c Merge pull request #1369: heap_lazy = 1 commits the game heap on first use on Windows, off by default (ShannoonRuaaa)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:35:07 +03:00
Valiantsin DzerakhandClaude Opus 5.5 011b80c948 Merge pull request #1408: the IPC probe's request helper clears its reply when the kernel call fails (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:34:47 +03:00
Valiantsin DzerakhandClaude Opus 5.5 a073e6d3c6 Merge pull request #1407: the custom cursor's sampler writes zero colour where it returns zero coverage (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 08:34:47 +03:00
Ruan Shannon 7ddb883992 Merge remote-tracking branch 'fork/perf/heap-lazy-commit' into perf/heap-lazy-commit 2026-11-23 13:39:47 -08:00
Ruan ShannonandClaude Opus 5.5 ab356192d7 heap_lazy: the docs say 1 MiB chunks, and with the setting off ipc, svc and save writes are as before
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>
2026-11-23 13:38:10 -08:00
Ruan Shannon 54b2975d98 Merge remote-tracking branch 'origin/dev' into perf/heap-lazy-commit
# Conflicts:
#	runtime/cfg.c
2026-11-23 13:37:39 -08:00
Valiantsin DzerakhandClaude Opus 5.5 3c5ae12830 Merge pull request #1393: build_game.py quotes command arguments with shlex on non-Windows hosts and passes the linker map path through cmd_arg and -Xlinker on both platforms (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v0.5.1-rc1
2026-11-23 19:18:38 +03:00
Valiantsin DzerakhandClaude Opus 5.5 da27398c5f Merge pull request #1405: ab_summary.py prints n/a for the replay change when side A averages 0.00 ms instead of dividing by zero (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 19:18:18 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4cfb2e82c4 Merge pull request #1403: perf_summary.py reports FPS as total frames over total window time instead of the mean of per-window FPS (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 19:18:12 +03:00
Valiantsin DzerakhandClaude Opus 5.5 480ccec4b1 Merge pull request #1398: run_game.py rejects a profile copy that overlaps the original and a --tag with path separators, and stops a still-running child before deleting its profile (ICUMADETHIS)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 19:17:37 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1fcb7b967f Merge pull request #1412: null_attach = 1 gives empty colour slots below a pass's last target a shared dummy attachment, for the Intel legacy driver crash in vkCmdBeginRendering; off by default (ShannoonRuaaa) (#1343)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 19:07:36 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b5b9cc2be8 null_attach reads its switch once at device creation and gives a pass one dummy that covers it, freed with the device (#1343)
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>
2026-11-23 19:02:38 +03:00
Valiantsin Dzerakh 83e4037f9c Merge commit 'f278e91a' into task/pr1412
# Conflicts:
#	runtime/cfg.c
2026-11-23 19:02:11 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1dad1ef60b Merge pull request #1385: restbl_cache = 1 serves the mods' merged resource size table from the last start when totk.exe, the RomFS image and every mod file are the same (about 0.9 s off a start with The Second Quest); off by default (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:51:57 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0deeb914cf mods_romfs_check tests the kept resource size table across starts
With restbl_cache = 1 on the restbl mods: built on the first start, served on the second with the same bytes, built
again after a rewritten mod file, an added or removed mod, another order and a new totk.exe, and after a torn or
random key file and a damaged or missing table. With the default 0 the key is neither read nor written.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:51:02 +03:00
Valiantsin DzerakhandClaude Opus 5.5 3b97936ed3 The kept resource size table is off by default, and its key covers the running totk.exe, the RomFS image and every overlay
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>
2026-11-23 18:51:01 +03:00
Valiantsin DzerakhandClaude Opus 5.5 d810c7d271 Up version 0.5.1-rc1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:47:24 +03:00
Valiantsin DzerakhandClaude Opus 5.5 96b5e96c80 Merge pull request #1384: the in-game menu in German, French, Spanish, Italian, Dutch, Japanese, Korean and Vietnamese, and the setup in Vietnamese (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:40:16 +03:00
Valiantsin DzerakhandClaude Opus 5.5 8db7f2889f The new menu languages get the Low Latency Auto choice and the description of the Anti-Lag 2 merge
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:39:22 +03:00
Valiantsin Dzerakh 2149915fa6 Merge branch 'dev' into task/pr1384 2026-11-23 18:38:32 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c465183dcc The new menu languages follow the FSR 4 and FSR sharpness catalog ids, and the Vietnamese setup text has the FSR download entries
The eight new menu tables still used UI_MENU_FSR3_SHARPNESS and lacked the four FSR 4 upscaler strings, which dev renamed or added, so the PR did not compile on dev. installer/text/vi.json lacked the six fsr step, phase, warning and checkbox ids. CONTRIBUTING.md lists all twelve menu languages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:38:32 +03:00
Valiantsin DzerakhandClaude Opus 5.5 05d46f3538 Merge pull request #1385 head: serve the mods' merged resource size table from the last start (itaskaev2)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:37:21 +03:00
Valiantsin DzerakhandClaude Opus 5.5 25832fd459 Merge pull request #1416: reflex = auto picks NVIDIA Reflex or AMD Anti-Lag 2 for the GPU; off stays the default, on and boost stay NVIDIA Reflex only (ripps818)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:35:55 +03:00
Valiantsin DzerakhandClaude Opus 5.5 e15aae0606 Anti-Lag 2 runs only with reflex = auto, so on and boost keep their old Reflex-only meaning
A player who had reflex = on on an AMD GPU got nothing from it before #1416 and would have got Anti-Lag after an
update without asking for it. on and boost now enable NVIDIA Reflex alone and log the same line as before when it is
missing; auto picks Reflex or Anti-Lag. The Anti-Lag entry point loads with atomics, since the game thread and the
present thread both make the first call, and the TOTK_TRACE=perf latency line keeps its old text unless Anti-Lag is
on. The menu description, docs/settings.md and totk.ini.example say which value turns on what.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:34:39 +03:00
Valiantsin Dzerakh 719cff3a4c Merge commit 'refs/pull/1384/head' of https://github.com/valentderah/totk-pc-recomp into task/pr1384 2026-11-23 18:25:26 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1b303282a3 Merge pull request #1372: the shader-cache packer reads the loose files on up to 8 threads (half the logical CPUs, 1 below 512 MiB free memory, 32 MiB read ahead, serial reads on any failure), with a byte-identical pack (ShannoonRuaaa)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 18:24:38 +03:00
Valiantsin Dzerakh 8619d1bb3f Merge pull request #1416 head: AMD Anti-Lag 2 in the low latency setting (ripps818)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	runtime/vk_device.c
2026-11-23 18:24:19 +03:00