[draft, integration] retail boot to the frame loop on current main (RT-BOOT-INTEGRATION) #321

Manually merged
github merged 39 commits from gh-pr/321/head into gh-pr/321/base 2026-11-26 08:53:19 +00:00
Owner

@⁠Mumogg on GitHub · 2026-11-24 03:09 UTC · original
Mumogg:boot/frame-loop-on-main → main · +15904 −1582 · 116 files · 39 commits · merged 2026-11-25 02:33 UTC

Claimed in #14 as RT-BOOT-INTEGRATION. Draft: for testing and for carving into small pull requests, not for merging as it is. #127 and #131 are the first two pieces, already carved out.

What this is

main 84347bbb6 merged with the stack that reaches the frame loop on my machine: ASTROWwwW's ladder-frame integration of the retail boot pull requests, the old pull requests 7604, 7286, 7584, 6446, 8591, 7384, 7535, 7448, 9137 and 9419, and my own fixes on top. Almost none of it is my code: the authors are in the history (ASTROWwwW, tedin7, mariuslozo-boop, Jadiac, NiiRoZz, Etr0p, Gustavo Kissel, hcristosm, thibaut and others).

Why a merge and not a rebase of each piece: main has most of these commits as ancestors without their content (finding in #14), so git treats them as already merged. This was merged against main's tree with the conflicts resolved by hand; the two merge commits say what was chosen where.

Measured

Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, 300 s, LEONIDA_D3D12=vulkan.

main 9ec34cdff main + #127 + #131 this branch
D3D12 calls 0 1 (D3D12XboxCreateDevice) 1,800,377
Pipeline states created 0 0 50,468
ExecuteCommandLists 0 0 178,233, none failed
DrawInstanced 0 0 133,669
PresentX 0 0 89,126
Ends with title int3 at 0.65 s host AV at device slot 26 still running at the timeout

The window stays black: with the real pixel stages the title composes a fully transparent layer over its clear. That is what it draws while it waits at this point, as far as I can tell, not a presentation fault (a forced clear colour and a forced pixel stage both reach the screen).

Choices that need a maintainer's decision

  • xmem: this branch keeps the run-mapped physical pages of the stack (xmem.cpp). main's commit-on-touch xmem, with the two view-protection fixes it lost (7e8e3c1db, 954fcb106), boots to 50,468 pipelines here and then fails one submit with an unknown resource. Without those two fixes it stops at 1,181 calls: the title's device set-up returns false after the first map into a write-combined window. I can send those two fixes on their own.
  • Slot 14: main routes the console descriptor heap to a handler in the Vulkan layer; the stack serves it inside the proxy with title-backed heaps (old PR 7021). The handler is registered and stored here, but not called.
  • Rect lists: the fourth corner is v2 + v3 - v1, the rule d3d12_rect_list tests. LEONIDA_RECT_FOURTH=v1v3 switches to v1 + v3 - v2, the only one that covered the target for the title's full-screen rectangle draws here. Open question, not a claim.

Tests

Every target builds. Runtime suite under Wine (ctest -j 4) at e0d4fd2b8: 292 of 321 pass. For comparison, plain main 9ec34cdff under the same Wine: 275 of 299.

  • 22 failures are the same tests that fail on plain main here.
  • xmem and d3d12_com fail on main and pass on this branch.
  • Seven fail only here:
    • d3d12_xmem_placed and d3d12_console_descriptor_heap: main's tests of the two designs this branch does not use yet (commit-on-touch xmem, the slot 14 handler). See the choices above.
    • dstorage: the guard-page case, as in #131.
    • run_tiny_tls_ga: its last part sets TMP/TEMP to a missing folder and expects the reservation to fail; under Wine the run returns 0. I read that as Wine not passing those variables through, not verified.
    • d3d12_title_va: stops at its first check, that a fresh VirtualAlloc lands above the arena size; under Wine it lands below.
    • pipeline_cache_seed: vk_pipeline_check exits 9 without output on the synthetic shader. Cause not found.
    • xs_proxy_mock: passes when run alone, failed in the parallel run. Cause not found.

Not built with MSVC and not run on Windows.

Rough edges, stated plainly

  • The diagnostics and experiment switches that were in the first push are removed (e0d4fd2b8). Four switches remain, each for a fix that is not proposed for main yet: LEONIDA_GRAPHICS_STAGE_LAYOUT (opt-in), LEONIDA_DESC_MIRROR, LEONIDA_SLOT70_TITLE (on by default) and LEONIDA_RECT_FOURTH.
  • My own fixes that I intend to send separately, each with its measurement: descriptor write-through and table mirror for title-backed heaps, graphics root arguments in the s8 window, slot 70 views over title memory, vertex and index views in title memory.
  • A run of more than about five minutes needs a memory cap here: NVIDIA's compiler takes the title's largest compute modules and memory goes from about 20 GB to over 50 GB.

No game data, addresses or offsets are in the branch (scripts/check_no_game_data.py over every added or changed file, plus a grep for image addresses).

AI-assisted (Claude Code); built, run and measured on the machine above.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt

**@⁠Mumogg** on GitHub · 2026-11-24 03:09 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321) `Mumogg:boot/frame-loop-on-main` → `main` · +15904 −1582 · 116 files · 39 commits · merged 2026-11-25 02:33 UTC Claimed in #14 as `RT-BOOT-INTEGRATION`. **Draft: for testing and for carving into small pull requests, not for merging as it is.** #127 and #131 are the first two pieces, already carved out. ### What this is `main` `84347bbb6` merged with the stack that reaches the frame loop on my machine: ASTROWwwW's `ladder-frame` integration of the retail boot pull requests, the old pull requests 7604, 7286, 7584, 6446, 8591, 7384, 7535, 7448, 9137 and 9419, and my own fixes on top. Almost none of it is my code: the authors are in the history (ASTROWwwW, tedin7, mariuslozo-boop, Jadiac, NiiRoZz, Etr0p, Gustavo Kissel, hcristosm, thibaut and others). Why a merge and not a rebase of each piece: `main` has most of these commits as ancestors without their content (finding in #14), so git treats them as already merged. This was merged against `main`'s tree with the conflicts resolved by hand; the two merge commits say what was chosen where. ### Measured Linux (Nobara 44, kernel 7.3), Wine 11.21 staging, RTX 5070 Ti (driver 615.78.08), clang-cl 22.1.8 + xwin SDK 10.0.26100, own 1.0.2.1 copy, network off, 300 s, `LEONIDA_D3D12=vulkan`. | | `main` `9ec34cdff` | `main` + #127 + #131 | this branch | |---|---|---|---| | D3D12 calls | 0 | 1 (`D3D12XboxCreateDevice`) | 1,800,377 | | Pipeline states created | 0 | 0 | 50,468 | | `ExecuteCommandLists` | 0 | 0 | 178,233, none failed | | `DrawInstanced` | 0 | 0 | 133,669 | | `PresentX` | 0 | 0 | 89,126 | | Ends with | title `int3` at 0.65 s | host AV at device slot 26 | still running at the timeout | The window stays black: with the real pixel stages the title composes a fully transparent layer over its clear. That is what it draws while it waits at this point, as far as I can tell, not a presentation fault (a forced clear colour and a forced pixel stage both reach the screen). ### Choices that need a maintainer's decision - **xmem**: this branch keeps the run-mapped physical pages of the stack (`xmem.cpp`). `main`'s commit-on-touch xmem, with the two view-protection fixes it lost (`7e8e3c1db`, `954fcb106`), boots to 50,468 pipelines here and then fails one submit with an unknown resource. Without those two fixes it stops at 1,181 calls: the title's device set-up returns false after the first map into a write-combined window. I can send those two fixes on their own. - **Slot 14**: `main` routes the console descriptor heap to a handler in the Vulkan layer; the stack serves it inside the proxy with title-backed heaps (old PR 7021). The handler is registered and stored here, but not called. - **Rect lists**: the fourth corner is `v2 + v3 - v1`, the rule `d3d12_rect_list` tests. `LEONIDA_RECT_FOURTH=v1v3` switches to `v1 + v3 - v2`, the only one that covered the target for the title's full-screen rectangle draws here. Open question, not a claim. ### Tests Every target builds. Runtime suite under Wine (`ctest -j 4`) at `e0d4fd2b8`: **292 of 321 pass**. For comparison, plain `main` `9ec34cdff` under the same Wine: 275 of 299. - 22 failures are the same tests that fail on plain `main` here. - `xmem` and `d3d12_com` fail on `main` and pass on this branch. - Seven fail only here: - `d3d12_xmem_placed` and `d3d12_console_descriptor_heap`: `main`'s tests of the two designs this branch does not use yet (commit-on-touch xmem, the slot 14 handler). See the choices above. - `dstorage`: the guard-page case, as in #131. - `run_tiny_tls_ga`: its last part sets `TMP`/`TEMP` to a missing folder and expects the reservation to fail; under Wine the run returns 0. I read that as Wine not passing those variables through, not verified. - `d3d12_title_va`: stops at its first check, that a fresh `VirtualAlloc` lands above the arena size; under Wine it lands below. - `pipeline_cache_seed`: `vk_pipeline_check` exits 9 without output on the synthetic shader. Cause not found. - `xs_proxy_mock`: passes when run alone, failed in the parallel run. Cause not found. Not built with MSVC and not run on Windows. ### Rough edges, stated plainly - The diagnostics and experiment switches that were in the first push are removed (`e0d4fd2b8`). Four switches remain, each for a fix that is not proposed for `main` yet: `LEONIDA_GRAPHICS_STAGE_LAYOUT` (opt-in), `LEONIDA_DESC_MIRROR`, `LEONIDA_SLOT70_TITLE` (on by default) and `LEONIDA_RECT_FOURTH`. - My own fixes that I intend to send separately, each with its measurement: descriptor write-through and table mirror for title-backed heaps, graphics root arguments in the s8 window, slot 70 views over title memory, vertex and index views in title memory. - A run of more than about five minutes needs a memory cap here: NVIDIA's compiler takes the title's largest compute modules and memory goes from about 20 GB to over 50 GB. No game data, addresses or offsets are in the branch (`scripts/check_no_game_data.py` over every added or changed file, plus a grep for image addresses). AI-assisted (Claude Code); built, run and measured on the machine above. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
PSOs a session built were compiled again by the next one. The layer already read the `pipelines` stage's
pipeline_cache.bin beside gta6rt.exe (#367), but never wrote anything back.

Now the runtime keeps its own cache in pipeline_cache.session.bin beside it: vkGetPipelineCacheData on device
teardown, then vkMergePipelineCaches into the cache at the next launch. Vulkan takes one blob per create, so the
offline seed and the session file are two caches merged together rather than one file. They are deliberately
separate files, so a run can never replace the multi-GB corpus cache with the handful of pipelines it compiled.

The write is capped at 256 MiB (LEONIDA_PIPELINE_CACHE_BYTES=<bytes>, 0 turns it off): a cache seeded from the
corpus comes back as the whole union, which is not worth rewriting at every exit; past the cap the previous
session file is left alone. A foreign or truncated session file is ignored with one line, and so is a failed
write (a read-only install directory).

The header check moves to runtime/src/pipeline_cache_store.h, shared with the offline seed and tested without
Vulkan (runtime/test/pipeline_cache_store_test.cpp: the limit parser and the 32-byte
VkPipelineCacheHeaderVersionOne comparison). write_pipeline_cache_file moves from runtime/test to runtime/src so
the runtime and vk_pipeline_check use the same staged write.

Not run: this machine has neither MSVC nor the Windows SDK, so the shim itself is compiled by the Windows job.
The portable test passes here (23/23 ctest on Linux). The end-to-end check needs a Vulkan GPU: run
d3d12_vulkan_device_test twice and look for "wrote N bytes to pipeline_cache.session.bin", then "merged N bytes"
on the second run.
A rectangle list is three corners; the fourth is v2 + v3 - v1 for the position and every interpolant, after the vertex stage. A quad list is four vertices per quad. Vulkan has neither. A PSO with topology type 19 was refused (E_INVALIDARG) and the two list topologies drew as a plain triangle list.

Rectangle list: the PSO becomes a triangle-list pipeline with a generated geometry stage (src/rect_list_geometry.h), built from the vertex shader's own SPIR-V outputs, that emits the strip v1 v2 v3 v4. Quad list: one triangle fan per quad (0 1 2, 0 2 3), drawn with the index values 4q..4q+3 so the translated vertex id (VertexIndex - BaseVertex) is right; non-indexed draws read a shared 0, 1, 2, ... buffer reserved in the arena.

Facts from xvalkyrie (GPL-3.0, commit 53af7df77c10); no code copied.
Depends on: #7384
AI-assisted: yes (Codex)
When VK_EXT_external_memory_host refuses the title's pages (write-combined or uncached pages, pages not committed yet, no extension, or the driver's import budget: about 64 MiB on an RTX 3070 Ti), the fallback was an ordinary DEFAULT buffer with neither the title's VA nor its data, so the title's descriptors resolved to nothing (slot 70 wrote a null SRV) and UI draws sampled nothing.

