d3d12: LEONIDA_LAZY_PSO=1 builds pipelines at their first draw or dispatch and keeps no unedited shader modules (RT-LAZY-PSO) #511

Open
github-bot wants to merge 1 commit from github-bot/gh-511 into main AGit
Owner

@⁠VibeClauding on GitHub · 2026-11-24 06:39 UTC · original
VibeClauding:cont-lazy-pso → main · +182 −37 · 4 files · 1 commits · open

Claimed in #14 as RT-LAZY-PSO.

What and why

Opt-in LEONIDA_LAZY_PSO=1 (off by default, nothing changes without it):

  • Graphics PSOs check the description, pick and read the translated shaders and make the layout as before, but the driver pipeline is built by the first draw that uses it, as variant(0). prepare_draw takes the base pipeline from variant(0) when pipeline is null.
  • Compute PSOs compile at their first dispatch through a new ComputePipeline::build (both dispatch sites in prepare). The subgroup-size request is still decided, recorded (pipeline_subgroup_requests) and reported at creation in both modes.
  • No kept shader modules for stages the runtime does not edit (no f16 link, no D24 depth patch): build() makes each from the library's words for the pipeline it creates and destroys it after (ModuleCleanup). Edited stages keep their module as today.

The retail title creates some 50,000 PSOs before its first frame and draws with far fewer. On a 16 GB RAM + 8 GB pagefile Windows machine (RTX 3070, driver 610.88), building them all eagerly ran the process out of commit between 50 and 300 s into the boot: the driver's copy of every module plus every pipeline. With deferred pipelines and no kept modules, private memory stayed at 11-17 GB and the title's own loading continued instead of stalling behind the compiles. Those measurements were on a forge-based branch with this change and others; this pull request is the change alone, onto main.

Trade-off: a pipeline the driver refuses fails its draw or dispatch (unresolved_resource, logged once) instead of CreatePipelineState, and the first draw with a new PSO pays its compile. That is why it is a switch.

Tests

  • New: d3d12_compute_lazy_pso, d3d12_draw_lazy_pso, d3d12_mesh_lazy_pso: the existing tests run with the switch on (CTest ENVIRONMENT).
  • Full ctest on Windows 11, MSVC, RTX 3070: default mode and with LEONIDA_LAZY_PSO=1 set for the whole run, 302/303 in both. The one failure, d3d12_execute_indirect_validation (5 count-buffer parity rows), fails the same way on unchanged main on this machine.
  • scripts/check_no_game_data.py on the changed files: clean.

Docs: a bullet in docs/d3d12_vulkan.md section 3.6.

AI-assisted (Claude Code); built and tested on the machine above.

**@⁠VibeClauding** on GitHub · 2026-11-24 06:39 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511) `VibeClauding:cont-lazy-pso` → `main` · +182 −37 · 4 files · 1 commits · open Claimed in #14 as `RT-LAZY-PSO`. ### What and why Opt-in `LEONIDA_LAZY_PSO=1` (off by default, nothing changes without it): - **Graphics PSOs** check the description, pick and read the translated shaders and make the layout as before, but the driver pipeline is built by the first draw that uses it, as `variant(0)`. `prepare_draw` takes the base pipeline from `variant(0)` when `pipeline` is null. - **Compute PSOs** compile at their first dispatch through a new `ComputePipeline::build` (both dispatch sites in `prepare`). The subgroup-size request is still decided, recorded (`pipeline_subgroup_requests`) and reported at creation in both modes. - **No kept shader modules** for stages the runtime does not edit (no f16 link, no D24 depth patch): `build()` makes each from the library's words for the pipeline it creates and destroys it after (`ModuleCleanup`). Edited stages keep their module as today. The retail title creates some 50,000 PSOs before its first frame and draws with far fewer. On a 16 GB RAM + 8 GB pagefile Windows machine (RTX 3070, driver 610.88), building them all eagerly ran the process out of commit between 50 and 300 s into the boot: the driver's copy of every module plus every pipeline. With deferred pipelines and no kept modules, private memory stayed at 11-17 GB and the title's own loading continued instead of stalling behind the compiles. Those measurements were on a forge-based branch with this change and others; this pull request is the change alone, onto `main`. Trade-off: a pipeline the driver refuses fails its draw or dispatch (`unresolved_resource`, logged once) instead of `CreatePipelineState`, and the first draw with a new PSO pays its compile. That is why it is a switch. ### Tests - New: `d3d12_compute_lazy_pso`, `d3d12_draw_lazy_pso`, `d3d12_mesh_lazy_pso`: the existing tests run with the switch on (CTest `ENVIRONMENT`). - Full `ctest` on Windows 11, MSVC, RTX 3070: default mode and with `LEONIDA_LAZY_PSO=1` set for the whole run, 302/303 in both. The one failure, `d3d12_execute_indirect_validation` (5 count-buffer parity rows), fails the same way on unchanged `main` on this machine. - `scripts/check_no_game_data.py` on the changed files: clean. Docs: a bullet in `docs/d3d12_vulkan.md` section 3.6. AI-assisted (Claude Code); built and tested on the machine above.
Graphics PSOs build their driver pipeline as variant(0) at the first draw; compute PSOs compile through
ComputePipeline::build at the first dispatch. A stage the runtime does not edit (no f16 link, no D24 depth patch)
keeps no VkShaderModule: build() makes one from the library's words per pipeline and destroys it after. The compute
subgroup request is still decided and recorded at creation in both modes. Off by default.

