Repository navigation
Conversation
|
Independently checked head Local build & dual-GPU verification:
Code review notes:
The 64-batch fix itself looks solid. AI-assisted. |
lixonik
left a comment
There was a problem hiding this comment.
Tested 78158bab9 locally merged onto main a3bafd05d02b on Windows 11 with MSVC 19.44 (Release), NVIDIA GeForce RTX 5070 (610.88); Vulkan validation was unavailable locally, so the GPU checks ran without it.
- Red/green control: running
d3d12_writeback_retirementagainstmaina3bafd05d02bfailed on refresh 65 (premature title writeback on refresh 65 (first queue still held)after logging the 64-batch bypass). With this PR merged,d3d12_writeback_retirement(130/130 matched),d3d12_title_va,shadow_keep, andtitle_va_aliasall passed (4/4). - Additional synthetic check (scratch): had the held queue itself write page 0 of
titleand callnote_reachedwhile the second queue ran the remaining 129 batches on distinct pages. Onmain, the held batch was dropped early and page 0 remained lost after releasing the gate (129/130 matched); with this PR, no premature writeback occurred and all130/130pages matched after release.
No findings from these checks.
AI-assisted.
|
Retail check for regressions on profile M (RTX 4070 Laptop 8 GB, NVIDIA 621.40, Windows 11). Same tree with and without this PR: current
No regression seen. The differences are within the run-to-run spread I see here (shadows varies 80-270 ms across same-build runs). Pending-batch growth didn't show up as memory. |
|
Independent Linux/Wine + NVIDIA check at head
AI-assisted. |
|
Merge test for the #2464 campaign on an 8 GB laptop (profile M). Main ec91d69 was merged into the PR head 78158ba with no conflict, giving local 25b331779. The numbers were recomputed from the raw logs. AI-assisted (Claude Code, Claude Opus 5.5).
|
|
Addendum to the RUN above: I built this PR's |
|
Addressed the documentation precision suggestion in 2f3adc2. The text now states that batches wait for their recorded predicted ticket in the completed retirement prefix, without claiming per-writer isolation across concurrent queues or snapshots of live shadow bytes. Documentation only; diff check and explicit-path no-game-data scan passed. AI-assisted by OpenAI Codex. |
lixonik
left a comment
There was a problem hiding this comment.
Re-reviewed 2f3adc279: the updated wording in docs/d3d12_vulkan.md accurately states the recorded predicted-ticket retirement guarantee without overclaiming per-writer isolation or shadow snapshotting.
Approving 2f3adc279 (runtime code unchanged from the previously verified 78158bab9).
AI-assisted (Antigravity, Gemini).
Claimed in the coordination issue as: RT-TITLE-WRITEBACK-FENCE-OVERFLOW
What and why
DeviceState::write_back_titles()copied the oldest pending ranges back to title memory without their completion ticket once more than 64 batches accumulated. A held queue can stall the global retirement prefix while another queue continues submitting and completing work, so backlog size does not prove completion.Remove that bypass and retain each batch until its ticket retires. No GPU wait is added under
shadow_mutex, which another queue may need to submit the work that releases the dependency. Existing per-submission range/byte limits remain. Pending range metadata can grow during a stall; this change favors completion ordering over prematurely consuming it.Add
d3d12_writeback_retirement: hold one native Vulkan queue with an unsignaled timeline semaphore, complete 130 submissions on a second queue, and verify that no title-memory result appears early. Each submission writes a different value to a separate page, so the final check also catches lost batches. After release, a refresh without a new reached range must recover all 130 values. Uses transfers and synthetic buffers only, no shader tools or game files. Skips when two graphics-family queues are unavailable; failure cleanup releases the gate.Related work: #2352 changes adjacent-range coalescing; #2032 is an alternative writeback implementation. This PR builds on neither and leaves those topics alone.
Tested
Native Windows 11 build 26200, MSVC 2022, AMD Radeon RX 5700 XT 8 GB, Windows driver
32.0.21045.5002:main63185f4a3, with the first queue still held. The test was then strengthened to use 130 distinct pages and verify every retained result. That final page-isolated test passed three consecutive runs; the committed version, with an added result-count diagnostic, passed again. The final strengthened test was not rebuilt against unmodified main.cmake --build runtime/build --config RelWithDebInfo --target d3d12_writeback_retirement_test -j 2: passed.ctest --test-dir runtime/build -C RelWithDebInfo -R '^d3d12_writeback_retirement$' --output-on-failure: passed.-j 4).python -m compileall -q make_game.py tools tests,python -I make_game.py --help, CI-registration tests (18), text-line-ending tests (3), explicit-path no-game-data scan and diff checks passed.vk_null_descriptor_test.cpp:97C2065 (LEONIDA_TEST_NULL_DESCRIPTORS_SPV) with no glslangValidator installed; runtime tests: vk_null_descriptor_test builds without glslangValidator (TEST-NULL-DESCRIPTOR-NO-GLSLANG) #2055 addresses it. Full runtime CTest was not run. Khronos validation was requested but unavailable becauseVK_LAYER_KHRONOS_validationis not installed; no validation-layer success is claimed.GPUs tested: AMD Radeon RX 5700 XT, 8 GB desktop, driver
32.0.21045.5002, Windows 11 build 26200 (profile M). No gameplay, performance improvement or retail-crash remediation claimed.AI-assisted: yes, OpenAI Codex; a second agent reviewed the patch and independently checked the semantic-suite counts.
Checklist
main(63185f4a3).docs/design.md(not applicable: no translator change).