The fallback is now a host-visible buffer (VRAM through Resizable BAR where upload buffers use it) whose console VA is the title's address, filled from the title's pages at creation and again before every submission of command lists (VulkanContext::set_before_execute, called from VulkanQueue::execute_now). Only committed, readable pages are read; the rest is zero. GPU writes to the shadow are not copied back.

The first per-submission copy of each buffer size is timed and logged. Write-combined pages are read with MOVNTDQA: memcpy read 64 MiB of them in 253 ms on a Core i9-13900K, MOVNTDQA in 13 to 17 ms.

Tests: write-combined, uncached, 64 MiB write-combined and half-committed ranges in d3d12_existing_heap_test, two patterns over two submissions each, 0 validation errors on an RTX 4090.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Clang's baseline x64 target cannot inline _mm_stream_load_si128 into copy_guarded. Give only that function the target feature the existing intrinsic requires; keep the MSVC path and global build flags unchanged.

Depends on: #8225. Claimed in #8186, comment7110252121. AI-assisted: yes (Codex).
Xbox device slot 133 places a buffer at the title's own VA, about 1.5 TiB on
Windows, while a translated shader computes heap_base + console VA with
heap_base the arena's device address. A root view or V# naming that VA
missed the buffer. The layer now translates an address inside a
title-placed buffer where it writes it (root CBV/SRV/UAV, CBV and buffer
SRV/UAV V#s): to the arena offset of the slot-133 shadow, which now lives
in the GPU address arena when it fits, or to an import's device address
minus heap_base. New tests: title_va_alias_test, d3d12_title_va_test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A root view or buffer V# may name the title's own memory outside any
slot-133 buffer (a per-frame constant ring, #8862 section 3.5). The
layer now makes a 64 KiB-aligned window of those pages in the GPU
address arena, copies it before every submission like a slot-133
shadow, and names that copy instead: for root views when set, for V#s
the layer writes, and for buffer V#s the title writes into a bound
CBV/SRV/UAV table itself, rewritten in place before each submission.
Counters per kind, LEONIDA_TITLE_WINDOWS_MB caps the windows (64 MiB).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The xmem shims record what they hand the title (XMemAlloc, XMemAllocDefault,
XMemVirtualAlloc, the title's VirtualAlloc); an address outside those ranges
is left as it was and counted. The submit-time scan reads only the
CBV/SRV/UAV slots the bound table's root signature declares, and its cost
is accumulated per ExecuteCommandLists. Section 3.3 describes the three
places addresses are replaced and the two kinds of copy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Taken from the follow-up patch of @matheuskshn (930e78a2, tested by them on an RTX 4070 Ti: replay_quad_list_test fails the two non-indexed cases on a6b31d51 and passes with it). Re-run here: replay_quad_list_test and d3d12_rect_list_test exit 0 on the pod (Wine, RTX 4090).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The stack is ladder-frame (ASTROWwwW's integration of the retail boot pull requests) with the old pull requests
7604, 7286, 7584, 6446, 8591, 7384, 7535, 7448, 9137 and 9419 and local fixes on top. main carries many of those
commits as ancestors without their content, so the merge was made against main's tree, not its history: nothing
main dropped is dropped again here.

Resolved by hand:
- d3d12_xs_device.cpp and frame_pacer.h: the stack's Xbox-ABI layer, plus main's uncapped pacer and its two new
  registration hooks (set_placed_at_va_pages_hook is called before slot 133's handler; the console descriptor
  heap handler is stored but slot 14 still uses the title-backed heaps of old PR 7021).
- xmem.cpp, xmem_test.cpp: the stack's run-mapped physical pages. main's commit-on-touch xmem with the two
  view-protection fixes it lost (7e8e3c1db, 954fcb106) boots to 50,468 pipelines and then fails a submit with an
  unknown resource, so it is not used here yet.
- acphal.cpp, acphal_test.cpp, vulkan_replay.h (acceleration structure copy), README: main's.
- CMakeLists.txt, build_runtime.ps1, d3d12_com.cpp, d3d12_vulkan_device.cpp, shader_library.h, docs: both sides.

Measured (Linux, Wine 11.21 staging, RTX 5070 Ti, driver 615.78.08, clang-cl 22.1.8 + xwin, own 1.0.2.1 copy,
network off, LEONIDA_GRAPHICS_STAGE_LAYOUT=1, 300 s): 50,470 pipeline states created, 197,998 ExecuteCommandLists
with none failed, 148,467 DrawInstanced, 99,008 PresentX.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
- xmem.cpp: rt::xmem::commit_physical_range and commit_physical_pages exist for the run-mapped xmem too (pages
  are committed when allocated, so they only check the range), and main.cpp registers the slot 133 hook as main
  does.
- vk_test_device.h: VK_EXT_external_memory_host and host_pointer_alignment are back next to the A8 render
  target probe; d3d12_existing_heap_test and d3d12_xmem_placed_test use them.
- xs_proxy_mock_test.cpp: the stack's version, which tests the proxy that is in the tree (the automatic merge
  left two list mocks in one switch).
- d3d12_xs_device.cpp: no include of vulkan_replay.h, which the proxy tests without Vulkan headers could not
  compile, and the diagnostic that needed it is gone.

Every target builds with clang-cl 22.1.8 + xwin.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
d3d12_rect_list passes again. The other rule stays behind the switch as an open question: it is the one that
covers the target for the retail title's full-screen rectangle draws.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
make_game.py and tests/test_library_shaders_stage.py are main's (parallel library translation, the shard plan,
verify_fspx_key_clash), with the exe_shaders call kept. shader_library.h still loads the exe folder after
library; shader_library_test keeps one copy of the library case.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
- The "[rt] localdbg:" lines and the experiment switches are gone: LEONIDA_RECT_GREEN, LEONIDA_RECT_VS,
  LEONIDA_RECT_NOGS, LEONIDA_RECT_NOCULL, LEONIDA_RECT_FORCE, LEONIDA_VTX_TEST and LEONIDA_DEBUG_CLEAR, with the
  hard-coded test shader words. vulkan_replay.h returns unresolved_resource directly again.
- The descriptor write-through and the table mirror for title-backed heaps only copy between committed memory
  they may read and write. A handle that is only a number (xs_proxy_mock's heaps) is left alone; the test
  crashed there before.
- A slot 70 view over memory no buffer holds becomes a raw buffer view only when the title-memory registry
  (title_va_alias.h) holds the whole range, instead of any address below 4 GiB. xs_proxy_mock's null-view case
  passes again.

Still switches: LEONIDA_GRAPHICS_STAGE_LAYOUT, LEONIDA_DESC_MIRROR, LEONIDA_SLOT70_TITLE, LEONIDA_RECT_FOURTH.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HxBQf4pXH8PWpC5oZsM4bt
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:53:15 +00:00
github manually merged commit e0d4fd2b81 into gh-pr/321/base 2026-11-26 08:53:19 +00:00
Author
Owner

@⁠Sigtryggur-Mani-Gudmundsson on GitHub · 2026-11-24 04:37 UTC · original

I reproduced the rectangle coverage question at e0d4fd2b with the production geometry-stage generator, the translated M1.5 vertex and pixel shaders, and an RTX 4070 Ti on Linux. For top-left, bottom-left, bottom-right the default covered 1,536 of 3,072 pixels. The fixed-second override covered all 3,072. Across all 24 corner orders each fixed rule got eight gradient images right.

A backport of tedin7’s #207 corner selection covers all 24. I also kept this branch’s first submitted vertex as the source of flat attributes for both output triangles. Without that integration change, 16 of 24 flat-color images differ from this branch’s first-vertex rule. The patched default matched all 153,600 pixel comparisons, including opposite winding and two differently ordered rectangles in one draw. The override produced byte-identical captures before and after.

This measures axis-aligned rectangle coverage. I have not booted the retail title with it, and the transparent layer reported here remains unexplained. Patch for this exact head, GPU fixture, results and reproduction commands.

**@⁠Sigtryggur-Mani-Gudmundsson** on GitHub · 2026-11-24 04:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7122193634) I reproduced the rectangle coverage question at `e0d4fd2b` with the production geometry-stage generator, the translated M1.5 vertex and pixel shaders, and an RTX 4070 Ti on Linux. For top-left, bottom-left, bottom-right the default covered 1,536 of 3,072 pixels. The fixed-second override covered all 3,072. Across all 24 corner orders each fixed rule got eight gradient images right. A backport of tedin7’s #207 corner selection covers all 24. I also kept this branch’s first submitted vertex as the source of flat attributes for both output triangles. Without that integration change, 16 of 24 flat-color images differ from this branch’s first-vertex rule. The patched default matched all 153,600 pixel comparisons, including opposite winding and two differently ordered rectangles in one draw. The override produced byte-identical captures before and after. This measures axis-aligned rectangle coverage. I have not booted the retail title with it, and the transparent layer reported here remains unexplained. [Patch for this exact head, GPU fixture, results and reproduction commands](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches/tree/32e473bcf32f7b086df66ede4778632446170ac0/tests/boot-rectangles).
Author
Owner

@⁠Sigtryggur-Mani-Gudmundsson on GitHub · 2026-11-24 04:51 UTC · original · edited 2026-11-24 05:22 UTC

On e0d4fd2b with LEONIDA_GRAPHICS_STAGE_LAYOUT=1, I reproduced two graphics root-signature bugs. A 17-table signature fits s8–s24, but binding it invalidates the list because creation records the legacy packing result. A signature with one table and 24 constants falls back to the legacy offsets, but the recorder drops the high address word. The patch uses the signature’s selected layout for both decisions.

A synthetic 17-table draw with four additional constants failed at Close() on this PR head. After the fix, three draws through the device proxy and Vulkan queue produced the expected RGBA values at all 4,096 pixels on an RTX 4070 Ti under Wine. Five recording cases passed in each mode, and the existing 14 bundle scenarios passed. The fixture uses hand-written shaders. Retail output and native MSVC remain unverified.

Developed with Codex from this branch’s packers, command recorder and M1.5 fixture. Source patch for this PR head · Pixel fixture, cross-build adaptations and reproduction commands

Descriptor updates on the default graphics layout. On the same branch, binding short and wide tables at the same GPU address kept the short range. The proxy also lacked a provider for the existing submit-time descriptor copy. With both fixes, changing the last CBV after Close() and resubmitting the same list produced two distinct 64-word patterns on an RTX 4070 Ti under Wine. The original branch and both single-fix controls matched 0/64 twice. Routing the scan through the queue’s own device also fixed the two-device case. Guard slots on either side stayed untouched. This builds on Mumogg’s heap mirror and Etr0p’s scanner. Two-commit patch, GPU results and combined patch order

I also checked the opposite copy direction under Wine. CreateConstantBufferView and CopyDescriptorsSimple populated the real slot, but a CPU copy from the title backing still produced 0/64 expected words twice. With the Vulkan heap verifying its own mapping, each CPU copy produced 64/64 on the GPU. Read-only backing and the disabled mirror controls passed. Write-through follow-up patch and reproduction

For sampler tables, swapping wrap and clamp in game-owned memory after Close() matched 512/4,096 pixels in the M2 textured draw. Including sampler heaps in the submission refresh brought that to 4,096/4,096, including when the same list was resubmitted after restoring the original order. The one-slot case preserved its neighbor and the unbounded case refreshed slot 2,047. This extends AlxcBTW and Vonsek’s M2 fixture. Sampler patch and reproduction · Current descriptor patches and test results

**@⁠Sigtryggur-Mani-Gudmundsson** on GitHub · 2026-11-24 04:51 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7122402510) · edited 2026-11-24 05:22 UTC On `e0d4fd2b` with `LEONIDA_GRAPHICS_STAGE_LAYOUT=1`, I reproduced two graphics root-signature bugs. A 17-table signature fits s8–s24, but binding it invalidates the list because creation records the legacy packing result. A signature with one table and 24 constants falls back to the legacy offsets, but the recorder drops the high address word. The patch uses the signature’s selected layout for both decisions. A synthetic 17-table draw with four additional constants failed at `Close()` on this PR head. After the fix, three draws through the device proxy and Vulkan queue produced the expected RGBA values at all 4,096 pixels on an RTX 4070 Ti under Wine. Five recording cases passed in each mode, and the existing 14 bundle scenarios passed. The fixture uses hand-written shaders. Retail output and native MSVC remain unverified. Developed with Codex from this branch’s packers, command recorder and M1.5 fixture. [Source patch for this PR head](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches/blob/5f606e3d2bb819b09982f5220f36f876c438db40/graphics-root-layout.mbox) · [Pixel fixture, cross-build adaptations and reproduction commands](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches/tree/5f606e3d2bb819b09982f5220f36f876c438db40/tests/graphics-root-layout) **Descriptor updates on the default graphics layout.** On the same branch, binding short and wide tables at the same GPU address kept the short range. The proxy also lacked a provider for the existing submit-time descriptor copy. With both fixes, changing the last CBV after `Close()` and resubmitting the same list produced two distinct 64-word patterns on an RTX 4070 Ti under Wine. The original branch and both single-fix controls matched 0/64 twice. Routing the scan through the queue’s own device also fixed the two-device case. Guard slots on either side stayed untouched. This builds on Mumogg’s heap mirror and Etr0p’s scanner. [Two-commit patch, GPU results and combined patch order](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches/tree/0ad098959be0e57faee0bd5a689f8675601a7d4f/tests/descriptor-table-refresh) I also checked the opposite copy direction under Wine. `CreateConstantBufferView` and `CopyDescriptorsSimple` populated the real slot, but a CPU copy from the title backing still produced 0/64 expected words twice. With the Vulkan heap verifying its own mapping, each CPU copy produced 64/64 on the GPU. Read-only backing and the disabled mirror controls passed. [Write-through follow-up patch and reproduction](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches/tree/120625d2481c5d853ee9a89d9a231c8d091e21a9/tests/descriptor-write-through) For sampler tables, swapping wrap and clamp in game-owned memory after `Close()` matched 512/4,096 pixels in the M2 textured draw. Including sampler heaps in the submission refresh brought that to 4,096/4,096, including when the same list was resubmitted after restoring the original order. The one-slot case preserved its neighbor and the unbounded case refreshed slot 2,047. This extends AlxcBTW and Vonsek’s M2 fixture. [Sampler patch and reproduction](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches/tree/79c5f4d5070ed4976d4354cccd81222bb14719b3/tests/sampler-table-refresh) · [Current descriptor patches and test results](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches#refreshing-title-backed-descriptor-tables)
Author
Owner

@⁠oscarlosu-lab on GitHub · 2026-11-24 05:15 UTC · original

Tested this branch on native Windows 11 + MSVC x64 (VS 2026 / 19.52.37029) + Intel Core i5-12400F + NVIDIA GeForce RTX 3060 (driver 621.35):

Build (cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo --target gta6rt)

  • Result: [43/43] Linking CXX executable gta6rt.exe succeeds with 0 MSVC errors.
  • Minor MSVC warnings observed: C4459 (kPcResourceFlagsMask / kPcResourceFlags shadowing in runtime/shims/d3d12_xs_device.cpp), C4456 (nt shadowing in runtime/src/pe_loader.cpp), C4267 (size_t to uint32_t in runtime/src/vulkan_replay.h and runtime/shims/d3d12_vulkan_device.cpp), and C4996 (getenv/_wfopen).

Runtime observation (native Windows + Intel host)

  • Launches cleanly past PresentX ready, slot 25, and shader/PSO compilation (slot 67).
  • On an Intel CPU without native CLZERO, the CLZERO emulation path becomes a heavy kernel-mode bottleneck (~181 s kernel time out of ~187 s on one thread). Pairing this stack with #421 (RT-CLZERO-LOOP) directly eliminates that bottleneck on non-CLZERO desktop CPUs.

AI-assisted.

**@⁠oscarlosu-lab** on GitHub · 2026-11-24 05:15 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7122776346) Tested this branch on native **Windows 11 + MSVC x64 (VS 2026 / 19.52.37029) + Intel Core i5-12400F + NVIDIA GeForce RTX 3060 (driver 621.35)**: ### Build (`cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo --target gta6rt`) - **Result:** `[43/43] Linking CXX executable gta6rt.exe` succeeds with **0 MSVC errors**. - Minor MSVC warnings observed: `C4459` (`kPcResourceFlagsMask` / `kPcResourceFlags` shadowing in `runtime/shims/d3d12_xs_device.cpp`), `C4456` (`nt` shadowing in `runtime/src/pe_loader.cpp`), `C4267` (`size_t` to `uint32_t` in `runtime/src/vulkan_replay.h` and `runtime/shims/d3d12_vulkan_device.cpp`), and `C4996` (`getenv`/`_wfopen`). ### Runtime observation (native Windows + Intel host) - Launches cleanly past `PresentX ready`, `slot 25`, and shader/PSO compilation (`slot 67`). - On an Intel CPU without native `CLZERO`, the `CLZERO` emulation path becomes a heavy kernel-mode bottleneck (`~181 s` kernel time out of `~187 s` on one thread). Pairing this stack with #421 (`RT-CLZERO-LOOP`) directly eliminates that bottleneck on non-`CLZERO` desktop CPUs. AI-assisted.
Author
Owner

@⁠Tyrannys on GitHub · 2026-11-24 05:33 UTC · original

Windows build fix: scripts/build_runtime.ps1 line 84 doesn't parse at e0d4fd2b8

The merge put the two new file names inside the ForEach-Object string instead of the file list. PowerShell refuses the script, so Build.bat / make_game.py --stages runtime stop on Windows before compiling. The Linux cross-build and a direct cmake build skip this script, which is why it hasn't shown up there.

-... "shims\xapu_chad.cpp" | ForEach-Object { "`", "shims\dstorage.cpp", "shims\xbox_bvh_builder.cpp"$src\$_`"" }
+... "shims\xapu_chad.cpp", "shims\dstorage.cpp", "shims\xbox_bvh_builder.cpp" | ForEach-Object { "`"$src\$_`"" }

With this change the script parses ([Parser]::ParseFile reports 0 errors) and the runtime stage builds with MSVC on Windows 11 (RTX 4070 SUPER, Ryzen 7 9800X3D). AI-assisted (Claude Code).

**@⁠Tyrannys** on GitHub · 2026-11-24 05:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7123053598) **Windows build fix: `scripts/build_runtime.ps1` line 84 doesn't parse at `e0d4fd2b8`** The merge put the two new file names inside the `ForEach-Object` string instead of the file list. PowerShell refuses the script, so `Build.bat` / `make_game.py --stages runtime` stop on Windows before compiling. The Linux cross-build and a direct `cmake` build skip this script, which is why it hasn't shown up there. ```diff -... "shims\xapu_chad.cpp" | ForEach-Object { "`", "shims\dstorage.cpp", "shims\xbox_bvh_builder.cpp"$src\$_`"" } +... "shims\xapu_chad.cpp", "shims\dstorage.cpp", "shims\xbox_bvh_builder.cpp" | ForEach-Object { "`"$src\$_`"" } ``` With this change the script parses (`[Parser]::ParseFile` reports 0 errors) and the runtime stage builds with MSVC on Windows 11 (RTX 4070 SUPER, Ryzen 7 9800X3D). AI-assisted (Claude Code).
Author
Owner

@⁠Tyrannys on GitHub · 2026-11-24 07:08 UTC · original

The carved pieces, stacked on main, reach the frame loop on native Windows

main 8f481cf16 merged locally with: #375 #377 #383 #385 #387 #391 #395 #396 #403 #414 #416 #427 #428 #430 #432 (this branch's carved pieces), plus #445 (madhyn: command-list IID at slot 73), #360 (Andretuta: 0x40-byte D3D12_OPTIONS) and #219 (Andretuta: device slots 86/101/108). All merged cleanly except #219, which conflicts with #369/#385/#383. Both sides kept, and 86/101/108 added to device_slot_overridden. One local change on top, described in #428: sampled-only A8_UNORM textures of any dimension.

Windows 11, RTX 4070 SUPER, Ryzen 7 9800X3D, MSVC (make_game.py --stages runtime), own 1.0.2.1 copy, LEONIDA_D3D12=vulkan, --trace-d3d12, killed at 300 s. Pipeline library compute shaders: 1,928 of 2,684 translated (#321's translator plus #327 with two local fixes, posted on #327 separately). 0 slot-67 misses.

How far each addition got:

ends with D3D12 calls
main + the 15 pieces title int3 after slot 73 (unknown command-list IID) 13
+ #445 host AV in the generic forwarder for device slot 108 at 29 s 11,916
+ #360 + #219 title int3 at 20 s, right after GetResourceAllocationInfo format not supported yet: 65 (a 128x1 TEXTURE1D A8_UNORM, no flags) 62,647
+ A8 fix still running at 300 s 1,199,024

Last run: 82,036 pipeline states, 126,272 ExecuteCommandLists, 31,567 PresentX (about 105/s), 31,567 draws. In steady state each frame is one ClearRenderTargetView, one DrawInstanced with one SRV, then PresentX. Window captures at 60, 150 and 280 s are a uniform white. On #321 alone the same captures were black. The OBS graphics hook was injected into the process during this run, so the white capture may not be what was presented. Not verified.

Still logged: device slot 81 forwarded beyond the PC vtable (E_NOTIMPL), CreateLifetimeTracker unsupported, and the ACP HAL dropping commands with XApuGetResultCount returning 0. I haven't found what the title is waiting on in this state.

AI-assisted (Claude Code).

**@⁠Tyrannys** on GitHub · 2026-11-24 07:08 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7124666782) ### The carved pieces, stacked on `main`, reach the frame loop on native Windows `main` `8f481cf16` merged locally with: #375 #377 #383 #385 #387 #391 #395 #396 #403 #414 #416 #427 #428 #430 #432 (this branch's carved pieces), plus #445 (madhyn: command-list IID at slot 73), #360 (Andretuta: 0x40-byte D3D12_OPTIONS) and #219 (Andretuta: device slots 86/101/108). All merged cleanly except #219, which conflicts with #369/#385/#383. Both sides kept, and 86/101/108 added to `device_slot_overridden`. One local change on top, described in #428: sampled-only A8_UNORM textures of any dimension. Windows 11, RTX 4070 SUPER, Ryzen 7 9800X3D, MSVC (`make_game.py --stages runtime`), own 1.0.2.1 copy, `LEONIDA_D3D12=vulkan`, `--trace-d3d12`, killed at 300 s. Pipeline library compute shaders: 1,928 of 2,684 translated (#321's translator plus #327 with two local fixes, posted on #327 separately). 0 slot-67 misses. How far each addition got: | | ends with | D3D12 calls | |---|---|---| | `main` + the 15 pieces | title `int3` after slot 73 (unknown command-list IID) | 13 | | + #445 | host AV in the generic forwarder for device slot 108 at 29 s | 11,916 | | + #360 + #219 | title `int3` at 20 s, right after `GetResourceAllocationInfo format not supported yet: 65` (a 128x1 TEXTURE1D A8_UNORM, no flags) | 62,647 | | + A8 fix | **still running at 300 s** | 1,199,024 | Last run: 82,036 pipeline states, 126,272 `ExecuteCommandLists`, 31,567 `PresentX` (about 105/s), 31,567 draws. In steady state each frame is one `ClearRenderTargetView`, one `DrawInstanced` with one SRV, then `PresentX`. Window captures at 60, 150 and 280 s are a uniform white. On #321 alone the same captures were black. The OBS graphics hook was injected into the process during this run, so the white capture may not be what was presented. Not verified. Still logged: device slot 81 forwarded beyond the PC vtable (E_NOTIMPL), `CreateLifetimeTracker` unsupported, and the ACP HAL dropping commands with `XApuGetResultCount` returning 0. I haven't found what the title is waiting on in this state. AI-assisted (Claude Code).
Author
Owner

@⁠towade on GitHub · 2026-11-24 07:39 UTC · original

AMD and Intel on native Windows for this branch, since the runs so far are NVIDIA. Tested e0d4fd2b8 as is (no main merged, no extra PRs, #421 not applied), Windows 11 26300, MSVC 19.44 through CMake + Ninja (so the build_runtime.ps1 parse error doesn't come in), i7-14700K, own 1.0.2.1 copy, LEONIDA_D3D12=vulkan, --trace --trace-d3d12, the executable's network blocked in the Windows firewall, killed at 300 s. Counts only.

Work folder: the shaders stage of main 6312c057f + old #7529, #7746 and #8858 (merged locally): 26,503 main, 18 fspx/, 52 bvh/, 1,538 of 2,684 library/ (fewer than the 1,928 above, so some slot-67 misses below are the work folder's), 10 exe/, and native_hashes.txt (25,321 digests).

AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32029.2010): no crash in either run, but far from the NVIDIA numbers.

run D3D12 calls pipeline states ExecuteCommandLists DrawInstanced PresentX at 300 s
1, cold driver cache 63,389 50,525 40, none failed 53 42 still running
2, warm cache 72,665 51,256 524, none failed 784 526 still running

In run 2 the first PresentX comes at about a sixth of the D3D12 log and pipeline creation goes on to its last lines, so here the up-front PSO creation is what holds the boot back, and a warm driver cache helps little. Also logged: 10,241 unsupported, slot 67 misses (no translated compute shader for FSPX kind-6 and kind-0, several pipeline-library programs), and xg_xs texture computer slot 10 E_NOTIMPL.

Intel UHD Graphics 770 (Xe-LP, driver 32.0.101.7092, no VK_EXT_mesh_shader): 2 of 2 runs end after 2 s with the title's int3 at 1,656 D3D12 calls (1,634 ok, 22 called). The last lines are device slot 41's first call, CreateCommandSignature, with Xbox argument type 105 (stride 12) created as DISPATCH because the device has no mesh shaders; the title asserts right after. I saw the same stop on the ladder stack with #7858 yesterday. So on a GPU without mesh shaders the DISPATCH stand-in for type 105 doesn't get the title past slot 41; the mesh PSOs it would need are refused anyway (mesh-shader PSOs are unsupported).

Not run: #421 (CLZERO loop) on this Intel CPU, the carved pieces on main as in Tyrannys' run, and window captures.

AI-assisted (Claude Code).

**@⁠towade** on GitHub · 2026-11-24 07:39 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7125227996) AMD and Intel on native Windows for this branch, since the runs so far are NVIDIA. Tested `e0d4fd2b8` as is (no `main` merged, no extra PRs, #421 not applied), Windows 11 26300, MSVC 19.44 through CMake + Ninja (so the `build_runtime.ps1` parse error doesn't come in), i7-14700K, own 1.0.2.1 copy, `LEONIDA_D3D12=vulkan`, `--trace --trace-d3d12`, the executable's network blocked in the Windows firewall, killed at 300 s. Counts only. Work folder: the shaders stage of `main` `6312c057f` + old #7529, #7746 and #8858 (merged locally): 26,503 main, 18 `fspx/`, 52 `bvh/`, **1,538 of 2,684** `library/` (fewer than the 1,928 above, so some slot-67 misses below are the work folder's), 10 `exe/`, and `native_hashes.txt` (25,321 digests). **AMD Radeon RX 9070 XT** (RDNA4, driver 32.0.32029.2010): no crash in either run, but far from the NVIDIA numbers. | run | D3D12 calls | pipeline states | `ExecuteCommandLists` | `DrawInstanced` | `PresentX` | at 300 s | |---|---:|---:|---:|---:|---:|---| | 1, cold driver cache | 63,389 | 50,525 | 40, none failed | 53 | 42 | still running | | 2, warm cache | 72,665 | 51,256 | 524, none failed | 784 | 526 | still running | In run 2 the first `PresentX` comes at about a sixth of the D3D12 log and pipeline creation goes on to its last lines, so here the up-front PSO creation is what holds the boot back, and a warm driver cache helps little. Also logged: 10,241 `unsupported`, slot 67 misses (`no translated compute shader for FSPX kind-6 and kind-0`, several pipeline-library programs), and `xg_xs` texture computer slot 10 `E_NOTIMPL`. **Intel UHD Graphics 770** (Xe-LP, driver 32.0.101.7092, no `VK_EXT_mesh_shader`): 2 of 2 runs end after 2 s with the title's `int3` at 1,656 D3D12 calls (1,634 ok, 22 called). The last lines are device slot 41's first call, `CreateCommandSignature`, with Xbox argument type 105 (stride 12) created as `DISPATCH` because the device has no mesh shaders; the title asserts right after. I saw the same stop on the `ladder` stack with #7858 yesterday. So on a GPU without mesh shaders the `DISPATCH` stand-in for type 105 doesn't get the title past slot 41; the mesh PSOs it would need are refused anyway (`mesh-shader PSOs are unsupported`). Not run: #421 (CLZERO loop) on this Intel CPU, the carved pieces on `main` as in Tyrannys' run, and window captures. AI-assisted (Claude Code).
Author
Owner

@⁠oscarlosu-lab on GitHub · 2026-11-24 08:22 UTC · original

A note for testing this branch on Windows, from Marvisak/VIctory (GPL-3.0) commit ff8694a69, which measured it on the same title:

Alt or F10 sends WM_SYSCOMMAND / SC_KEYMENU to the title's window. The default handling (DefWindowProc) runs a modal menu loop on the thread that owns the window, which is the title's: the title stops drawing and reading input until a key ends the loop, nothing on screen shows it (no menu bar), and the title aborts itself about half a minute later. The abort is a deliberate write to address 0 at game_scarlett_master.exe+0x23cf683 (mov dword ptr [0], 0x4d8bd421, checked statically in 1.0.2.1), so on Windows it ends the run as an access violation that looks like a crash in the layer.

VIctory drops SC_KEYMENU in the window procedure it puts in front of the title's (next to its SC_CLOSE handling); the mouse can still open the window menu. Here the title's window is the one find_title_window finds, so the same filter would go wherever the layer subclasses or hooks that window's procedure. Not something I have measured on this branch: I'm noting it so an Alt-Tab during a test run is not read as a layer fault.

**@⁠oscarlosu-lab** on GitHub · 2026-11-24 08:22 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7126065778) A note for testing this branch on Windows, from Marvisak/VIctory (GPL-3.0) commit `ff8694a69`, which measured it on the same title: Alt or F10 sends `WM_SYSCOMMAND` / `SC_KEYMENU` to the title's window. The default handling (`DefWindowProc`) runs a modal menu loop on the thread that owns the window, which is the title's: the title stops drawing and reading input until a key ends the loop, nothing on screen shows it (no menu bar), and the title aborts itself about half a minute later. The abort is a deliberate write to address 0 at `game_scarlett_master.exe+0x23cf683` (`mov dword ptr [0], 0x4d8bd421`, checked statically in 1.0.2.1), so on Windows it ends the run as an access violation that looks like a crash in the layer. VIctory drops `SC_KEYMENU` in the window procedure it puts in front of the title's (next to its `SC_CLOSE` handling); the mouse can still open the window menu. Here the title's window is the one `find_title_window` finds, so the same filter would go wherever the layer subclasses or hooks that window's procedure. Not something I have measured on this branch: I'm noting it so an Alt-Tab during a test run is not read as a layer fault.
Author
Owner

@⁠towade on GitHub · 2026-11-24 08:33 UTC · original

Correction to the Intel part of my run above: the UHD 770 stop is the same title assert that fiestorra traced in #14 to the failed RegisterClassExA of the title's window class (claimed as RT-GUEST-WINDOW-CLASS) — the exception address in both of my Intel runs on this branch, and in my earlier run on the ladder stack, is the one in that finding. Slot 41 (type 105 as DISPATCH) is only the last call logged before it, so I should not have named it as the cause; whether the missing mesh shaders play a part on this GPU is open. The RX 9070 XT runs on this branch do not reach that assert.

AI-assisted (Claude Code).

**@⁠towade** on GitHub · 2026-11-24 08:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7126283197) Correction to the Intel part of [my run above](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/321): the UHD 770 stop is **the same title assert** that fiestorra traced in #14 to the failed `RegisterClassExA` of the title's window class (claimed as RT-GUEST-WINDOW-CLASS) — the exception address in both of my Intel runs on this branch, and in my earlier run on the `ladder` stack, is the one in that finding. Slot 41 (type 105 as `DISPATCH`) is only the last call logged before it, so I should not have named it as the cause; whether the missing mesh shaders play a part on this GPU is open. The RX 9070 XT runs on this branch do not reach that assert. AI-assisted (Claude Code).
Author
Owner

@⁠cobrabm12 on GitHub · 2026-11-24 08:58 UTC · original

I tested the DirectStorage queue from this branch at e0d4fd2b8 using VIctory d2a4bae1f as the loader and renderer. On an RX 7600 XT with Wine 11.21 and RADV 26.2.5, the rebuilt adapter loaded, accepted input at the offline account picker and reached Navigation Experience. VIctory can also reach that menu with its own queue.

The independent result is delivery to physical destinations. With the unmodified Leonida queue, 18,405 of 19,032 requests completed successfully and all 627 physical destinations failed. With the patch, two runs completed all 19,032. Reading back the physical pages independently matched 45,527,040 bytes per run. The synthetic dstorage_test.exe --physical-pages passed all 40 checks. The standalone Leonida loader and renderer still produced black frames in a separate test.

The source bundle includes both patches, the small provider and launcher, pinned build commands and the test scope. I cross-built all four Windows x64 files from fresh source checkouts and repeated the menu boot. Native Windows remains untested. AI-assisted with Codex. Source and reproduction instructions

**@⁠cobrabm12** on GitHub · 2026-11-24 08:58 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7126785549) I tested the DirectStorage queue from this branch at `e0d4fd2b8` using VIctory `d2a4bae1f` as the loader and renderer. On an RX 7600 XT with Wine 11.21 and RADV 26.2.5, the rebuilt adapter loaded, accepted input at the offline account picker and reached Navigation Experience. VIctory can also reach that menu with its own queue. The independent result is delivery to physical destinations. With the unmodified Leonida queue, 18,405 of 19,032 requests completed successfully and all 627 physical destinations failed. With the patch, two runs completed all 19,032. Reading back the physical pages independently matched 45,527,040 bytes per run. The synthetic `dstorage_test.exe --physical-pages` passed all 40 checks. The standalone Leonida loader and renderer still produced black frames in a separate test. The source bundle includes both patches, the small provider and launcher, pinned build commands and the test scope. I cross-built all four Windows x64 files from fresh source checkouts and repeated the menu boot. Native Windows remains untested. AI-assisted with Codex. [Source and reproduction instructions](https://gist.github.com/cobrabm12/bb93563334760bbecb7d9aa6fac9810f/9f8bd12b849596732e7beaca12cbc038d22ef286)
Author
Owner

@⁠roanh47 on GitHub · 2026-11-24 12:22 UTC · original

Windows / RTX 3070 frame-loop result

Tested the PR #321 head e0d4fd2b81e6636b1c6bb2f76be79e910e84d84b on Windows 11, MSVC 14.44.35207, NVIDIA GeForce RTX 3070 (Ampere), driver 610.88, Vulkan SDK 1.4.363.0, with a byte-verified 1.0.2.1 package (108/108 manifest entries).

The full shaders stage completed first: 26,503 corpus shaders, 21 FSPX programs, 52 BVH programs and 2,528 pipeline-library programs. The runtime loaded 29,104 translated shaders.

Guarded boot

A wrapper sampled free system RAM every 2 seconds and stopped the process if it fell below 3 GiB.

Measurement Result
Wall time 284.4 s
D3D12 calls 63,176
CreatePipelineState ok 50,456
CreatePipelineState failed 14
PresentX ok / failed 30 / 0
DrawInstanced 26
ExecuteCommandLists 61
Peak private memory 20.94 GiB
Peak working set 16.67 GiB
Minimum free RAM 2.88 GiB
Startup exceptions / unimplemented imports 0 / 0

The stack reached the frame loop and continued presenting until the RAM guard stopped it. There was no crash, no failed present and no title int3 in the startup trace.

The first D3D12 failures were 14 CreatePipelineState refusals for one executable-embedded vertex shader that this branch does not translate; they were nonfatal and are the already-tracked RT-EXE-SHADERS work (#387). The 10,241 unsupported calls were CreateLifetimeTracker (#438). The actual end of this run was the memory guard, not a runtime exception.

Command evidence

$env:LEONIDA_D3D12 = 'vulkan'
$env:LEONIDA_SHADERS = '<work>\shaders\spirv'

& '<frame-loop>\runtime\build\windows-rtx3070\gta6rt.exe' `
  --run '<package>\game_scarlett_master.exe' `
  --game-dir '<package>' `
  --overlay '<writable overlay>' `
  --trace "$env:TEMP\leonida-frame-20261124-131518.jsonl" `
  --trace-d3d12