Tests: d3d12_compute_lazy_pso, d3d12_draw_lazy_pso, d3d12_mesh_lazy_pso (the existing tests with the switch on).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:05:00 +00:00
Author
Owner

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

Measured on the retail boot with an AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32029.2010), Windows 11 26300, MSVC 19.44 (CMake + Ninja), i7-14700K, own 1.0.2.1 copy, --trace --trace-d3d12, the executable's network blocked in the firewall. Base: #321 at e0d4fd2b8 with this PR's commit 88658f1b3 cherry-picked on top (two conflicts: CMakeLists.txt kept both test blocks; in d3d12_vulkan_device.cpp I took this PR's compute creation and moved #321's startup pipeline-cache checkpoint into compile_compute). Work folder from main's shaders stage plus old #7529/#7746/#8858, with native_hashes.txt. Counts only.

On AMD's Windows driver the eager PSOs are what holds the boot back, so this switch matters there:

run (same build, same work folder) time D3D12 calls pipeline states PresentX end
switch off, warm driver cache (my run on #321) 300 s 72,665 51,256 526 still running, pipeline creation to the last log lines
LEONIDA_LAZY_PSO=1 14 s 78,064 50,481 12 GPU address arena full (raise LEONIDA_ARENA_MB), then CreateCommittedResource3 fails and the title asserts
LEONIDA_LAZY_PSO=1, LEONIDA_ARENA_MB=2048 18 s 82,984 54,596 18 GetResourceAllocationInfo format not supported yet: 118, then the title's int3

So the ~51,000 PSOs that took the whole 300 s now go by in about 14 s, and the boot reaches later stops: the 256 MB default arena first, then format 118 in GetResourceAllocationInfo (the same kind of stop as format 65 / A8_UNORM in Tyrannys' run on #321). CreateLifetimeTracker unsupported grows from 10,241 to 26,076, which is the title getting further, not new failures.

One thing to watch when this meets a rectangle-list path (not a defect of this PR on main, which has no such path yet): with the switch on, 242 CreatePipelineState calls fail with ... cannot be drawn as a rectangle list: the vertex shader is not a SPIR-V module; with it off, none fail. In create_graphics the lazy branch clears stage.words (// a lazy stage reads its words again at build time) before #321's rect_list block reads vs_stage.words for rect_list_geometry, so that block gets an empty vector. Whichever lands second (this or the rect-list support) should read the VS words before they are cleared, or reload them there.

Not run: this PR's three new *_lazy_pso CTests (not built here), Intel (the UHD 770 stops at slot 41 before any of this on #321), and a memory curve.

AI-assisted (Claude Code).

**@⁠towade** on GitHub · 2026-11-24 08:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7126095200) Measured on the retail boot with an **AMD Radeon RX 9070 XT** (RDNA4, driver 32.0.32029.2010), Windows 11 26300, MSVC 19.44 (CMake + Ninja), i7-14700K, own 1.0.2.1 copy, `--trace --trace-d3d12`, the executable's network blocked in the firewall. Base: #321 at `e0d4fd2b8` with this PR's commit `88658f1b3` cherry-picked on top (two conflicts: `CMakeLists.txt` kept both test blocks; in `d3d12_vulkan_device.cpp` I took this PR's compute creation and moved #321's startup pipeline-cache checkpoint into `compile_compute`). Work folder from `main`'s shaders stage plus old #7529/#7746/#8858, with `native_hashes.txt`. Counts only. On AMD's Windows driver the eager PSOs are what holds the boot back, so this switch matters there: | run (same build, same work folder) | time | D3D12 calls | pipeline states | `PresentX` | end | |---|---|---:|---:|---:|---| | switch off, warm driver cache (my run on #321) | 300 s | 72,665 | 51,256 | 526 | still running, pipeline creation to the last log lines | | `LEONIDA_LAZY_PSO=1` | **14 s** | 78,064 | 50,481 | 12 | `GPU address arena full (raise LEONIDA_ARENA_MB)`, then `CreateCommittedResource3` fails and the title asserts | | `LEONIDA_LAZY_PSO=1`, `LEONIDA_ARENA_MB=2048` | 18 s | 82,984 | 54,596 | 18 | `GetResourceAllocationInfo format not supported yet: 118`, then the title's `int3` | So the ~51,000 PSOs that took the whole 300 s now go by in about 14 s, and the boot reaches later stops: the 256 MB default arena first, then format 118 in `GetResourceAllocationInfo` (the same kind of stop as format 65 / A8_UNORM in Tyrannys' run on #321). `CreateLifetimeTracker` `unsupported` grows from 10,241 to 26,076, which is the title getting further, not new failures. **One thing to watch when this meets a rectangle-list path** (not a defect of this PR on `main`, which has no such path yet): with the switch on, 242 `CreatePipelineState` calls fail with `... cannot be drawn as a rectangle list: the vertex shader is not a SPIR-V module`; with it off, none fail. In `create_graphics` the lazy branch clears `stage.words` (`// a lazy stage reads its words again at build time`) before #321's `rect_list` block reads `vs_stage.words` for `rect_list_geometry`, so that block gets an empty vector. Whichever lands second (this or the rect-list support) should read the VS words before they are cleared, or reload them there. Not run: this PR's three new `*_lazy_pso` CTests (not built here), Intel (the UHD 770 stops at slot 41 before any of this on #321), and a memory curve. AI-assisted (Claude Code).
Author
Owner

@⁠akimfomin on GitHub · 2026-11-24 11:52 UTC · original

I used PortBridge to independently replay towade’s rectangle-list finding and the order already used in LloydNicholson’s integration. At rectangle PR #207 head 21dc3889280d, the standalone rect_list_geometry helper produced 511 words from a 79-word synthetic vertex module. Releasing the words before the call reproduced the vertex shader is not a SPIR-V module. Calling the helper before releasing them produced the same 511 words byte for byte. The input and both generated modules passed spirv-val --target-env vulkan1.1.

The remaining integration check is d3d12_rect_list with LEONIDA_LAZY_PSO=0 and 1, including pixel readback. This replay covers the generator and word lifetime in isolation. AI-assisted with Codex.

**@⁠akimfomin** on GitHub · 2026-11-24 11:52 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7130673446) I used [PortBridge](https://github.com/akimfomin/PortBridge) to independently replay towade’s rectangle-list finding and the order already used in [LloydNicholson’s integration](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/511). At rectangle PR [#207](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/207) head `21dc3889280d`, the standalone `rect_list_geometry` helper produced 511 words from a 79-word synthetic vertex module. Releasing the words before the call reproduced `the vertex shader is not a SPIR-V module`. Calling the helper before releasing them produced the same 511 words byte for byte. The input and both generated modules passed `spirv-val --target-env vulkan1.1`. The remaining integration check is `d3d12_rect_list` with `LEONIDA_LAZY_PSO=0` and `1`, including pixel readback. This replay covers the generator and word lifetime in isolation. AI-assisted with Codex.
Author
Owner

@⁠BadgersMC on GitHub · 2026-11-24 12:15 UTC · original

Native Windows pixel-readback follow-up to the standalone reproduction. I merged #207 21dc3889 and #511 88658f1b onto main 21625bca locally. Both merges were clean.

State LEONIDA_LAZY_PSO=0 LEONIDA_LAZY_PSO=1
Combined PRs CreateGraphicsPipelineState fails with the vertex shader is not a SPIR-V module Same failure
With the vertex-word lifetime guard from LloydNicholson's integration Passes pixel readback Passes pixel readback

I applied only the guard that keeps vs_stage.words alive for rect_list_geometry. In both modes the fixture checked 4,096/4,096 pixels for the rectangle and each rotated right-angle case, 2,156 drawn pixels for the skewed triangle, and 4,096/4,096 exact pixels for the quad. d3d12_translated_draw and replay_quad_list also passed in both modes. No Vulkan validation errors in the two readback tests. The two hand-written test shaders passed spirv-val.

Windows 11 build 26100, RTX 3060 Ti driver 610.88, MSVC 19.44, LLVM 23.1.5, Khronos validation 1.4.369 with LEONIDA_VK_VALIDATION=1. AI-assisted synthetic tests, no game files.

**@⁠BadgersMC** on GitHub · 2026-11-24 12:15 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7131186456) Native Windows pixel-readback follow-up to the [standalone reproduction](https://git.gtahub.st/github/ubiquitarianism--leonida/pulls/511). I merged #207 `21dc3889` and #511 `88658f1b` onto `main` `21625bca` locally. Both merges were clean. | State | `LEONIDA_LAZY_PSO=0` | `LEONIDA_LAZY_PSO=1` | | --- | --- | --- | | Combined PRs | `CreateGraphicsPipelineState` fails with `the vertex shader is not a SPIR-V module` | Same failure | | With the vertex-word lifetime guard from [LloydNicholson's integration](https://github.com/ubiquitarianism/leonida/commit/b8572d92dba043bad5507a11931bcb4add7aa568) | Passes pixel readback | Passes pixel readback | I applied only the guard that keeps `vs_stage.words` alive for `rect_list_geometry`. In both modes the fixture checked 4,096/4,096 pixels for the rectangle and each rotated right-angle case, 2,156 drawn pixels for the skewed triangle, and 4,096/4,096 exact pixels for the quad. `d3d12_translated_draw` and `replay_quad_list` also passed in both modes. No Vulkan validation errors in the two readback tests. The two hand-written test shaders passed `spirv-val`. Windows 11 build 26100, RTX 3060 Ti driver 610.88, MSVC 19.44, LLVM 23.1.5, Khronos validation 1.4.369 with `LEONIDA_VK_VALIDATION=1`. AI-assisted synthetic tests, no game files.
Author
Owner

@⁠akimfomin on GitHub · 2026-11-24 12:17 UTC · original

@⁠towade Would you be willing to run the synthetic d3d12_rect_list check on your Windows/Vulkan setup once there is a combined revision for #511 and #207? Running it with LEONIDA_LAZY_PSO=0 and 1 on the same commit would show whether both paths return the expected pixels. PortBridge reproduced the word-lifetime failure you found and checked the corrected order in isolation. Shared test plan. Please note the exact combined commit and both outcomes if you have time.

**@⁠akimfomin** on GitHub · 2026-11-24 12:17 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7131226026) @⁠towade Would you be willing to run the synthetic `d3d12_rect_list` check on your Windows/Vulkan setup once there is a combined revision for #511 and #207? Running it with `LEONIDA_LAZY_PSO=0` and `1` on the same commit would show whether both paths return the expected pixels. [PortBridge](https://github.com/akimfomin/PortBridge) reproduced the word-lifetime failure you found and checked the corrected order in isolation. [Shared test plan](https://github.com/akimfomin/PortBridge/issues/9). Please note the exact combined commit and both outcomes if you have time.
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-24 14:11 UTC · original

Retail check of LEONIDA_LAZY_PSO=1 on a second NVIDIA machine (Windows 11, RTX 5070, driver 617.14, LEONIDA_D3D12=vulkan, own 1.0.2.1 copy, 200 s limit). Base stack: main 21625bca8 + #641 + #427 + #727 + #602 + #387 + #357 + #432, which reaches the frame loop without lazy PSOs (400,154 PresentX ok).

stack PresentX ok D3D12 calls stops at
base + this PR, LEONIDA_LAZY_PSO=1 10,016 447,408 the title's int3 after GetResourceAllocationInfo format not supported yet: 118 (#588)
+ #588 6,186 310,020 GPU address arena full, then slot 133 fails
+ #588 + #772, LEONIDA_ARENA_MB=4095 6,417 323,948 no emulation exists for wave64 (4 ps, 3 vs)

So on this machine the lazy path does what the description says and moves the first stop from the title's start-up to the depth format, then the arena, then wave64 graphics shaders; no device loss in any of the three runs, and no exception other than the title's own int3. I did not look at #207 together with this PR (DadaCap's report about the rectangle-list path); #207 alone on the base stack, without lazy PSOs, reached the loop (473,041 PresentX ok).

AI-assisted: yes (Claude Code, Sonnet 5.5)

**@⁠DesertGamer** on GitHub · 2026-11-24 14:11 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7133982696) Retail check of `LEONIDA_LAZY_PSO=1` on a second NVIDIA machine (Windows 11, RTX 5070, driver 617.14, `LEONIDA_D3D12=vulkan`, own 1.0.2.1 copy, 200 s limit). Base stack: `main` 21625bca8 + #641 + #427 + #727 + #602 + #387 + #357 + #432, which reaches the frame loop without lazy PSOs (400,154 `PresentX ok`). | stack | `PresentX ok` | D3D12 calls | stops at | |---|---:|---:|---| | base + this PR, `LEONIDA_LAZY_PSO=1` | 10,016 | 447,408 | the title's int3 after `GetResourceAllocationInfo format not supported yet: 118` (#588) | | + #588 | 6,186 | 310,020 | `GPU address arena full`, then slot 133 fails | | + #588 + #772, `LEONIDA_ARENA_MB=4095` | 6,417 | 323,948 | `no emulation exists for wave64` (4 ps, 3 vs) | So on this machine the lazy path does what the description says and moves the first stop from the title's start-up to the depth format, then the arena, then wave64 graphics shaders; no device loss in any of the three runs, and no exception other than the title's own int3. I did not look at #207 together with this PR (DadaCap's report about the rectangle-list path); #207 alone on the base stack, without lazy PSOs, reached the loop (473,041 `PresentX ok`). AI-assisted: yes (Claude Code, Sonnet 5.5)
Author
Owner

@⁠towade on GitHub · 2026-11-24 15:25 UTC · original

checked: 88658f1b3 on current main (d0da7dade), Windows 11 26300, MSVC 19.44 (CMake + Ninja), on an AMD Radeon RX 9070 XT (RDNA4, 32.0.32029.2010) and an Intel UHD 770 (Xe-LP, 32.0.101.7092), picked with LEONIDA_VK_DEVICE.

RX 9070 XT UHD 770
d3d12_compute_lazy_pso, d3d12_draw_lazy_pso pass pass
d3d12_mesh_lazy_pso pass skipped (no VK_EXT_mesh_shader)
full ctest, LEONIDA_LAZY_PSO=1 303 of 308 298 of 308
full ctest, unset 303 of 308, the same 5 failures 298 of 308, the same 10 failures

The failures are the same tests with and without the variable, so the lazy path adds none. On Intel they are sparse/tiled resources, DXR and some formats; on AMD they are vk_queue_query_sync, d3d12_texture_tiles, d3d12_execute_indirect_validation, d3d12_clear and d3d12_pipeline_library_host.

Retail, with this PR on main plus the open boot pull requests (ladder on #14), the lazy path gets the RX 9070 XT past the start-up compiles to 84,585 calls and 55,257 pipeline states, with no device loss.

For the rectangle-list interaction, see my note on #682: the same stage.words = {} ordering applies there.

AI-assisted (Claude Code).

**@⁠towade** on GitHub · 2026-11-24 15:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7136008783) checked: `88658f1b3` on current `main` (`d0da7dade`), Windows 11 26300, MSVC 19.44 (CMake + Ninja), on an **AMD Radeon RX 9070 XT** (RDNA4, 32.0.32029.2010) and an **Intel UHD 770** (Xe-LP, 32.0.101.7092), picked with `LEONIDA_VK_DEVICE`. | | RX 9070 XT | UHD 770 | |---|---|---| | `d3d12_compute_lazy_pso`, `d3d12_draw_lazy_pso` | pass | pass | | `d3d12_mesh_lazy_pso` | pass | skipped (no `VK_EXT_mesh_shader`) | | full `ctest`, `LEONIDA_LAZY_PSO=1` | 303 of 308 | 298 of 308 | | full `ctest`, unset | 303 of 308, **the same 5 failures** | 298 of 308, **the same 10 failures** | The failures are the same tests with and without the variable, so the lazy path adds none. On Intel they are sparse/tiled resources, DXR and some formats; on AMD they are `vk_queue_query_sync`, `d3d12_texture_tiles`, `d3d12_execute_indirect_validation`, `d3d12_clear` and `d3d12_pipeline_library_host`. Retail, with this PR on `main` plus the open boot pull requests (ladder on #14), the lazy path gets the RX 9070 XT past the start-up compiles to 84,585 calls and 55,257 pipeline states, with no device loss. For the rectangle-list interaction, see my note on #682: the same `stage.words = {}` ordering applies there. AI-assisted (Claude Code).
Author
Owner

@⁠Dezmonius on GitHub · 2026-11-24 15:31 UTC · original

Independent eager/lazy A/B on Windows 10 22H2 (19045), RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, Vulkan with Khronos validation 1.4.369. Tested the same binaries in separate processes with LEONIDA_LAZY_PSO=0 and =1.

  • On exact #511 head 88658f1b3, compute, raster draw, indirect dispatch count and pipeline library passed in both modes. The mesh test hit VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076 in both modes. Without validation the mesh test matched all 4,096 pixels in both modes.
  • In a second local build, I applied the already-merged #540 diff (main merge 3bb46d65) to the same #511 head. All five tests passed with validation enabled in both modes, including all 4,096 pixels in the draw and mesh readbacks and eight WARP/Vulkan indirect dispatch comparisons per mode.

Synthetic results only. This run did not measure retail startup or memory consumption. No game files. AI-assisted (Codex).

**@⁠Dezmonius** on GitHub · 2026-11-24 15:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7136166066) Independent eager/lazy A/B on Windows 10 22H2 (19045), RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, Vulkan with Khronos validation 1.4.369. Tested the same binaries in separate processes with `LEONIDA_LAZY_PSO=0` and `=1`. - On exact #511 head `88658f1b3`, compute, raster draw, indirect dispatch count and pipeline library passed in both modes. The mesh test hit `VUID-vkCmdDrawMeshTasksEXT-pipelineStatistics-07076` in both modes. Without validation the mesh test matched all 4,096 pixels in both modes. - In a second local build, I applied the already-merged #540 diff (main merge `3bb46d65`) to the same #511 head. All five tests passed with validation enabled in both modes, including all 4,096 pixels in the draw and mesh readbacks and eight WARP/Vulkan indirect dispatch comparisons per mode. Synthetic results only. This run did not measure retail startup or memory consumption. No game files. AI-assisted (Codex).
Author
Owner

@⁠Snooozs on GitHub · 2026-11-24 17:01 UTC · original

Independent check. Windows 10 Pro 22H2 (19045), VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0, LEONIDA_VK_VALIDATION=1, merged onto main 82a2aabcc without conflicts, test targets rebuilt; RTX 5060 Ti (621.01) and a Ryzen 7 7700 iGPU (1002:164E, AMD 31.0.22044.1). On the iGPU the pipeline tests fail on plain main too (128 push-constant bytes), so they say nothing there.

RTX 5060 Ti, each without and with LEONIDA_LAZY_PSO=1: d3d12_compute_test, d3d12_draw_test and d3d12_mesh_test all exit 0 with 0 VUID lines, as on main.

Synthetic tests only, no game files. AI-assisted (Claude Code): I read the diff and ran the tests on that machine.

**@⁠Snooozs** on GitHub · 2026-11-24 17:01 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7138578977) Independent check. Windows 10 Pro 22H2 (19045), VS 2022 RelWithDebInfo, Vulkan SDK 1.4.363.0, `LEONIDA_VK_VALIDATION=1`, merged onto `main` 82a2aabcc without conflicts, test targets rebuilt; RTX 5060 Ti (621.01) and a Ryzen 7 7700 iGPU (1002:164E, AMD 31.0.22044.1). On the iGPU the pipeline tests fail on plain `main` too (128 push-constant bytes), so they say nothing there. RTX 5060 Ti, each without and with `LEONIDA_LAZY_PSO=1`: `d3d12_compute_test`, `d3d12_draw_test` and `d3d12_mesh_test` all exit 0 with 0 VUID lines, as on `main`. Synthetic tests only, no game files. AI-assisted (Claude Code): I read the diff and ran the tests on that machine.
Author
Owner

