Integrate post-story-load memory, queue and Vulkan fixes (RT-POST-STORY-RUNTIME) #1723

Merged
Moriz82 merged 14 commits from upstream-pr/1723 into main 2026-11-25 11:34:47 +00:00
Moriz82 commented 2026-11-25 09:45:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Moriz82 on 2026-11-25T09:45:41Z.


Claimed 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

Area Change
Physical memory A reserve-only XMem window carved from a live parent keeps the ranges on either side. Page remaps, CPU/GPU aliases, first-touch handling and guarded copies now coordinate with the threads that use them. An opt-in private heap isolates title allocations.
Command lists and queues Console 32- and 64-bit writes, waits and GPU timestamps retain their position in the list. Queue page remaps keep their fence alive until completion. This overlaps the write-value work in #622.
Indirect graphics Simple DRAW and DRAW_INDEXED signatures use the recorded pipeline, targets, root data and index/vertex bindings. Bundles can record the operation and inherit the executing parent's state. The GPU checks argument counts in private scratch and applies a shared work budget per command list. Unsupported signatures still go through validation.
Descriptors and arena Unreachable buffer descriptors resolve to a null view. Unbacked slots retry under a bounded budget. Heap padding protects the covered range beyond the last resource descriptor. Arena allocation and free-block walks use the same lock.
Textures and submission Texture refresh holds references across callbacks; optional background work moves fills and geometry copies off the submitting thread. Buffer refreshes can copy only dirty tiles. Layout changes are journaled per submission. Small linear RGBA32F exposure targets have a tested readback footprint.
Ray tracing and presentation TLAS construction translates instance addresses for bottom-level acceleration structures. Startup splash detection samples the readback image sparsely.
Pipeline lifetime Background compilation and device teardown coordinate so a released pipeline cannot leave queued work using its Vulkan objects. Submission, compiler and device-fault diagnostics expose where execution stalls.
Diagnostics and tests Optional Nsight Aftermath support, frame-phase counters, a local stage timeline, GPU pixel/readback fixtures and CPU concurrency tests.

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