# The wrapper stopped the process at 2.88 GiB free after 284.4 s.
python -I tools/boot_trace.py `
  "$env:TEMP\leonida-frame-20261124-131518.jsonl" `
  --d3d12 "$env:TEMP\leonida-frame-20261124-131518.stderr.log" `
  --counts-only

boot_trace.py --counts-only reported 63,176 calls: 52,372 ok, 547 called, 14 failed, 10,241 unsupported and 2 other.

Follow-up patch

Claimed RT-LAZY-PSO-RECT-LIST in coordination issue #14: #14

Focused local commit 8930bfbc2 on fix/lazy-pso-rect-list (main + #511 + #682) generates rectangle-list geometry before the lazy-PSO stage cleanup releases the translated vertex words. Before the fix, both rectangle-list tests failed with “the vertex shader is not a SPIR-V module”; after it, both pass on this RTX 3070, including with LEONIDA_VK_VALIDATION=1:

d3d12_rect_list            Passed
d3d12_rect_list_lazy_pso   Passed
100% tests passed, 0 validation errors

Counts and outcomes only; no game data included.

AI-assisted (DeepSeek v4.1 Flash 1017).

**@⁠roanh47** on GitHub · 2026-11-24 12:22 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7131343242) ## Windows / RTX 3070 frame-loop result Tested the PR #321 head `e0d4fd2b81e6636b1c6bb2f76be79e910e84d84b` on Windows 11, MSVC 14.44.35207, NVIDIA GeForce RTX 3070 (Ampere), driver 610.88, Vulkan SDK 1.4.363.0, with a byte-verified 1.0.2.1 package (108/108 manifest entries). The full shaders stage completed first: 26,503 corpus shaders, 21 FSPX programs, 52 BVH programs and 2,528 pipeline-library programs. The runtime loaded 29,104 translated shaders. ### Guarded boot A wrapper sampled free system RAM every 2 seconds and stopped the process if it fell below 3 GiB. | Measurement | Result | |---|---:| | Wall time | 284.4 s | | D3D12 calls | 63,176 | | `CreatePipelineState ok` | 50,456 | | `CreatePipelineState failed` | 14 | | `PresentX ok` / failed | 30 / 0 | | `DrawInstanced` | 26 | | `ExecuteCommandLists` | 61 | | Peak private memory | 20.94 GiB | | Peak working set | 16.67 GiB | | Minimum free RAM | 2.88 GiB | | Startup exceptions / unimplemented imports | 0 / 0 | The stack reached the frame loop and continued presenting until the RAM guard stopped it. There was no crash, no failed present and no title `int3` in the startup trace. The first D3D12 failures were 14 `CreatePipelineState` refusals for one executable-embedded vertex shader that this branch does not translate; they were nonfatal and are the already-tracked RT-EXE-SHADERS work (#387). The 10,241 unsupported calls were `CreateLifetimeTracker` (#438). The actual end of this run was the memory guard, not a runtime exception. ### Command evidence ```powershell $env:LEONIDA_D3D12 = 'vulkan' $env:LEONIDA_SHADERS = '<work>\shaders\spirv' & '<frame-loop>\runtime\build\windows-rtx3070\gta6rt.exe' ` --run '<package>\game_scarlett_master.exe' ` --game-dir '<package>' ` --overlay '<writable overlay>' ` --trace "$env:TEMP\leonida-frame-20261124-131518.jsonl" ` --trace-d3d12 # The wrapper stopped the process at 2.88 GiB free after 284.4 s. python -I tools/boot_trace.py ` "$env:TEMP\leonida-frame-20261124-131518.jsonl" ` --d3d12 "$env:TEMP\leonida-frame-20261124-131518.stderr.log" ` --counts-only ``` `boot_trace.py --counts-only` reported 63,176 calls: 52,372 ok, 547 called, 14 failed, 10,241 unsupported and 2 other. ### Follow-up patch Claimed **RT-LAZY-PSO-RECT-LIST** in coordination issue #14: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 Focused local commit `8930bfbc2` on `fix/lazy-pso-rect-list` (main + #511 + #682) generates rectangle-list geometry before the lazy-PSO stage cleanup releases the translated vertex words. Before the fix, both rectangle-list tests failed with “the vertex shader is not a SPIR-V module”; after it, both pass on this RTX 3070, including with `LEONIDA_VK_VALIDATION=1`: ```text d3d12_rect_list Passed d3d12_rect_list_lazy_pso Passed 100% tests passed, 0 validation errors ``` Counts and outcomes only; no game data included. AI-assisted (DeepSeek v4.1 Flash 1017).
Author
Owner

@⁠roanh47 on GitHub · 2026-11-24 12:30 UTC · original

Provenance clarification for the 14 nonfatal PSO refusals: the shader build was run from plain main, whose shaders stage does not produce spirv/exe/index.json. PR #321 already has both the executable-shader build step and runtime loader for that subindex. The verified executable contains one embedded vertex shader and nine embedded pixel shaders, so the repeated missing-VS refusals are consistent with that omitted subindex and remain covered by RT-EXE-SHADERS / #387.

No game data included.

AI-assisted (DeepSeek v4.1 Flash 1017).

**@⁠roanh47** on GitHub · 2026-11-24 12:30 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7131539634) Provenance clarification for the 14 nonfatal PSO refusals: the shader build was run from plain `main`, whose shaders stage does not produce `spirv/exe/index.json`. PR #321 already has both the executable-shader build step and runtime loader for that subindex. The verified executable contains one embedded vertex shader and nine embedded pixel shaders, so the repeated missing-VS refusals are consistent with that omitted subindex and remain covered by RT-EXE-SHADERS / #387. No game data included. AI-assisted (DeepSeek v4.1 Flash 1017).
Author
Owner

@⁠roanh47 on GitHub · 2026-11-24 13:22 UTC · original

Windows / RTX 3070 — PR #321 + #511 + rectangle-list fix + #588 + #461 + #517

Tested on Windows 11, MSVC 14.44.35207, NVIDIA GeForce RTX 3070 (Ampere), driver 610.88, Vulkan SDK 1.4.363.0, with a byte-verified 1.0.2.1 package.

Stack head: 2ffc005d9 (PR #321 e0d4fd2b8 plus local cherry-picks of #511, rectangle-list fix 8930bfbc2, #588, #461, #517 and an opt-in allocation tracer).

Validation

xg_xs                         Passed
d3d12_xbox_d16s8              Passed
d3d12_b4g4r4a4_target         Passed
d3d12_rect_list               Passed
d3d12_rect_list_lazy_pso      Passed
100% tests passed, 0 validation errors

Guarded boot

Command:

$env:LEONIDA_D3D12 = 'vulkan'
$env:LEONIDA_SHADERS = '<work>\shaders\spirv'
$env:LEONIDA_LAZY_PSO = '1'
$env:LEONIDA_ARENA_MB = '1024'
$env:LEONIDA_ALLOC_LOG = '1'
$env:LEONIDA_CAPTURE = '<capture dir>'
$env:LEONIDA_CAPTURE_EVERY = '1'
$env:LEONIDA_CAPTURE_LIMIT = '10'

& '<stack>\runtime\build\windows-rtx3070\gta6rt.exe' `
  --run '<package>\game_scarlett_master.exe' `
  --game-dir '<package>' `
  --overlay '<writable overlay>' `
  --trace '<temp>\leonida-lazy.jsonl' `
  --trace-d3d12

