Integrate post-story-load memory, queue and Vulkan fixes (RT-POST-STORY-RUNTIME) #1723
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1723
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1723/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Moriz82 on GitHub · 2026-11-25 09:45 UTC · original
integration/post-story-runtime→main· +27279 −8823 · 107 files · 14 commits · merged 2026-11-25 11:34 UTCClaimed as RT-POST-STORY-RUNTIME in the coordination issue.
This follows #984, which brought the offline boot through the end of the story load on Linux/Proton and native Windows. This draft brings the subsequent runtime changes onto upstream’s pipeline-worker, descriptor and queue interfaces. It includes the queue, memory and draw changes together so reviewers can exercise the same executable the integration tests cover.
What and why
Contributors. Plaaasma co-authored the changes, including XMem window handling, list values and descriptor backing. ivanepsilondelta contributed the stateful indirect graphics and pixel tests. Both are credited on the integration commit.
Tested
The accepted working build used a diagnostic configuration with title compute, indirect draws and acceleration-structure builds disabled, and stub pipelines enabled. That run establishes progress through loading. Playable world rendering and default-settings performance remain unverified.
Open checks for this draft
GPUs tested: NVIDIA GeForce RTX 4070, driver 620.73.04, CachyOS with Proton Experimental. The native Windows RTX 4070 Ti result above belongs to #984.
AI-assisted: yes
Checklist
Both headers now include <windows.h>, and the test targets that reach them through vulkan_replay.h (replay_uav_clear_offset_test first) do not define NOMINMAX, so windows.h's max/min macros broke the std::max/std::min calls in vulkan_replay.h ("expected unqualified-id") and the runtime's test build failed. Guard the include the way vulkan_gpu_labels.h already does. Co-Authored-By: Claude Opus 5.5 <[email protected]>@ecox982745 on GitHub · 2026-11-25 10:19 UTC · original
I ran the post-rebase pixel checks on native Windows 11, RTX 4090 (NVIDIA 616.64), at the unmodified PR head
ba626820e. I built the three test executables with MSVC 19.44 in Release. The default CTest run passed 11 of 12 selected cases, with one repeatable failure.d3d12_graphics_indirect_heap_resourcesThe failing fixture sign-extends the 48-bit resource offset in
ps_indirect_heap_resource.frag. On this machine the upload buffers landed below the arena. With the default offset mode, the runtime logged a 16-byte buffer SRV with zero records. A diagnostic that kept both shader guards and changed their return colors showed the heap comparison passed on all five draws, then the descriptor check saw zero records. Moving uploads to system memory reproduced the same result.With only
LEONIDA_IMPORT_BELOW_ARENA=1set for this test, the stock fixture passed 5/5 consecutive runs, with exact vertex heap state and pixel resource payloads for all five draws each time. Setting this CTest case's environment to match its authored shader would make its intended signed-offset coverage explicit. These measurements cover synthetic draws. I did not run a retail boot or Vulkan validation layers. AI-assisted verification.@aslan2142 on GitHub · 2026-11-25 10:23 UTC · original
@Moriz82 heads-up: we're merging this, but the runtime's test build doesn't compile on this head. We're fixing it on the branch (maintainer edits) together with a merge of current
main; nothing for you to do unless the helper below isn't what you meant.windows.hwithoutNOMINMAX:runtime/src/submit_phases.handruntime/src/thread_sampler.hnow include<windows.h>. Test targets that reach them throughvulkan_replay.hand don't defineNOMINMAX(replay_uav_clear_offset_testfirst) get themax/minmacros, and thestd::max/std::mincalls invulkan_replay.hfail ("expected unqualified-id"). Fix: the same#ifndef NOMINMAXguardvulkan_gpu_labels.huses, in both headers.check_list_values_more()inruntime/test/xs_proxy_mock_test.cppusesrecord_page_mapping(as the queue slot 31 hook) andg_page_mapping, but neither is defined anywhere in the PR. We're adding a smallPageMappingRecordwith that hook, which records the call count, the batch pointer, pool, pages, flags and the first batch's destination and ranges, written from the hook's signature and from what the test checks. Please check that it matches what you had locally.gta6rtitself was never affected, which is probably why this didn't show on your side.main+ this branch + the two fixes is running now; the merge follows when nothing goes from pass to fail. Then #622 is brought up to date on top, so slots 71/72 have one owner.AI-assisted (Claude Code, Claude Opus 5.5).
@OreoFR on GitHub · 2026-11-25 10:37 UTC · original
Native Windows retail boot of this head, as the description asks. One machine; counts only, no game data.
Setup:
gta6rtbuilt with MSVC frommain57ba40bd6+ #1558 (3cf0a41bc, needed on NVIDIA to get past the landing screen) + this PR atba626820e.runtime/test/xs_proxy_mock_test.cpponly. I took this PR's side for the test file;gta6rtitself merges cleanly.LEONIDA_TITLE_WATCHDOG=0andLEONIDA_DEVICE_FAULT=1. Shaders frommake_game.py(--wave64-emulate), a saved profile (straight to the story load), A every 15 to 60 s.Result, 600 s run (stopped by me): no device loss and no exception, but the load stalls. On this machine without this PR, the story load loses the device at about 250 to 270 s (WRITE_INVALID,
lib_cs_01468in flight; see #1608). With it, the device is never lost, but the stall below begins at about 240 s, before that point. So this run doesn't show whether the WRITE_INVALID stop is gone, only that the load now waits instead:list values so far: 15918 writes recorded, 15811 landed, 0 failed; 2417 waits recorded, 2392 met at submission, 1 relayed; 7 gates held, 0 met, 7 timed out;fence slot 12 mirrors: 5 live; in 10 s 0 waits ended on an event, ~3,180 on the 10 ms timeout, every 10 s.lib_cs_0133945.4 s,lib_cs_0095938.5 s). The window stops answering at about 200 s.dstorage_failureat 152 s (not fatal).Second run, same build plus #1671, #1691 and #1703 (the slot 57 blend, depth/raster and dual-source state, which merge cleanly with this PR). Same switches and presses, and the same picture:
17062 writes recorded, 17023 landed(39 never land) and5 gates held, 0 met, 5 timed out.dstorage_failureat 167 s (0x89240030,E_DSTORAGE_DECOMPRESSION_ERROR); the first run had two.So the stall reproduces across two runs, with or without the rendering PRs.
Happy to rerun with any switch or diagnostic you want on this machine.
AI-assisted.
@Tortoche on GitHub · 2026-11-25 11:32 UTC · original
Tested on native Windows 11, AMD Radeon RX 7800 XT (driver 26.11.2) with #1723 + #1715 + #1728 (manually merged) and
LEONIDA_TITLE_WINDOWS_MB=1024,LEONIDA_ARENA_MB=2048.Results:
+0x2474606/ untranslated title V# AV inhash_bytes) and reach 9621+ GPU submissions (~7 min).dstorage_failureevents (0x89240030,reason=missing-profile) onttdb_terrain_image_based_0_1.ttpf.d3d12_xs(19 gates held, 0 met, 19 timed out) and staged title texture upload failures for formats 133, 134, 145.AI-assisted: yes
@aslan2142 on GitHub · 2026-11-25 11:34 UTC · original
Merged. Thank you, @Moriz82: on our machine this is the biggest single step of the boot so far.
mainreached 549 presents (about 0.7 a second late in the run).main+ this branch reached 9,166 presents (about 15 a second) and the first page advance 90 s sooner.LEONIDA_XMEM_SEC_COMMIT). It does nothing on native Windows, which still needs its own measurement.RT-POST-STORY-RUNTIMEin #1608 was edited after posting, which our claim rule normally doesn't accept; the maintainer accepted it for this PR.windows.hwithoutNOMINMAXinsubmit_phases.handthread_sampler.h;record_page_mapping,g_page_mapping) used but never defined.main's #769 test was right).fix_vsharp, and V#s for layer buffers below the arena keep their signed offset, asdocs/design.mdsays. RADV places upload buffers there. This also fixedmain'sd3d12_computeon an RDNA2 iGPU.0xFFFFFFFA), since0xFFFFFFFBwasmain's.compile_teardownexpects no cache file from llvmpipe.title_gpu_viewsgainsset_independent_pages(). A pair marked independent is not imported. Nothing in the game sets the flag yet.LEONIDA_GPU_LABELS=1(which--first-run-uiused to set), this branch's list values andmain's GPU labels both wrote the same address, with different timestamp sources. The label hook now only takes lists the list values don't track, and the profile no longer sets the variable.maintwice. The second merge took in #1558's new mock check, keeping the list-values checks last.LEONIDA_*variables this branch reads, inruntime/README.md's switch table, sotest_docs_env_varspasses.LEONIDA_QUEUE_PAGE_MAPPINGSis read by a function nothing calls; its row says so.indirect_clamp_testbeside itsadd_executable, sotest_ctest_registrationpasses.main, and 29 more tests pass (this branch's new ones).xmem_no_write_watchfailed once in the last full run on both devices under load and passes alone 4 of 4 times on both.set_independent_pages.rt::xmem::copy_page_mappings,queue_page_mappings_enabled()).queue_copy_page_mappingsandrebase_title_vsharp.RT-LIST-WRITE-VALUE, @Mby159) overlaps slots 71/72 and is handled separately.mainbcaa13dad+9177972ae: it merges cleanly; the semantic suite passes (489 files, 6,288 tests, 0 files failed); the 14 docs and writer tests pass;check_no_game_data.pyis clean on the 107 changed files.AI-assisted (Claude Code, Claude Opus 5.5).
@ecox982745 on GitHub · 2026-11-25 11:47 UTC · original
Verified the merged commit
ed94fbef9on native Windows 11, RTX 4090 (616.64), with the default allocation settings. This closes the failure I reported onba626820e.On the earlier head,
d3d12_graphics_indirect_heap_resourcesfailed 4/4 default runs. On the merge it passed 5/5 consecutive reruns. Each run checked the pixels from three indirect draws and two direct controls across descriptor heap changes. The same 12 targeted CTests, including the WARP control, now pass (previously 11/12). NoLEONIDA_IMPORT_BELOW_ARENAoverride was needed.Synthetic fixtures only. AI-assisted verification with OpenAI Codex.