@⁠akimfomin on GitHub · 2026-11-24 17:50 UTC · original

PortBridge connected this PR to SceneGate VI's changing-color readback control. I applied that method to the offscreen Vulkan fixture at 88658f1b3fcdca2231358c18d09253a213dc8533.

On RTX 4070 Ti SUPER, Windows 11 build 28000, driver 617.14, both LEONIDA_LAZY_PSO=0 and =1 passed 3/3 runs. Every run checked 32 frames × 4,096 RGBA8 pixels. Omitting draw 8 returned 44 at frame 7, pixel (0,0), in 3/3 controls per mode. The fixture also passed both modes with the new check disabled. The local LLVM-MinGW build used an aggregate-return ABI adapter and an abort-on-use swapchain stub for the offscreen path.

The test-only patch and reproduction guide use the existing d3d12_draw_test target. An independent AMD run with the standard build would help confirm the result. Synthetic inputs. AI-assisted.

**@⁠akimfomin** on GitHub · 2026-11-24 17:50 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/511#issuecomment-7139773889) [PortBridge](https://github.com/akimfomin/PortBridge) connected this PR to SceneGate VI's changing-color readback control. I applied that method to the offscreen Vulkan fixture at `88658f1b3fcdca2231358c18d09253a213dc8533`. On RTX 4070 Ti SUPER, Windows 11 build 28000, driver 617.14, both `LEONIDA_LAZY_PSO=0` and `=1` passed 3/3 runs. Every run checked 32 frames × 4,096 RGBA8 pixels. Omitting draw 8 returned 44 at frame 7, pixel (0,0), in 3/3 controls per mode. The fixture also passed both modes with the new check disabled. The local LLVM-MinGW build used an aggregate-return ABI adapter and an abort-on-use swapchain stub for the offscreen path. The [test-only patch and reproduction guide](https://github.com/akimfomin/PortBridge/tree/main/contrib/continued-repeated-draw) use the existing `d3d12_draw_test` target. An independent AMD run with the standard build would help confirm the result. Synthetic inputs. AI-assisted.
This pull request has changes conflicting with the target branch.
  • runtime/CMakeLists.txt
  • runtime/shims/d3d12_vulkan_device.cpp
  • runtime/src/vulkan_replay.h
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/511/head:github-bot/gh-511'
git switch 'github-bot/gh-511'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-511'
git switch 'github-bot/gh-511'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-511'
git switch 'github-bot/gh-511'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-511'
git switch 'main'
git merge --squash 'github-bot/gh-511'
git switch 'main'
git merge --ff-only 'github-bot/gh-511'
git switch 'main'
git merge 'github-bot/gh-511'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.