The wrapper stopped the process if free RAM fell below 3 GiB or after 600 seconds.

Measurement Result
Wall time 40.0 s
D3D12 calls 84,673
Outcomes 56,414 ok · 1,741 called · 3 failed · 26,497 unsupported
CreatePipelineState ok / failed 54,202 / 2
PresentX ok / failed 16 / 0
Draws 22
Captured frames 7
Peak private memory 8.59 GiB
Peak working set 3.96 GiB
Minimum free RAM 13.71 GiB

All seven captured frames are 2564×1421 and 100% black (mean RGB 0.00, one unique color).

First stop advanced

The previous int3 at game_scarlett_master.exe+0x344196 is gone. That assert was the high dword of GetResourceAllocationInfo().SizeInBytes; allocation tracing identified a 2560×1440 B4G4R4A4 render target returning UINT64_MAX, already fixed by claimed PR #517.

The new stop is a title int3 at game_scarlett_master.exe+0x14a6390, after ID3D12Device10::CreateCommittedResource3 refuses a 3D depth-stencil resource (768×768×6, format 53, ALLOW_DEPTH_STENCIL). Last recorded call: #84673 CreateCommittedResource3 failed.

Also measured in this run:

  • no texture-computer E_NOTIMPL calls (#461 path active);
  • no GPU address arena full and no ExecuteCommandLists failed: unknown resource;
  • two nonfatal PSO failures for one missing pixel shader;
  • 152 pipeline-library compute lookups still miss because those programs did not translate;
  • 25,450 unsupported CreateLifetimeTracker calls.

Follow-up claimed

RT-TITLE-RESERVATION-ARENA in coordination issue #14: #14

The measured NVIDIA path is to allocate the title's placeholder reservation from inside the arena's host mapping and rebase title addresses by subtraction, rather than importing a separate sparse buffer. This depends on #375/#644 but does not duplicate them.

Counts, shapes and outcomes only; no game data included.

AI-assisted (DeepSeek v4.1 Flash 1017).

**@⁠roanh47** on GitHub · 2026-11-24 13:22 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7132740522) ## Windows / RTX 3070 — PR #321 + #511 + rectangle-list fix + #588 + #461 + #517 Tested on Windows 11, MSVC 14.44.35207, NVIDIA GeForce RTX 3070 (Ampere), driver 610.88, Vulkan SDK 1.4.363.0, with a byte-verified 1.0.2.1 package. Stack head: `2ffc005d9` (PR #321 `e0d4fd2b8` plus local cherry-picks of #511, rectangle-list fix `8930bfbc2`, #588, #461, #517 and an opt-in allocation tracer). ### Validation ```text xg_xs Passed d3d12_xbox_d16s8 Passed d3d12_b4g4r4a4_target Passed d3d12_rect_list Passed d3d12_rect_list_lazy_pso Passed 100% tests passed, 0 validation errors ``` ### Guarded boot Command: ```powershell $env:LEONIDA_D3D12 = 'vulkan' $env:LEONIDA_SHADERS = '<work>\shaders\spirv' $env:LEONIDA_LAZY_PSO = '1' $env:LEONIDA_ARENA_MB = '1024' $env:LEONIDA_ALLOC_LOG = '1' $env:LEONIDA_CAPTURE = '<capture dir>' $env:LEONIDA_CAPTURE_EVERY = '1' $env:LEONIDA_CAPTURE_LIMIT = '10' & '<stack>\runtime\build\windows-rtx3070\gta6rt.exe' ` --run '<package>\game_scarlett_master.exe' ` --game-dir '<package>' ` --overlay '<writable overlay>' ` --trace '<temp>\leonida-lazy.jsonl' ` --trace-d3d12 ``` The wrapper stopped the process if free RAM fell below 3 GiB or after 600 seconds. | Measurement | Result | |---|---:| | Wall time | 40.0 s | | D3D12 calls | 84,673 | | Outcomes | 56,414 ok · 1,741 called · 3 failed · 26,497 unsupported | | `CreatePipelineState ok` / failed | 54,202 / 2 | | `PresentX ok` / failed | 16 / 0 | | Draws | 22 | | Captured frames | 7 | | Peak private memory | 8.59 GiB | | Peak working set | 3.96 GiB | | Minimum free RAM | 13.71 GiB | All seven captured frames are 2564×1421 and **100% black** (mean RGB 0.00, one unique color). ### First stop advanced The previous `int3` at `game_scarlett_master.exe+0x344196` is gone. That assert was the high dword of `GetResourceAllocationInfo().SizeInBytes`; allocation tracing identified a 2560×1440 B4G4R4A4 render target returning `UINT64_MAX`, already fixed by claimed PR #517. The new stop is a title `int3` at `game_scarlett_master.exe+0x14a6390`, after `ID3D12Device10::CreateCommittedResource3` refuses a 3D depth-stencil resource (768×768×6, format 53, `ALLOW_DEPTH_STENCIL`). Last recorded call: `#84673 CreateCommittedResource3 failed`. Also measured in this run: - no texture-computer `E_NOTIMPL` calls (#461 path active); - no `GPU address arena full` and no `ExecuteCommandLists failed: unknown resource`; - two nonfatal PSO failures for one missing pixel shader; - 152 pipeline-library compute lookups still miss because those programs did not translate; - 25,450 unsupported `CreateLifetimeTracker` calls. ### Follow-up claimed `RT-TITLE-RESERVATION-ARENA` in coordination issue #14: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 The measured NVIDIA path is to allocate the title's placeholder reservation from inside the arena's host mapping and rebase title addresses by subtraction, rather than importing a separate sparse buffer. This depends on #375/#644 but does not duplicate them. Counts, shapes and outcomes only; no game data included. AI-assisted (DeepSeek v4.1 Flash 1017).
Author
Owner

