Commit Graph
12 Commits
Author SHA1 Message Date
Valiantsin DzerakhandClaude Opus 5.5 6b65fb6c0e Keep sampled-texture descriptors between draws while the slot, sampler, submission and feedback pass stay the same
tex_info resolved the slot, built a view key, probed the view table and looked up the sampler for every texture
binding of every draw. A direct-mapped memo keyed by handle, resource type and separate returns the descriptor while
vk_texture_slots_gen, vk_sampler_gen, the submission epoch and (with feedback-loop images) the pass are unchanged;
storage images are not kept. TOTK_TEX_MEMO=0 turns it off, =check recomputes every hit (a fight run with it and
TOTK_SHADER_MEMO=check stopped on nothing). Against main, profiler on, no bind stats: fight replay 13.9 to 11.9 ms per
frame, render thread busy 16.3 to 14.6 ms, CPU-bound windows 15 to 9; field replay 9.5 to 8.2 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:50:22 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b273005901 Look up texture types only for the slots a shader's translation reads, and reuse the previous draw's pipeline while its state repeats
answers_for looked up the type of all 64 texture and image handles of a stage whenever one changed; the use mask of the
first shader of each program stage now limits it to the slots that select the variant, with a generation per slot and
the texture lock taken only on a miss (texture type recomputations per draw 0.39 to 0.05 in fight). prepare_draw keeps
the previous draw's pipeline info while the pipeline state is equal (TOTK_PIPE_MEMO), and reads the clock only for
draws that may wait. Fight on the 7900X: replay 15.7 to 14.0 ms per frame, 53.3 to 58.7 fps; field 11.1 to 9.5 ms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:31:53 +03:00
Valiantsin DzerakhandClaude Opus 5.5 1385e7af9b Drop Portuguese from the game language list, which TotK does not ship, and note under Presentation the mode the swapchain got when it differs from the setting
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 20:55:08 +03:00
Valiantsin DzerakhandClaude Opus 5.5 7597bf0517 Add the Advanced tab: scheduling, shader, texture, render fix, Vulkan and diagnostics keys, log folder, system info copy and reset of all settings
Reset asks first in a modal; B and Esc close the modal instead of the menu. The validation layer row is greyed out when the layer is missing. Option rows get whole-pixel heights: with a fractional height ImGui's truncation grew the page a pixel per row scrolled out of view, which cut off a row scrolled to the bottom. The first row taking the cursor scrolls the page to its top, so text and a heading above it show.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 20:55:08 +03:00
Valiantsin DzerakhandClaude Opus 5.5 e6116bc8bb Draw the full performance overlay from perfmon: CPU, GPU and memory load, temperatures, frame times with a graph and the render thread's waits
The panel's columns are as wide as the widest value they can show and the numbers are right-aligned, so the panel keeps its width while the numbers change. It sits in front of the open menu. FPS mode keeps its one line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 20:55:08 +03:00
Valiantsin DzerakhandClaude Opus 5.5 b1cbbb93a6 Make the frame limit a setting: 30, 60, 120, 144 or the monitor's refresh rate
TOTK_FPS_LIMIT (fps_limit in totk.ini, live, menu row on the Game tab) replaces the 30/60 choice of TOTK_FPS60. The
pacer holds frames to the limit in nanoseconds instead of 60 Hz ticks; the real-time step has no lower bound, so game
speed stays 1.000 above 60. `display` follows the exact refresh rate of the window's monitor (QueryDisplayConfig),
measured again when the window moves or the display mode changes. A limit of 30 switches the patch set fps60 off as
before; unset, the older fps60 = 0 still means 30. Above 60 needs the real-time step and is marked experimental.

The vsync event stays at 60 Hz: on 1.4.3 the title runs at 144 fps with it, so the game does not wait for it each
frame. Field on machine A: 69-88 fps, CPU-bound (GPU 3.4 ms per frame).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 20:39:13 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c757a42798 Add the frame rate overlay: TOTK_PERF_OVERLAY fps shows the frame rate in the top right corner, full adds the mean and longest frame time of the last half second, F10 cycles the modes and saves the choice
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:50:45 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f2db724631 Grey out the performance overlay row until the overlay exists, and list what the menu still lacks in the backlog
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:31:45 +03:00
Valiantsin DzerakhandClaude Opus 5.5 f8d584b3db Add the tabbed settings menu: option rows over the cfg table for the Screen, Game, Sound, Controls and Menu tabs, Continue and Quit game in the bottom row, and a note when totk.ini cannot be written
Rows read and write their key through cfg, mark the default, say "after restart" for start-only settings and grey out what an environment variable fixes; totk.ini is written 0.4 s after the last change and when the menu closes. The graphics card list comes from the Vulkan devices, the window sizes from the monitor, and the language names of Japanese, Korean and Chinese are drawn with glyphs merged in from a system font (plat_font_path). The font atlas and style follow the window height. TOTK_MENU_TEST saves one shot per tab and ignores real input meanwhile; TOTK_MENU_TEST_SET sets settings at given frames (SAVE=1 writes totk.ini). A background test window going fullscreen no longer comes to the front or takes focus, and the log names the present mode the swapchain gets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 10:13:33 +03:00
Valiantsin DzerakhandClaude Opus 5.5 4d4b0efeb8 Latch the Minus+Plus combo until both are released, serialise menu open and close, pack the cursor release flags into one word, and drop menu_available
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:51:56 +03:00
Valiantsin DzerakhandClaude Opus 5.5 0cfc489bbf Open the menu for everyone: F1, Esc and Minus+Plus toggle it, the combo never reaches the game, the page offers Continue and Quit game, and closing after Esc gives the mouse capture back
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 09:49:15 +03:00
Valiantsin DzerakhandClaude Opus 5.5 c6a7a28ab4 Compile Dear ImGui and draw the menu overlay into the swapchain image, behind the test hook TOTK_MENU_TEST until the pages are agreed
The window follows TOTK_WINDOW_SIZE, TOTK_FULLSCREEN and TOTK_VK_PRESENT while the game runs, and F11 saves the fullscreen state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:35:24 +03:00