mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-20 04:35:57 +00:00
Make a chunk's new texture entries follow replay order, and add a knob that records chunks out of order
entry_of decides at record time whether a new texture takes the content of a live GPU-written texture at its storage (alias_copy) or the storage bytes. In a chunked replay the source's GPU ownership is set when a chunk records its render, so the choice followed the order the threads got to the chunks: a later chunk could take the old bytes before an earlier chunk recorded the render, and a mirrored texture keeps them. Now a chunk that makes an entry while a live colour texture of its size sits at the storage waits until the chunks before it are recorded (vk_exec_chunk_settle, the texture lock released for the wait), skips sources the scan revives at a later op, and ignores GPU ownership a later chunk set in this submission. slot_resolve and vk_texture_by_id_locked no longer read tslots through a pointer taken before the wait. TOTK_REPLAY_SKEW_US (debug) makes the even chunks wait before they record, so the chunk after each one records first in every submission. With it at 3000 us and 4 threads the field save runs clean (grass drawn, 0 validation errors); the alias path did not fire there (0 copied, 0 filled from storage), so this does not reproduce the missing grass reported on RADV, and the fix there stays unconfirmed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fd4427cb17
commit
35b3d37ea3
5 files changed
+108
-17
No files matched your search
@@ -185,6 +185,7 @@ Many rows below are developer tools that only act together with another setting
|
||||
| `replay_chunks` (default `0`) | Most chunks a submission is cut into when `replay_workers` is set; `0` uses twice the number of recording threads. | Fewer chunks leave threads idle at the end of a submission, more add scan and submit work per chunk; no effect while `replay_workers` is `0`. | Caution |
|
||||
| `replay_chunk_draws` (default `128`) | Least draws a chunk of the chunked replay holds before it may end at a pass. | Small values make many short chunks, large ones leave big submissions on few threads; no effect while `replay_workers` is `0`. | Caution |
|
||||
| `replay_state_check` (default `0`) | `1` compares the replay state after the last chunk of a chunked submission with the state of the scan and logs differences. | Adds a comparison per submission and log lines on a mismatch; no effect while `replay_workers` is `0`. | Caution |
|
||||
| `replay_skew_us` (default `0`) | Debug: the even chunks of a chunked submission wait this many microseconds before they record, so the chunk after each one records first. | Shows a recording that depends on which thread gets to a chunk first in every submission; slows the replay; no effect with fewer than 2 `replay_workers`. | Caution |
|
||||
| `restart_wait` | Set by the runtime when it restarts itself; names the old process by id and creation time so the new process waits for it to exit. | Meant for the runtime's own use; the code does not describe a manual value. | Unknown |
|
||||
| `spin` (default `1`) | `0` makes a guest thread that polls memory keep its virtual core. | Polling threads can starve the thread whose item they wait for, so frames can stall. | Caution |
|
||||
| `spin_handoff_us` (default `50`) | Microseconds a polling wait lasts before it gives its virtual core to a waiting thread. | A shorter value hands cores over sooner; a longer one keeps them longer. | Caution |
|
||||
|
||||
Reference in new issue
Block a user