@⁠Dezmonius on GitHub · 2026-11-24 13:37 UTC · original

Native Windows synthetic presentation check on integration head e0d4fd2b8: Windows 10 22H2 (19045), RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, Vulkan.

  • d3d12_present passed with Khronos validation 1.4.369: 70 frames through the Xbox-ABI proxy, swapchain recreation on resize, and the expected colour in the captured presented images.
  • xbox_present passed with validation off, including readback, colour composition and the real-time 30-frame loop.
  • With LEONIDA_VK_VALIDATION=1, two stock xbox_present runs exited 0xc0000409. An unbuffered diagnostic repeat exposed the layer message: The VkDevice dispatch handle was not found and Validation will crash. The earlier standalone-device capture had already passed. The last runtime line was the Xbox proxy's first Release; the exact Vulkan call and root cause are still unconfirmed.

This is a synthetic test finding. The retail executable was not run and these results do not establish the cause of a blank retail frame. No game files or game logs used for these tests. AI-assisted (Codex).

**@⁠Dezmonius** on GitHub · 2026-11-24 13:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7133087537) Native Windows synthetic presentation check on integration head `e0d4fd2b8`: Windows 10 22H2 (19045), RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, Vulkan. - `d3d12_present` passed with Khronos validation 1.4.369: 70 frames through the Xbox-ABI proxy, swapchain recreation on resize, and the expected colour in the captured presented images. - `xbox_present` passed with validation off, including readback, colour composition and the real-time 30-frame loop. - With `LEONIDA_VK_VALIDATION=1`, two stock `xbox_present` runs exited `0xc0000409`. An unbuffered diagnostic repeat exposed the layer message: `The VkDevice dispatch handle was not found and Validation will crash`. The earlier standalone-device capture had already passed. The last runtime line was the Xbox proxy's first `Release`; the exact Vulkan call and root cause are still unconfirmed. This is a synthetic test finding. The retail executable was not run and these results do not establish the cause of a blank retail frame. No game files or game logs used for these tests. AI-assisted (Codex).
Author
Owner