Platform and build Observed result
Linux / Proton, accepted working build Offline Series S configuration on an RTX 4070. Landed at about 40 s and entered story loading at about 60 s. The loading screen had ended by the 160 s sample. The runtime continued submitting work until a title assertion at about 545 s, at roughly 0.85 title frames/s after loading. The run reported no GPU device loss.
Linux, public integration during rebase 6,280 translator tests passed across 488 files. The portable runtime suite passed 87 of 89 registered cases. Two skipped because the translated corpus and Vulkan validation mode were unset. The three changed built-in compute shaders regenerated byte-for-byte from their GLSL and passed SPIR-V validation.
Windows executable, cross-built on Linux The x64 MSVC-target executable linked and ran under Proton. The RTX 4070 passed the null-descriptor and indirect-clamp GPU fixtures. Texture-layout tests passed 465 checks. An earlier trial of the public integration stopped at a title breakpoint during initialization with the locally available shader library.
Native Windows The previously merged baseline reached the end of story loading on Windows 11 with an RTX 4070 Ti. The public integration head still needs a native Windows boot. Baseline results in #984

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

  • During testing the indirect bundle and heap-resource pixel fixtures exposed a replay path that read scratch arguments before the GPU clamp populated them. This commit fixes the missing dispatch. Those pixel fixtures and a direct-heap test that timed out need a fresh run after the rebase.
  • The default XMem suite on Proton still failed its system-wide commit-charge assertion, which also failed on upstream. Forced reserve mode had additional Wine view-state and protection mismatches.
  • The final rebase retained upstream's new pipeline compilation workers. The new null-buffer semantic test, data guard, diff checks and clean merge were verified on the resulting commit. The full-suite numbers above precede that final rebase. The runtime workflow path-filter test also fails on upstream and is being addressed separately in #1657.

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

  • Rebased on upstream main and verified a clean Git merge.
  • This is a cross-subsystem integration draft for review as a single runtime change.
  • Source and synthetic fixtures only. The game-data guard passed. Private traces, captures, binaries and working-branch history stay local.
  • The translator rules are unchanged. The new semantic test covers the existing null-buffer contract.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5488895549 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1723). Originally posted by [Moriz82](https://github.com/Moriz82) on 2026-11-25T09:45:41Z. --- Claimed as **RT-POST-STORY-RUNTIME** in [the coordination issue](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7157334772). This follows [#984](https://github.com/ubiquitarianism/leonida/pull/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 | Area | Change | | --- | --- | | Physical memory | A reserve-only XMem window carved from a live parent keeps the ranges on either side. Page remaps, CPU/GPU aliases, first-touch handling and guarded copies now coordinate with the threads that use them. An opt-in private heap isolates title allocations. | | Command lists and queues | Console 32- and 64-bit writes, waits and GPU timestamps retain their position in the list. Queue page remaps keep their fence alive until completion. This overlaps the write-value work in [#622](https://github.com/ubiquitarianism/leonida/pull/622). | | Indirect graphics | Simple DRAW and DRAW_INDEXED signatures use the recorded pipeline, targets, root data and index/vertex bindings. Bundles can record the operation and inherit the executing parent's state. The GPU checks argument counts in private scratch and applies a shared work budget per command list. Unsupported signatures still go through validation. | | Descriptors and arena | Unreachable buffer descriptors resolve to a null view. Unbacked slots retry under a bounded budget. Heap padding protects the covered range beyond the last resource descriptor. Arena allocation and free-block walks use the same lock. | | Textures and submission | Texture refresh holds references across callbacks; optional background work moves fills and geometry copies off the submitting thread. Buffer refreshes can copy only dirty tiles. Layout changes are journaled per submission. Small linear RGBA32F exposure targets have a tested readback footprint. | | Ray tracing and presentation | TLAS construction translates instance addresses for bottom-level acceleration structures. Startup splash detection samples the readback image sparsely. | | Pipeline lifetime | Background compilation and device teardown coordinate so a released pipeline cannot leave queued work using its Vulkan objects. Submission, compiler and device-fault diagnostics expose where execution stalls. | | Diagnostics and tests | Optional Nsight Aftermath support, frame-phase counters, a local stage timeline, GPU pixel/readback fixtures and CPU concurrency tests. | **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 | Platform and build | Observed result | | --- | --- | | Linux / Proton, accepted working build | Offline Series S configuration on an RTX 4070. Landed at about 40 s and entered story loading at about 60 s. The loading screen had ended by the 160 s sample. The runtime continued submitting work until a title assertion at about 545 s, at roughly 0.85 title frames/s after loading. The run reported no GPU device loss. | | Linux, public integration during rebase | 6,280 translator tests passed across 488 files. The portable runtime suite passed 87 of 89 registered cases. Two skipped because the translated corpus and Vulkan validation mode were unset. The three changed built-in compute shaders regenerated byte-for-byte from their GLSL and passed SPIR-V validation. | | Windows executable, cross-built on Linux | The x64 MSVC-target executable linked and ran under Proton. The RTX 4070 passed the null-descriptor and indirect-clamp GPU fixtures. Texture-layout tests passed 465 checks. An earlier trial of the public integration stopped at a title breakpoint during initialization with the locally available shader library. | | Native Windows | The previously merged baseline reached the end of story loading on Windows 11 with an RTX 4070 Ti. The public integration head still needs a native Windows boot. [Baseline results in #984](https://github.com/ubiquitarianism/leonida/pull/984) | 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** - During testing the indirect bundle and heap-resource pixel fixtures exposed a replay path that read scratch arguments before the GPU clamp populated them. This commit fixes the missing dispatch. Those pixel fixtures and a direct-heap test that timed out need a fresh run after the rebase. - The default XMem suite on Proton still failed its system-wide commit-charge assertion, which also failed on upstream. Forced reserve mode had additional Wine view-state and protection mismatches. - The final rebase retained upstream's new pipeline compilation workers. The new null-buffer semantic test, data guard, diff checks and clean merge were verified on the resulting commit. The full-suite numbers above precede that final rebase. The runtime workflow path-filter test also fails on upstream and is being addressed separately in [#1657](https://github.com/ubiquitarianism/leonida/pull/1657). 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 - [x] Rebased on upstream main and verified a clean Git merge. - [ ] This is a cross-subsystem integration draft for review as a single runtime change. - [x] Source and synthetic fixtures only. The game-data guard passed. Private traces, captures, binaries and working-branch history stay local. - The translator rules are unchanged. The new semantic test covers the existing null-buffer contract.
ecox982745 commented 2026-11-25 10:19:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-25T10:19:10Z.


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.

Check Result
Six stateful indirect draw cases All passed. The fixtures checked 36 images, 4,096 pixels each, with zero RGBA mismatches.
Indirect bundles Both indirect operations matched direct drawing across two parent states on the RTX. The opt-out control passed. The separate Windows WARP reference also passed.
Direct heaps Both the enabled and disabled cases passed. The enabled case finished in about 0.22 s on five further runs, including its mesh draw.
d3d12_graphics_indirect_heap_resources Failed all four default runs. Both direct controls and all three indirect draws returned the pixel shader's sentinel. The recorded draw state and the vertex outputs matched.

The 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=1 set 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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7159531742 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1723#issuecomment-7159531742). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-25T10:19:10Z. --- 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. | Check | Result | | --- | --- | | Six stateful indirect draw cases | All passed. The fixtures checked 36 images, 4,096 pixels each, with zero RGBA mismatches. | | Indirect bundles | Both indirect operations matched direct drawing across two parent states on the RTX. The opt-out control passed. The separate Windows WARP reference also passed. | | Direct heaps | Both the enabled and disabled cases passed. The enabled case finished in about 0.22 s on five further runs, including its mesh draw. | | `d3d12_graphics_indirect_heap_resources` | Failed all four default runs. Both direct controls and all three indirect draws returned the pixel shader's sentinel. The recorded draw state and the vertex outputs matched. | The 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=1`** set 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 commented 2026-11-25 10:23:16 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T10:23:16Z.


@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.h without NOMINMAX: runtime/src/submit_phases.h and runtime/src/thread_sampler.h now include <windows.h>. Test targets that reach them through vulkan_replay.h and don't define NOMINMAX (replay_uav_clear_offset_test first) get the max/min macros, and the std::max/std::min calls in vulkan_replay.h fail ("expected unqualified-id"). Fix: the same #ifndef NOMINMAX guard vulkan_gpu_labels.h uses, in both headers.
  • A missing test helper: check_list_values_more() in runtime/test/xs_proxy_mock_test.cpp uses record_page_mapping (as the queue slot 31 hook) and g_page_mapping, but neither is defined anywhere in the PR. We're adding a small PageMappingRecord with 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.
  • Everything else builds; gta6rt itself was never affected, which is probably why this didn't show on your side.
  • Next: the full Windows suite (clang-cl under Wine, llvmpipe and an RDNA2 iGPU) on 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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7159624584 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1723#issuecomment-7159624584). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T10:23:16Z. --- @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.h` without `NOMINMAX`:** `runtime/src/submit_phases.h` and `runtime/src/thread_sampler.h` now include `<windows.h>`. Test targets that reach them through `vulkan_replay.h` and don't define `NOMINMAX` (`replay_uav_clear_offset_test` first) get the `max`/`min` macros, and the `std::max`/`std::min` calls in `vulkan_replay.h` fail ("expected unqualified-id"). Fix: the same `#ifndef NOMINMAX` guard `vulkan_gpu_labels.h` uses, in both headers. - **A missing test helper:** `check_list_values_more()` in `runtime/test/xs_proxy_mock_test.cpp` uses `record_page_mapping` (as the queue slot 31 hook) and `g_page_mapping`, but neither is defined anywhere in the PR. We're adding a small `PageMappingRecord` with 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. - **Everything else builds;** `gta6rt` itself was never affected, which is probably why this didn't show on your side. - **Next:** the full Windows suite (clang-cl under Wine, llvmpipe and an RDNA2 iGPU) on `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 commented 2026-11-25 10:37:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-25T10:37:50Z.


Native Windows retail boot of this head, as the description asks. One machine; counts only, no game data.

Setup:

  • Windows 11, RTX 4070 Laptop 8 GB (NVIDIA 591.59), 40 GB RAM, own 1.0.2.1 copy.
  • gta6rt built with MSVC from main 57ba40bd6 + #1558 (3cf0a41bc, needed on NVIDIA to get past the landing screen) + this PR at ba626820e.
  • #1558 and this PR conflict in runtime/test/xs_proxy_mock_test.cpp only. I took this PR's side for the test file; gta6rt itself merges cleanly.
  • Default switches, plus LEONIDA_TITLE_WATCHDOG=0 and LEONIDA_DEVICE_FAULT=1. Shaders from make_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_01468 in 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:

  • At about 240 s, the fence-mirror and list-value counters stop moving: the last 36 ten-second reports, up to 600 s, are identical.
    • 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.
  • So 107 recorded list writes never land, the 7 gates all time out, and title threads keep polling a mirror whose value never arrives. Submissions stop at about #4,788.
  • Before that, long inline compute compiles: 35 library compute pipelines, several at 38 to 45 s each (lib_cs_01339 45.4 s, lib_cs_00959 38.5 s). The window stops answering at about 200 s.
  • One dstorage_failure at 152 s (not fatal).
  • Peak 19.9 GB working set, 24.4 GB private.

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:

  • No device loss and no exception in 600 s.
  • The counters freeze at about 230 s, at 17062 writes recorded, 17023 landed (39 never land) and 5 gates held, 0 met, 5 timed out.
  • A dstorage_failure at 167 s (0x89240030, E_DSTORAGE_DECOMPRESSION_ERROR); the first run had two.
  • The driver cache was warmer, so the longest compile was 11.3 s instead of 45 s, and the load got a little further before the stall.

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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7159957675 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1723#issuecomment-7159957675). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-25T10:37:50Z. --- Native Windows retail boot of this head, as the description asks. One machine; counts only, no game data. **Setup:** - Windows 11, RTX 4070 Laptop 8 GB (NVIDIA 591.59), 40 GB RAM, own 1.0.2.1 copy. - `gta6rt` built with MSVC from `main` `57ba40bd6` + #1558 (`3cf0a41bc`, needed on NVIDIA to get past the landing screen) + this PR at `ba626820e`. - #1558 and this PR conflict in `runtime/test/xs_proxy_mock_test.cpp` only. I took this PR's side for the test file; `gta6rt` itself merges cleanly. - Default switches, plus `LEONIDA_TITLE_WATCHDOG=0` and `LEONIDA_DEVICE_FAULT=1`. Shaders from `make_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_01468` in 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: - At about 240 s, the fence-mirror and list-value counters stop moving: the last 36 ten-second reports, up to 600 s, are identical. - `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. - So 107 recorded list writes never land, the 7 gates all time out, and title threads keep polling a mirror whose value never arrives. Submissions stop at about #4,788. - Before that, long inline compute compiles: 35 library compute pipelines, several at 38 to 45 s each (`lib_cs_01339` 45.4 s, `lib_cs_00959` 38.5 s). The window stops answering at about 200 s. - One `dstorage_failure` at 152 s (not fatal). - Peak 19.9 GB working set, 24.4 GB private. **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: - No device loss and no exception in 600 s. - The counters freeze at about 230 s, at `17062 writes recorded, 17023 landed` (39 never land) and `5 gates held, 0 met, 5 timed out`. - A `dstorage_failure` at 167 s (`0x89240030`, `E_DSTORAGE_DECOMPRESSION_ERROR`); the first run had two. - The driver cache was warmer, so the longest compile was 11.3 s instead of 45 s, and the load got a little further before the stall. 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 commented 2026-11-25 11:32:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tortoche on 2026-11-25T11:32:21Z.


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:

  • Splash → profile selector → loading screen all work.
  • With #1728 merged, we get past the previous ~6994 GPU submissions crash (+0x2474606 / untranslated title V# AV in hash_bytes) and reach 9621+ GPU submissions (~7 min).
  • However, the run still ends in a hard crash right after 201 dstorage_failure events (0x89240030, reason=missing-profile) on ttdb_terrain_image_based_0_1.ttpf.
  • Also observed: 19 gate timeouts in d3d12_xs (19 gates held, 0 met, 19 timed out) and staged title texture upload failures for formats 133, 134, 145.

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7161177044 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1723#issuecomment-7161177044). Originally posted by [Tortoche](https://github.com/Tortoche) on 2026-11-25T11:32:21Z. --- 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:** - Splash → profile selector → loading screen all work. - With #1728 merged, we get past the previous ~6994 GPU submissions crash (`+0x2474606` / untranslated title V# AV in `hash_bytes`) and reach **9621+ GPU submissions** (~7 min). - However, the run still ends in a hard crash right after **201 `dstorage_failure` events (`0x89240030`, `reason=missing-profile`)** on `ttdb_terrain_image_based_0_1.ttpf`. - Also observed: **19 gate timeouts** in `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 commented 2026-11-25 11:34:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T11:34:50Z.


Merged. Thank you, @Moriz82: on our machine this is the biggest single step of the boot so far.

  • Why it goes in now: retail boot, RX 7900 XTX under Wine (RADV), 10 minutes, same scripted input:
    • main reached 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.
    • Almost all of that is the whole-section commit under Wine (LEONIDA_XMEM_SEC_COMMIT). It does nothing on native Windows, which still needs its own measurement.
  • Claim: RT-POST-STORY-RUNTIME in #1608 was edited after posting, which our claim rule normally doesn't accept; the maintainer accepted it for this PR.
  • What we changed before merging (each commit says what failed and which side was right):
    • The runtime's test build didn't compile:
      • windows.h without NOMINMAX in submit_phases.h and thread_sampler.h;
      • a test helper (record_page_mapping, g_page_mapping) used but never defined.
    • Queue slot 31 without a mapper keeps the unmodelled answer again (main's #769 test was right).
    • Inline-table V#s now go through fix_vsharp, and V#s for layer buffers below the arena keep their signed offset, as docs/design.md says. RADV places upload buffers there. This also fixed main's d3d12_compute on an RDNA2 iGPU.
    • The new test-shader mode gets its own value (0xFFFFFFFA), since 0xFFFFFFFB was main's.
    • compile_teardown expects no cache file from llvmpipe.
    • title_gpu_views gains set_independent_pages(). A pair marked independent is not imported. Nothing in the game sets the flag yet.
    • Console list slots 71/72 now have one writer. With LEONIDA_GPU_LABELS=1 (which --first-run-ui used to set), this branch's list values and main'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.
    • Merged current main twice. The second merge took in #1558's new mock check, keeping the list-values checks last.
    • Documented the 32 LEONIDA_* variables this branch reads, in runtime/README.md's switch table, so test_docs_env_vars passes. LEONIDA_QUEUE_PAGE_MAPPINGS is read by a function nothing calls; its row says so.
    • Registered indirect_clamp_test beside its add_executable, so test_ctest_registration passes.
  • Windows suite under Wine (llvmpipe and an RDNA2 iGPU): nothing goes from pass to fail against main, and 29 more tests pass (this branch's new ones). xmem_no_write_watch failed once in the last full run on both devices under load and passes alone 4 of 4 times on both.
  • Left for you:
    • Decide which of the title's GPU-only pairs are independent and call set_independent_pages.
    • Wire in or drop the unused batch slot-31 path (rt::xmem::copy_page_mappings, queue_page_mappings_enabled()).
    • Remove the now-dead four-argument queue_copy_page_mappings and rebase_title_vsharp.
    • Confirm that zeroing negative V# offsets was not meant for older shader libraries.
    • Please send follow-ups as one PR per item, each with its own claim, and name the tool and model in the AI note.
  • #622 (RT-LIST-WRITE-VALUE, @Mby159) overlaps slots 71/72 and is handled separately.
  • Checked on main bcaa13dad + 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.py is clean on the 107 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7161231004 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1723#issuecomment-7161231004). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T11:34:50Z. --- Merged. Thank you, @Moriz82: on our machine this is the biggest single step of the boot so far. - **Why it goes in now:** retail boot, RX 7900 XTX under Wine (RADV), 10 minutes, same scripted input: - `main` reached 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. - Almost all of that is the whole-section commit under Wine (`LEONIDA_XMEM_SEC_COMMIT`). It does nothing on native Windows, which still needs its own measurement. - **Claim:** `RT-POST-STORY-RUNTIME` in #1608 was edited after posting, which our claim rule normally doesn't accept; the maintainer accepted it for this PR. - **What we changed before merging** (each commit says what failed and which side was right): - The runtime's test build didn't compile: - `windows.h` without `NOMINMAX` in `submit_phases.h` and `thread_sampler.h`; - a test helper (`record_page_mapping`, `g_page_mapping`) used but never defined. - Queue slot 31 without a mapper keeps the unmodelled answer again (`main`'s #769 test was right). - Inline-table V#s now go through `fix_vsharp`, and V#s for layer buffers below the arena keep their signed offset, as `docs/design.md` says. RADV places upload buffers there. This also fixed `main`'s `d3d12_compute` on an RDNA2 iGPU. - The new test-shader mode gets its own value (`0xFFFFFFFA`), since `0xFFFFFFFB` was `main`'s. - `compile_teardown` expects no cache file from llvmpipe. - `title_gpu_views` gains `set_independent_pages()`. A pair marked independent is not imported. Nothing in the game sets the flag yet. - **Console list slots 71/72 now have one writer.** With `LEONIDA_GPU_LABELS=1` (which `--first-run-ui` used to set), this branch's list values and `main`'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. - Merged current `main` twice. The second merge took in #1558's new mock check, keeping the list-values checks last. - Documented the 32 `LEONIDA_*` variables this branch reads, in `runtime/README.md`'s switch table, so `test_docs_env_vars` passes. `LEONIDA_QUEUE_PAGE_MAPPINGS` is read by a function nothing calls; its row says so. - Registered `indirect_clamp_test` beside its `add_executable`, so `test_ctest_registration` passes. - **Windows suite under Wine (llvmpipe and an RDNA2 iGPU):** nothing goes from pass to fail against `main`, and 29 more tests pass (this branch's new ones). `xmem_no_write_watch` failed once in the last full run on both devices under load and passes alone 4 of 4 times on both. - **Left for you:** - Decide which of the title's GPU-only pairs are independent and call `set_independent_pages`. - Wire in or drop the unused batch slot-31 path (`rt::xmem::copy_page_mappings`, `queue_page_mappings_enabled()`). - Remove the now-dead four-argument `queue_copy_page_mappings` and `rebase_title_vsharp`. - Confirm that zeroing negative V# offsets was not meant for older shader libraries. - Please send follow-ups as one PR per item, each with its own claim, and name the tool and model in the AI note. - **#622 (`RT-LIST-WRITE-VALUE`, @Mby159)** overlaps slots 71/72 and is handled separately. - **Checked on `main` `bcaa13dad` + `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.py` is clean on the 107 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
ecox982745 commented 2026-11-25 11:47:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-25T11:47:14Z.


Verified the merged commit ed94fbef9 on native Windows 11, RTX 4090 (616.64), with the default allocation settings. This closes the failure I reported on ba626820e.

On the earlier head, d3d12_graphics_indirect_heap_resources failed 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). No LEONIDA_IMPORT_BELOW_ARENA override was needed.

Synthetic fixtures only. AI-assisted verification with OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7161498132 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1723#issuecomment-7161498132). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-25T11:47:14Z. --- Verified the merged commit `ed94fbef9` on native Windows 11, RTX 4090 (616.64), with the default allocation settings. This closes the failure I reported on `ba626820e`. On the earlier head, `d3d12_graphics_indirect_heap_resources` failed 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). No `LEONIDA_IMPORT_BELOW_ARENA` override was needed. Synthetic fixtures only. AI-assisted verification with OpenAI Codex.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1723
No description provided.