@⁠otaviosza on GitHub · 2026-11-24 13:50 UTC · original

Tested on native Windows with MSVC, which the description says was not tried yet: Windows 10 22H2 (19045), NVIDIA GeForce RTX 3060, driver 610.88 (32.0.16.1088), MSVC 19.44, Windows SDK 10.0.26100, LEONIDA_D3D12=vulkan, own 1.0.2.1 copy, shaders translated by make_game.py on main.

  • scripts/build_runtime.ps1 does not parse on this branch: line 84 (the cl.exe fallback's $files list) has merge debris (ForEach-Object { "", "shims\dstorage.cpp", "shims\xbox_bvh_builder.cpp"$src$_"" }), so the whole script fails with a ParserError even on the CMake path. I built with the generated CMake + Ninja commands directly; all targets build with MSVC.
  • Run: still running at my 120 s limit, peak private memory 12.9 GB. An earlier run with about 12 GB of free commit ended at 29 s with LLVM ERROR: out of memory from the driver's compiler.
  • 14 slot-67 compute pipelines fail with no translated compute shader for FSPX kind-6 and kind-0 sha256 … (0x80070057); none of those hashes appear anywhere in the work folder's indexes.
  • PS_BlitColour_* is wave64 and the device is 32-wide, so it runs inexact ("no emulation exists for wave64 ps shaders yet").
**@⁠otaviosza** on GitHub · 2026-11-24 13:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7133406698) Tested on native Windows with MSVC, which the description says was not tried yet: Windows 10 22H2 (19045), NVIDIA GeForce RTX 3060, driver 610.88 (32.0.16.1088), MSVC 19.44, Windows SDK 10.0.26100, `LEONIDA_D3D12=vulkan`, own 1.0.2.1 copy, shaders translated by `make_game.py` on `main`. - `scripts/build_runtime.ps1` does not parse on this branch: line 84 (the cl.exe fallback's `$files` list) has merge debris (`ForEach-Object { "`", "shims\dstorage.cpp", "shims\xbox_bvh_builder.cpp"$src\$_`"" }`), so the whole script fails with a ParserError even on the CMake path. I built with the generated CMake + Ninja commands directly; all targets build with MSVC. - Run: still running at my 120 s limit, peak private memory 12.9 GB. An earlier run with about 12 GB of free commit ended at 29 s with `LLVM ERROR: out of memory` from the driver's compiler. - 14 slot-67 compute pipelines fail with `no translated compute shader for FSPX kind-6 and kind-0 sha256 …` (0x80070057); none of those hashes appear anywhere in the work folder's indexes. - `PS_BlitColour_*` is wave64 and the device is 32-wide, so it runs inexact ("no emulation exists for wave64 ps shaders yet").
Author
Owner

@⁠ThomasHFWright on GitHub · 2026-11-24 23:33 UTC · original

Independent Linux/Wine validation of exact head e0d4fd2b81e6636b1c6bb2f76be79e910e84d84b, plus an isolated rendering-patch comparison. AI-assisted.

Hardware/environment: Ryzen 7 9800X3D, RTX 5090, NVIDIA 620.73.04, Wine 11.22, Linux 7.3.6-1-cachyos. Title runs used the actual desktop, isolated networking, read-only package input, and separate writable artifacts. No shader substitutions or exception-skipping flags.

Build/test results

  • Native and full Windows cross-builds passed.
  • Semantic suite: 6,075 tests across 463 files, zero failures.
  • Native CTest: 71 passed, 2 skipped, zero failures.
  • Full Windows CTest under Xvfb: 262 passed, 28 failed, 32 skipped (322 total). The 28 include timeouts in dxgi_host_parity and dxgi_waitable_latency. Some failing comparisons use Wine's host D3D12, not Microsoft's implementation; this is not a clean compatibility result.
  • Fresh matching shader stage: main 26,503/26,503 translated and SPIR-V-valid; auxiliary entries: FSPX 21/29, BVH 52/52, library 2,528/2,684, executable 10/10. Runtime lookup reached every main entry, zero lookup failures.

The comparison applied the published boot-rectangle-corners, graphics-root-layout, descriptor-table-refresh, descriptor-write-through, and sampler-table-refresh mailboxes from graphics-runtime-patches, preserving authorship. One overlapping sampler hunk needed the intended helper rename to table_descriptor_count. All 15 focused tests passed, including enabled/disabled descriptor and sampler controls, second-device rebinding, rectangle geometry, and compact/legacy root layouts. Shader tools were unchanged.

Real title results (PresentX counted at one layer, not double-counted):

Configuration Bound DrawInstanced PresentX Captured samples
Exact PR head, defaults 180 s 3,602 1,201 4, all black
Published rendering patches, defaults 180 s 2,807 936 4, all black
Patches + graphics stage layout 180 s 647 218 1, black
Same + LEONIDA_ARENA_MB=1024 180 s 3,602 1,201 4, all black
Same, longer observation 300 s 197,101 65,702 24, all black

Each was stopped by its time bound (exit 124), not an application crash. These are not performance comparisons; later runs reused caches. The longer run experienced cgroup MemoryHigh pressure and swap use, but no hard-limit/OOM kill.

Concrete finding: with the 256 MiB default, the first three runs logged 14/12/14 slot-67 native compute failures returning E_OUTOFMEMORY. At 1 GiB these disappeared, with no logged arena refusals. Allocation logging reached 256.37 MiB in the 180 s run, beyond the old limit. The longer run still had nine slot-67 E_INVALIDARG failures, each accompanied by a missing translated compute-shader diagnostic.

This confirms a frame loop here, not visible gameplay. Increasing the arena removes one observed failure but does not solve the black frames. Next comparison is the newer first-run UI integration in #939. No game-derived files, raw title logs, shader identifiers, or captures attached.

**@⁠ThomasHFWright** on GitHub · 2026-11-24 23:33 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/321#issuecomment-7147540152) Independent Linux/Wine validation of exact head `e0d4fd2b81e6636b1c6bb2f76be79e910e84d84b`, plus an isolated rendering-patch comparison. AI-assisted. Hardware/environment: Ryzen 7 9800X3D, RTX 5090, NVIDIA 620.73.04, Wine 11.22, Linux 7.3.6-1-cachyos. Title runs used the actual desktop, isolated networking, read-only package input, and separate writable artifacts. No shader substitutions or exception-skipping flags. **Build/test results** - Native and full Windows cross-builds passed. - Semantic suite: 6,075 tests across 463 files, zero failures. - Native CTest: 71 passed, 2 skipped, zero failures. - Full Windows CTest under Xvfb: 262 passed, 28 failed, 32 skipped (322 total). The 28 include timeouts in `dxgi_host_parity` and `dxgi_waitable_latency`. Some failing comparisons use Wine's host D3D12, not Microsoft's implementation; this is not a clean compatibility result. - Fresh matching shader stage: main 26,503/26,503 translated and SPIR-V-valid; auxiliary entries: FSPX 21/29, BVH 52/52, library 2,528/2,684, executable 10/10. Runtime lookup reached every main entry, zero lookup failures. The comparison applied the published `boot-rectangle-corners`, `graphics-root-layout`, `descriptor-table-refresh`, `descriptor-write-through`, and `sampler-table-refresh` mailboxes from [graphics-runtime-patches](https://github.com/Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches), preserving authorship. One overlapping sampler hunk needed the intended helper rename to `table_descriptor_count`. All 15 focused tests passed, including enabled/disabled descriptor and sampler controls, second-device rebinding, rectangle geometry, and compact/legacy root layouts. Shader tools were unchanged. **Real title results** (PresentX counted at one layer, not double-counted): | Configuration | Bound | DrawInstanced | PresentX | Captured samples | |---|---:|---:|---:|---| | Exact PR head, defaults | 180 s | 3,602 | 1,201 | 4, all black | | Published rendering patches, defaults | 180 s | 2,807 | 936 | 4, all black | | Patches + graphics stage layout | 180 s | 647 | 218 | 1, black | | Same + `LEONIDA_ARENA_MB=1024` | 180 s | 3,602 | 1,201 | 4, all black | | Same, longer observation | 300 s | 197,101 | 65,702 | 24, all black | Each was stopped by its time bound (exit 124), not an application crash. These are not performance comparisons; later runs reused caches. The longer run experienced cgroup MemoryHigh pressure and swap use, but no hard-limit/OOM kill. **Concrete finding:** with the 256 MiB default, the first three runs logged 14/12/14 slot-67 native compute failures returning `E_OUTOFMEMORY`. At 1 GiB these disappeared, with no logged arena refusals. Allocation logging reached 256.37 MiB in the 180 s run, beyond the old limit. The longer run still had nine slot-67 `E_INVALIDARG` failures, each accompanied by a missing translated compute-shader diagnostic. This confirms a frame loop here, not visible gameplay. Increasing the arena removes one observed failure but does not solve the black frames. Next comparison is the newer first-run UI integration in #939. No game-derived files, raw title logs, shader identifiers, or captures attached.
This discussion has been locked. Commenting is limited to contributors.
No description provided.