OLD-2402: Runtime: D3D12 PSOs bind the --pc-tail-ubo set-1 block for 128-byte push-constant devices #767

Closed
whoalin1 wants to merge 1 commit from upstream-pr/767 into main
whoalin1 commented 2026-11-24 13:35:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-24T13:35:36Z.


Restores my open PR from the original repository (OLD-2402), rebased onto current main (2d73c242f).

Claim: https://github.com/ProjectLeonida/mandy/issues/14#issuecomment-7133003627

Summary

A Vulkan device whose maxPushConstantsSize is 128 bytes (AMD Windows driver on RDNA2 iGPUs, some Intel Arc drivers) cannot hold the 144-byte ShaderUserData push-constant block, so previously every D3D12 PSO was refused there with E_NOTIMPL.

With --pc-tail-ubo (already merged in main), translated shaders keep s0..s31 in 128 push-constant bytes and move the 16-byte tail (heap base, code base) to a uniform block at set 1, binding 0 when a stage reads it. This PR wires that path through the D3D12 → Vulkan layer:

  • runtime/src/shader_library.h: ShaderEntry parses pc_tail.bytes into pc_tail_bytes (covered by shader_library_test).
  • runtime/src/vulkan_replay.h: ComputePipeline and GraphicsPipeline carry push_bytes, tail_set, and tail_offset; detail::bind_user_data binds set 0 (if present), set 1 with dynamic offset (if present), and pushes push_bytes at all three push sites (ExecuteIndirect, Dispatch, Draw).
  • runtime/shims/d3d12_vulkan_device.cpp: DeviceState::pc_tail creates one UNIFORM_BUFFER_DYNAMIC descriptor over the arena (range 16) plus an empty set-0 layout once per device. PipelineState::user_data_layout sizes the push-constant range from each stage's push_constant_bytes / pc_tail_bytes (including VS+GS+PS), adds set 1 when any stage has pc_tail, writes the 16-byte tail once into the arena, and releases it on destruction. 144-byte shaders remain refused on <144-byte devices with a log pointing to --pc-tail-ubo.
  • runtime/test/d3d12_compute_test.cpp & runtime/test/d3d12_draw_test.cpp: verify 144-byte refusal and --pc-tail-ubo dispatch/draw (including VS without pc_tail + PS with set-1 tail) on both simulated 128-byte devices and real 128-byte GPUs, skipping the 144-byte passes on real 128-byte hardware.
  • docs/d3d12_vulkan.md & runtime/shims/d3d12_com.h: documentation updates.

Verification (rebased on 2d73c242f, LEONIDA_VK_VALIDATION=1)

  • CPU: shader_library_test — pass (rc=0)
  • NVIDIA GeForce RTX 4070 SUPER (Windows 11, driver 610.88, 256B push constants):
    • d3d12_compute_test (rc=0, 0 validation errors)
    • d3d12_draw_test (rc=0, 0 validation errors)
    • d3d12_bundle_test (rc=0, 0 validation errors)
    • d3d12_geometry_test (rc=0, 0 validation errors)
    • d3d12_mesh_test (LEONIDA_VK_VALIDATION=0, rc=0; VUID-07076 under validation is tracked separately in #506)
  • AMD Radeon(TM) Graphics (Ryzen 5 7600 RDNA2 iGPU, Windows 11, AMD driver 24.10.24, real 128B maxPushConstantsSize):
    • d3d12_compute_test (rc=0, 0 validation errors): --pc-tail-ubo 64/64 elements matched on simulated 128B device and real 128B GPU; 144B passes cleanly skipped
    • d3d12_draw_test (rc=0, 0 validation errors): --pc-tail-ubo VS+PS (VS without pc_tail, PS with set-1 tail) 4096/4096 pixels matched on simulated 128B device and real 128B GPU; 144B passes cleanly skipped

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5473175753 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-24T13:35:36Z. --- Restores my open PR from the original repository (OLD-2402), rebased onto current `main` (`2d73c242f`). Claim: https://github.com/ProjectLeonida/mandy/issues/14#issuecomment-7133003627 ### Summary A Vulkan device whose `maxPushConstantsSize` is 128 bytes (AMD Windows driver on RDNA2 iGPUs, some Intel Arc drivers) cannot hold the 144-byte `ShaderUserData` push-constant block, so previously every D3D12 PSO was refused there with `E_NOTIMPL`. With `--pc-tail-ubo` (already merged in `main`), translated shaders keep `s0..s31` in 128 push-constant bytes and move the 16-byte tail (heap base, code base) to a uniform block at set 1, binding 0 when a stage reads it. This PR wires that path through the D3D12 → Vulkan layer: - `runtime/src/shader_library.h`: `ShaderEntry` parses `pc_tail.bytes` into `pc_tail_bytes` (covered by `shader_library_test`). - `runtime/src/vulkan_replay.h`: `ComputePipeline` and `GraphicsPipeline` carry `push_bytes`, `tail_set`, and `tail_offset`; `detail::bind_user_data` binds set 0 (if present), set 1 with dynamic offset (if present), and pushes `push_bytes` at all three push sites (`ExecuteIndirect`, `Dispatch`, `Draw`). - `runtime/shims/d3d12_vulkan_device.cpp`: `DeviceState::pc_tail` creates one `UNIFORM_BUFFER_DYNAMIC` descriptor over the arena (range 16) plus an empty set-0 layout once per device. `PipelineState::user_data_layout` sizes the push-constant range from each stage's `push_constant_bytes` / `pc_tail_bytes` (including VS+GS+PS), adds set 1 when any stage has `pc_tail`, writes the 16-byte tail once into the arena, and releases it on destruction. 144-byte shaders remain refused on `<144`-byte devices with a log pointing to `--pc-tail-ubo`. - `runtime/test/d3d12_compute_test.cpp` & `runtime/test/d3d12_draw_test.cpp`: verify 144-byte refusal and `--pc-tail-ubo` dispatch/draw (including VS without `pc_tail` + PS with set-1 tail) on both simulated 128-byte devices and real 128-byte GPUs, skipping the 144-byte passes on real 128-byte hardware. - `docs/d3d12_vulkan.md` & `runtime/shims/d3d12_com.h`: documentation updates. ### Verification (rebased on `2d73c242f`, `LEONIDA_VK_VALIDATION=1`) - **CPU**: `shader_library_test` — pass (`rc=0`) - **NVIDIA GeForce RTX 4070 SUPER (Windows 11, driver 610.88, 256B push constants)**: - `d3d12_compute_test` (`rc=0`, 0 validation errors) - `d3d12_draw_test` (`rc=0`, 0 validation errors) - `d3d12_bundle_test` (`rc=0`, 0 validation errors) - `d3d12_geometry_test` (`rc=0`, 0 validation errors) - `d3d12_mesh_test` (`LEONIDA_VK_VALIDATION=0`, `rc=0`; `VUID-07076` under validation is tracked separately in #506) - **AMD Radeon(TM) Graphics (Ryzen 5 7600 RDNA2 iGPU, Windows 11, AMD driver 24.10.24, real 128B `maxPushConstantsSize`)**: - `d3d12_compute_test` (`rc=0`, 0 validation errors): `--pc-tail-ubo` 64/64 elements matched on simulated 128B device and real 128B GPU; 144B passes cleanly skipped - `d3d12_draw_test` (`rc=0`, 0 validation errors): `--pc-tail-ubo` VS+PS (VS without `pc_tail`, PS with set-1 tail) 4096/4096 pixels matched on simulated 128B device and real 128B GPU; 144B passes cleanly skipped AI-assisted (Gemini 4 Neon).
whoalin1 commented 2026-11-25 20:09:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T20:09:18Z.


Rebased cleanly onto current main (db1a22d29) as a07b677bf to refresh the stale CI baseline; no conflicts. The branch remains the single pc-tail runtime/PSO binding change. AI-assisted with Devin.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7173263502 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/767#issuecomment-7173263502). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T20:09:18Z. --- Rebased cleanly onto current main (`db1a22d29`) as `a07b677bf` to refresh the stale CI baseline; no conflicts. The branch remains the single pc-tail runtime/PSO binding change. AI-assisted with Devin.
whoalin1 commented 2026-11-25 21:07:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T21:07:35Z.


Local dual-GPU verification of a07b677bf (rebased onto current main), full MSVC/Ninja runtime build 986/986 clean, then the pc-tail test executables run directly with LEONIDA_VK_VALIDATION=1 on both devices:

AMD Radeon(TM) Graphics — the 128-byte push-constant iGPU this PR is for (VK_LOADER_DRIVERS_SELECT=*amd-vulkan*):

  • d3d12_compute_test rc=0, 0 VUIDs — --pc-tail-ubo: a 128-byte device built the tail PSO and 64/64 elements matched there and on this GPU; the 144-byte PSO/dispatch/CBV/SRV checks are skipped honestly (this GPU reports 128 push-constant bytes (< 144))
  • d3d12_draw_test rc=0, 0 VUIDs — --pc-tail-ubo graphics: a 128-byte device built the tail VS+PS PSO (VS without pc_tail, PS with set-1 tail) and 4096/4096 pixels matched; 144-byte graphics passes skipped honestly
  • shader_library_test rc=0

NVIDIA GeForce RTX 4070 SUPER (VK_LOADER_DRIVERS_SELECT=*nv-vk*):

  • d3d12_compute_test rc=0, 0 VUIDs — same tail-PSO 64/64 element match (the 128-byte simulated device cross-check plus this GPU)
  • d3d12_draw_test rc=0, 0 VUIDs — 4096/4096 pixels matched
  • shader_library_test rc=0

The set-1 uniform block is bound and read correctly by both drivers' shader pipelines; no validation noise on either. AI-assisted (Devin).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7174646317 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/767#issuecomment-7174646317). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T21:07:35Z. --- Local dual-GPU verification of `a07b677bf` (rebased onto current main), full MSVC/Ninja runtime build 986/986 clean, then the pc-tail test executables run directly with `LEONIDA_VK_VALIDATION=1` on both devices: **AMD Radeon(TM) Graphics — the 128-byte push-constant iGPU this PR is for** (`VK_LOADER_DRIVERS_SELECT=*amd-vulkan*`): - `d3d12_compute_test` rc=0, 0 VUIDs — `--pc-tail-ubo: a 128-byte device built the tail PSO and 64/64 elements matched there and on this GPU`; the 144-byte PSO/dispatch/CBV/SRV checks are skipped honestly (`this GPU reports 128 push-constant bytes (< 144)`) - `d3d12_draw_test` rc=0, 0 VUIDs — `--pc-tail-ubo graphics: a 128-byte device built the tail VS+PS PSO (VS without pc_tail, PS with set-1 tail) and 4096/4096 pixels matched`; 144-byte graphics passes skipped honestly - `shader_library_test` rc=0 **NVIDIA GeForce RTX 4070 SUPER** (`VK_LOADER_DRIVERS_SELECT=*nv-vk*`): - `d3d12_compute_test` rc=0, 0 VUIDs — same tail-PSO 64/64 element match (the 128-byte simulated device cross-check plus this GPU) - `d3d12_draw_test` rc=0, 0 VUIDs — 4096/4096 pixels matched - `shader_library_test` rc=0 The set-1 uniform block is bound and read correctly by both drivers' shader pipelines; no validation noise on either. AI-assisted (Devin).
ecox982745 commented 2026-11-28 09:33:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T09:33:58Z.


Tested the rectangle-list variant on f68daac1950fa680ada0fd62c860e67eaf99d6b3 after the AMD report about slot 512. On Windows with an RTX 4090 (616.64), the set-1 tail worked through the dynamically generated rectangle geometry stage.

I extended the synthetic d3d12_draw_test harness locally. The PSO used triangle topology type in every case. The triangle control submitted six indices with IA triangle-list topology. The rectangle case submitted just the first three indices with IA topology 17, so the generated fourth corner was needed to fill the expected quadrant. The pixel shader read the heap base from set 1, binding 0 to fetch the tint. The control produced a red quadrant and the rectangle drew a green quadrant on the same blue background.

Push-constant limit reported to the runtime Triangle control Rectangle variant
Native 256 bytes 4,096/4,096 pixels matched 4,096/4,096 pixels matched
128 bytes via the harness override on the same card 4,096/4,096 4,096/4,096

Two consecutive runs produced the same readbacks with Vulkan validation enabled and zero validation errors. The runtime was built from the PR head without changes. For the vertex fixture I used the translator’s standalone BuiltIn Position form. The stock GLSL test fixture places Position in an interface block, which the rectangle generator at this revision rejected before submission. Both final input modules passed spirv-val for Vulkan 1.3 with scalar block layout.

This verifies the synthetic rectangle path on NVIDIA. The outstanding game comparison is the reported AMD configuration with the tail option enabled in both arms and this runtime change applied in one. AI-assisted with OpenAI Codex (GPT-6).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237322316 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7237322316). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-28T09:33:58Z. --- Tested the rectangle-list variant on `f68daac1950fa680ada0fd62c860e67eaf99d6b3` after the [AMD report about slot 512](https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7237165958). On Windows with an RTX 4090 (616.64), the set-1 tail worked through the dynamically generated rectangle geometry stage. I extended the synthetic `d3d12_draw_test` harness locally. The PSO used triangle topology type in every case. The triangle control submitted six indices with IA triangle-list topology. The rectangle case submitted just the first three indices with IA topology 17, so the generated fourth corner was needed to fill the expected quadrant. The pixel shader read the heap base from set 1, binding 0 to fetch the tint. The control produced a red quadrant and the rectangle drew a green quadrant on the same blue background. | Push-constant limit reported to the runtime | Triangle control | Rectangle variant | | --- | --- | --- | | Native 256 bytes | 4,096/4,096 pixels matched | 4,096/4,096 pixels matched | | 128 bytes via the harness override on the same card | 4,096/4,096 | 4,096/4,096 | Two consecutive runs produced the same readbacks with Vulkan validation enabled and zero validation errors. The runtime was built from the PR head without changes. For the vertex fixture I used the translator’s standalone `BuiltIn Position` form. The stock GLSL test fixture places `Position` in an interface block, which the rectangle generator at this revision rejected before submission. Both final input modules passed `spirv-val` for Vulkan 1.3 with scalar block layout. This verifies the synthetic rectangle path on NVIDIA. The outstanding game comparison is the [reported AMD configuration](https://github.com/ProjectLeonida/mandy/issues/2464#issuecomment-7237165210) with the tail option enabled in both arms and this runtime change applied in one. AI-assisted with OpenAI Codex (GPT-6).
zmasi commented 2026-11-28 09:38:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T09:38:07Z.


Code-audit note at head f68daac1950fa680ada0fd62c860e67eaf99d6b3 (while @ecox982745 runs VERIFY-767-RECTANGLE-PC-TAIL following @timbot103's #1608#issuecomment-7237165958 finding — note PipelineState's graphics_.layout in #767 already propagates to lazy variant(512, "draw") rectangle-stage PSOs via info.layout = graphics_.layout):

Two narrow edge cases in runtime/shims/d3d12_vulkan_device.cpp worth folding into this PR so all --pc-tail-ubo paths agree:

  1. gta6rt --precompile-pipelines (BuildHost::open / unbuildable / build, around lines 23475-23531 on main 3ca0707dd):
    • BuildHost::open() still aborts early when state.info.max_push_constants_size < sizeof(leonida::ShaderUserData) (144), so --precompile-pipelines exits 1 immediately on 128-byte GPUs even when the shader library was translated with --pc-tail-ubo.
    • BuildHost::open() also creates only 144-byte plain_ / with_set0_ compute layouts without set 1, so BuildHost::build() will fail vkCreateComputePipelines (VUID-VkComputePipelineCreateInfo-layout-07988) on --pc-tail-ubo compute entries with pc_tail_bytes == 16 (and precompile 144-byte push-constant layouts instead of 128-byte layouts for --pc-tail-ubo entries without pc_tail). Since create_vulkan_device_standalone in BuildHost::open() already runs #767's create_pc_tail(), BuildHost can reuse state.pc_tail.empty / state.pc_tail.layout and mirror user_data_layout's (128|144, bindless, tail) layout selection per compute entry.
  2. LEONIDA_STUB_PIPELINES on 128-byte GPUs (PipelineState::stub_entry() + user_data_layout):
    • stub_entry() leaves push_constant_bytes = 0 and pc_tail_bytes = 0 (the built-in stub VS/PS stages read no push constants), which user_data_layout currently defaults to need = kFull (144), causing stubbed graphics PSOs to fail with E_NOTIMPL when maxPushConstantsSize < 144. Setting e.push_constant_bytes = offsetof(leonida::ShaderUserData, heap_base) (128) on stub_entry() (or sizing 0-byte stub entries to kShort when push_constants_need_fallback is set) keeps stub PSOs buildable on 128-byte devices.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237367134 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7237367134). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T09:38:07Z. --- Code-audit note at head `f68daac1950fa680ada0fd62c860e67eaf99d6b3` (while `@ecox982745` runs `VERIFY-767-RECTANGLE-PC-TAIL` following `@timbot103`'s `#1608#issuecomment-7237165958` finding — note `PipelineState`'s `graphics_.layout` in `#767` already propagates to lazy `variant(512, "draw")` rectangle-stage PSOs via `info.layout = graphics_.layout`): Two narrow edge cases in `runtime/shims/d3d12_vulkan_device.cpp` worth folding into this PR so all `--pc-tail-ubo` paths agree: 1. **`gta6rt --precompile-pipelines` (`BuildHost::open` / `unbuildable` / `build`, around lines `23475-23531` on `main` `3ca0707dd`)**: - `BuildHost::open()` still aborts early when `state.info.max_push_constants_size < sizeof(leonida::ShaderUserData)` (`144`), so `--precompile-pipelines` exits `1` immediately on 128-byte GPUs even when the shader library was translated with `--pc-tail-ubo`. - `BuildHost::open()` also creates only 144-byte `plain_` / `with_set0_` compute layouts without set 1, so `BuildHost::build()` will fail `vkCreateComputePipelines` (`VUID-VkComputePipelineCreateInfo-layout-07988`) on `--pc-tail-ubo` compute entries with `pc_tail_bytes == 16` (and precompile 144-byte push-constant layouts instead of 128-byte layouts for `--pc-tail-ubo` entries without `pc_tail`). Since `create_vulkan_device_standalone` in `BuildHost::open()` already runs `#767`'s `create_pc_tail()`, `BuildHost` can reuse `state.pc_tail.empty` / `state.pc_tail.layout` and mirror `user_data_layout`'s `(128|144, bindless, tail)` layout selection per compute entry. 2. **`LEONIDA_STUB_PIPELINES` on 128-byte GPUs (`PipelineState::stub_entry()` + `user_data_layout`)**: - `stub_entry()` leaves `push_constant_bytes = 0` and `pc_tail_bytes = 0` (the built-in stub VS/PS stages read no push constants), which `user_data_layout` currently defaults to `need = kFull` (`144`), causing stubbed graphics PSOs to fail with `E_NOTIMPL` when `maxPushConstantsSize < 144`. Setting `e.push_constant_bytes = offsetof(leonida::ShaderUserData, heap_base)` (`128`) on `stub_entry()` (or sizing `0`-byte stub entries to `kShort` when `push_constants_need_fallback` is set) keeps stub PSOs buildable on 128-byte devices. AI-assisted.
whoalin1 commented 2026-11-28 10:01:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-28T10:01:27Z.


Rebased pc-tail-runtime onto main (3ca0707dd) and folded both audit items plus the detail::first_use guard into head c1c6044775eeaed013fc4840c675301f0e8f2896:

  1. BuildHost (gta6rt --precompile-pipelines / --compile-server, runtime/shims/d3d12_vulkan_device.cpp):
    • Extracted shared UserDataLayout, resolve_user_data_layout(), and create_user_data_layout() so PipelineState, build_compute_pipeline(), and BuildHost share the same sizing and descriptor-set rules.
    • BuildHost::open() stays open on 128-byte devices instead of aborting when maxPushConstantsSize < 144, and creates the eligible [tail][bindless][128|144] compute layouts up front (skipping 144-byte layouts when limit < 144 so VUID-VkPushConstantRange-size-00298 is not triggered).
    • BuildHost::unbuildable() validates resolve_user_data_layout() / layout_for() and refuses non---pc-tail-ubo entries with needs 144 push-constant bytes on <144-byte GPUs while accepting --pc-tail-ubo entries (push_constant_bytes = 128, optional 16-byte set-1 pc_tail).
    • build_compute_pipeline() and journal_name_context() incorporate user.push_bytes and user.tail / pc_tail.set into the journal/index keys (keeping existing 144-byte hashes byte-identical).
  2. LEONIDA_STUB_PIPELINES (PipelineState::stub_entry(), runtime/shims/d3d12_vulkan_device.cpp):
    • Sets push_constant_bytes = offsetof(leonida::ShaderUserData, heap_base) (128), so stubbed graphics PSOs build and draw cleanly on 128-byte devices too.
  3. detail::first_use (runtime/src/vulkan_replay.h):
    • Checks (!(pipeline.bindless_set || pipeline.tail_set) || vk.bind_descriptor_sets) consistently with dispatch and indirect_dispatch.
  4. Tests & docs:
    • runtime/test/d3d12_stub_draw_test.cpp: removed the <144-byte skip so all stub draw cases run natively on 128-byte GPUs, and added a simulated 128-byte LEONIDA_STUB_PIPELINES=color draw check on >=144-byte GPUs.
    • Added runtime/test/check_precompile_pc_tail.cmake (precompile_pc_tail) verifying gta6rt --precompile-pipelines with --pc-tail-ubo alongside a 144-byte entry on both GPUs; updated runtime/test/check_precompile_skip_list.cmake to skip cleanly when only 144-byte test shaders are unbuildable (needs 144 push-constant bytes); updated docs/d3d12_vulkan.md.

Verification (clean build 94/94, VK_LOADER_LAYERS_DISABLE=~implicit~, LEONIDA_VK_VALIDATION=1 with VK_LAYER_KHRONOS_validation 1.4.363)

  • NVIDIA GeForce RTX 4070 SUPER (driver NVIDIA 610.88, Vulkan 1.4.341, maxPushConstantsSize: 256 bytes): 9/9 matched CTest targets passed (shader_library, d3d12_vulkan_device, d3d12_compute_journal, d3d12_compute, d3d12_draw, d3d12_stub_pipelines, d3d12_stub_draw including simulated 128-byte stub draw, precompile_skip_list, precompile_pc_tail building/journaling 2/2 entries and hitting 2 journaled on rerun), 0 validation errors.
  • AMD Radeon(TM) Graphics (RDNA2 iGPU 0x164e, driver AMD proprietary driver 24.10.24, Vulkan 1.3.280, maxPushConstantsSize: 128 bytes): 7 passed + 2 skipped (d3d12_compute_journal, precompile_skip_list — both use 144-byte-only test fixtures) out of 9 (ctest exit 0), 0 validation errors; d3d12_stub_draw ran natively and passed (0.18 s); precompile_pc_tail passed (0.35 s, leaving out precompile_full as needs 144 push-constant bytes, compiling & journaling precompile_tail, and hitting 1 journaled already on rerun).
  • Repo checks: unittest on tests/test_ctest_registration.py + tests/test_text_write_line_endings.py (Ran 10 tests ... OK) and scripts/check_no_game_data.py on all 7 modified/added files passed (exit 0).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7237618631 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7237618631). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-28T10:01:27Z. --- Rebased `pc-tail-runtime` onto `main` (`3ca0707dd`) and folded both audit items plus the `detail::first_use` guard into head `c1c6044775eeaed013fc4840c675301f0e8f2896`: 1. **`BuildHost` (`gta6rt --precompile-pipelines` / `--compile-server`, `runtime/shims/d3d12_vulkan_device.cpp`)**: - Extracted shared `UserDataLayout`, `resolve_user_data_layout()`, and `create_user_data_layout()` so `PipelineState`, `build_compute_pipeline()`, and `BuildHost` share the same sizing and descriptor-set rules. - `BuildHost::open()` stays open on 128-byte devices instead of aborting when `maxPushConstantsSize < 144`, and creates the eligible `[tail][bindless][128|144]` compute layouts up front (skipping 144-byte layouts when `limit < 144` so `VUID-VkPushConstantRange-size-00298` is not triggered). - `BuildHost::unbuildable()` validates `resolve_user_data_layout()` / `layout_for()` and refuses non-`--pc-tail-ubo` entries with `needs 144 push-constant bytes` on `<144`-byte GPUs while accepting `--pc-tail-ubo` entries (`push_constant_bytes = 128`, optional 16-byte set-1 `pc_tail`). - `build_compute_pipeline()` and `journal_name_context()` incorporate `user.push_bytes` and `user.tail` / `pc_tail.set` into the journal/index keys (keeping existing 144-byte hashes byte-identical). 2. **`LEONIDA_STUB_PIPELINES` (`PipelineState::stub_entry()`, `runtime/shims/d3d12_vulkan_device.cpp`)**: - Sets `push_constant_bytes = offsetof(leonida::ShaderUserData, heap_base)` (`128`), so stubbed graphics PSOs build and draw cleanly on 128-byte devices too. 3. **`detail::first_use` (`runtime/src/vulkan_replay.h`)**: - Checks `(!(pipeline.bindless_set || pipeline.tail_set) || vk.bind_descriptor_sets)` consistently with `dispatch` and `indirect_dispatch`. 4. **Tests & docs**: - `runtime/test/d3d12_stub_draw_test.cpp`: removed the `<144`-byte skip so all stub draw cases run natively on 128-byte GPUs, and added a simulated 128-byte `LEONIDA_STUB_PIPELINES=color` draw check on `>=144`-byte GPUs. - Added `runtime/test/check_precompile_pc_tail.cmake` (`precompile_pc_tail`) verifying `gta6rt --precompile-pipelines` with `--pc-tail-ubo` alongside a 144-byte entry on both GPUs; updated `runtime/test/check_precompile_skip_list.cmake` to skip cleanly when only 144-byte test shaders are unbuildable (`needs 144 push-constant bytes`); updated `docs/d3d12_vulkan.md`. ### Verification (clean build `94/94`, `VK_LOADER_LAYERS_DISABLE=~implicit~`, `LEONIDA_VK_VALIDATION=1` with `VK_LAYER_KHRONOS_validation` `1.4.363`) - **NVIDIA GeForce RTX 4070 SUPER** (driver `NVIDIA 610.88`, Vulkan `1.4.341`, `maxPushConstantsSize: 256 bytes`): `9/9` matched CTest targets passed (`shader_library`, `d3d12_vulkan_device`, `d3d12_compute_journal`, `d3d12_compute`, `d3d12_draw`, `d3d12_stub_pipelines`, `d3d12_stub_draw` including simulated 128-byte stub draw, `precompile_skip_list`, `precompile_pc_tail` building/journaling `2/2` entries and hitting `2` journaled on rerun), `0` validation errors. - **AMD Radeon(TM) Graphics** (RDNA2 iGPU `0x164e`, driver `AMD proprietary driver 24.10.24`, Vulkan `1.3.280`, `maxPushConstantsSize: 128 bytes`): `7` passed + `2` skipped (`d3d12_compute_journal`, `precompile_skip_list` — both use 144-byte-only test fixtures) out of `9` (`ctest` exit `0`), `0` validation errors; `d3d12_stub_draw` ran natively and passed (`0.18 s`); `precompile_pc_tail` passed (`0.35 s`, leaving out `precompile_full` as `needs 144 push-constant bytes`, compiling & journaling `precompile_tail`, and hitting `1 journaled already` on rerun). - **Repo checks**: `unittest` on `tests/test_ctest_registration.py` + `tests/test_text_write_line_endings.py` (`Ran 10 tests ... OK`) and `scripts/check_no_game_data.py` on all 7 modified/added files passed (`exit 0`). AI-assisted.
whoalin1 commented 2026-11-28 11:55:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-28T11:55:17Z.


Rebased onto main (24549bdb1) to resolve the conflict in docs/d3d12_vulkan.md (preserving #1423's pso_code_base_pairs.py measurements alongside #767's --pc-tail-ubo and Ryzen 5 7600 updates). Head is now 9ee8b36dd9224f9dc21a4baf7acf9f6a62b14862.

Verification (rebased on 24549bdb1)

  • Rebuilt gta6rt and target test binaries cleanly (43/43 Ninja steps)
  • ctest under LEONIDA_VK_VALIDATION=1 (shader_library, d3d12_vulkan_device, d3d12_compute_journal, d3d12_compute, d3d12_draw, d3d12_stub_pipelines, d3d12_stub_draw, precompile_skip_list, precompile_pc_tail):
    • NVIDIA RTX 4070 SUPER: 9/9 passed
    • AMD Radeon RDNA2 (128B): 7 passed, 2 skipped cleanly (d3d12_compute_journal, precompile_skip_list require >=144B shaders)
  • ctest -R ^gta6rt_no_tls_callbacks$ — 1/1 passed
  • scripts/check_no_game_data.py — clean (exit 0); test_docs_cli_flags.py, test_docs_repo_paths.py, test_docs_env_vars.py show zero issues in docs/d3d12_vulkan.md

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7238870203 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7238870203). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-28T11:55:17Z. --- Rebased onto `main` (`24549bdb1`) to resolve the conflict in `docs/d3d12_vulkan.md` (preserving `#1423`'s `pso_code_base_pairs.py` measurements alongside `#767`'s `--pc-tail-ubo` and Ryzen 5 7600 updates). Head is now `9ee8b36dd9224f9dc21a4baf7acf9f6a62b14862`. ### Verification (rebased on `24549bdb1`) - Rebuilt `gta6rt` and target test binaries cleanly (`43/43` Ninja steps) - `ctest` under `LEONIDA_VK_VALIDATION=1` (`shader_library`, `d3d12_vulkan_device`, `d3d12_compute_journal`, `d3d12_compute`, `d3d12_draw`, `d3d12_stub_pipelines`, `d3d12_stub_draw`, `precompile_skip_list`, `precompile_pc_tail`): - **NVIDIA RTX 4070 SUPER:** **9/9 passed** - **AMD Radeon RDNA2 (128B):** **7 passed, 2 skipped cleanly** (`d3d12_compute_journal`, `precompile_skip_list` require `>=144B` shaders) - `ctest -R ^gta6rt_no_tls_callbacks$` — **1/1 passed** - `scripts/check_no_game_data.py` — clean (`exit 0`); `test_docs_cli_flags.py`, `test_docs_repo_paths.py`, `test_docs_env_vars.py` show zero issues in `docs/d3d12_vulkan.md` AI-assisted.
timbot103 commented 2026-11-28 13:23:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T13:23:02Z.

Review: APPROVED


Independently verified 9ee8b36dd merged cleanly onto main (d48a957bb) on Windows 11 (MSVC 19.44 + Ninja) across two Vulkan GPUs with LEONIDA_VK_VALIDATION=1 (zero game files):

  • NVIDIA GeForce RTX 5080 (driver 32.0.16.1664, maxPushConstantsSize: 256)
  • AMD Radeon(TM) Graphics (gfx1036) (driver 32.0.21030.2001, maxPushConstantsSize: 256)

Red on main (d48a957bb) control (check_precompile_pc_tail.cmake, LEONIDA_VK_VALIDATION=1):

  • Fails on both GPUs with VUID-VkComputePipelineCreateInfo-layout-07988 (Set 1, Binding 0, variable "tail" missing from VkPipelineLayoutCreateInfo::pSetLayouts[1]).
  • On AMD Radeon gfx1036, gta6rt --precompile-pipelines --pc-tail-ubo also exits with code 2 (only 1 of 2 journal files written).

Green on #767 (9ee8b36dd, LEONIDA_VK_VALIDATION=1, 0 validation errors on both GPUs):

  • shader_library: PASS on both GPUs.
  • d3d12_compute: PASS on both GPUs (128-byte device built the tail PSO and 64/64 elements matched there and on this GPU).
  • d3d12_draw: PASS on both GPUs (128-byte device built the tail VS+PS PSO (VS without pc_tail, PS with set-1 tail) and 4096/4096 pixels matched there and on this GPU).
  • d3d12_stub_draw: PASS on both GPUs.
  • precompile_pc_tail (check_precompile_pc_tail.cmake): PASS on both GPUs — first run exits 0 (2 built (2 compiled, 0 from a cache), 0 failed), second run exits 0 (0 built, 2 journaled already, 0 failed), 0 validation errors.

LGTM.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6098008270 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#pullrequestreview-6098008270). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-28T13:23:02Z. **Review:** APPROVED --- Independently verified `9ee8b36dd` merged cleanly onto `main` (`d48a957bb`) on Windows 11 (MSVC 19.44 + Ninja) across two Vulkan GPUs with `LEONIDA_VK_VALIDATION=1` (zero game files): - **NVIDIA GeForce RTX 5080** (driver `32.0.16.1664`, `maxPushConstantsSize: 256`) - **AMD Radeon(TM) Graphics (`gfx1036`)** (driver `32.0.21030.2001`, `maxPushConstantsSize: 256`) **Red on `main` (`d48a957bb`) control (`check_precompile_pc_tail.cmake`, `LEONIDA_VK_VALIDATION=1`):** - Fails on **both GPUs** with `VUID-VkComputePipelineCreateInfo-layout-07988` (`Set 1, Binding 0, variable "tail"` missing from `VkPipelineLayoutCreateInfo::pSetLayouts[1]`). - On AMD Radeon `gfx1036`, `gta6rt --precompile-pipelines --pc-tail-ubo` also exits with code `2` (only 1 of 2 journal files written). **Green on `#767` (`9ee8b36dd`, `LEONIDA_VK_VALIDATION=1`, 0 validation errors on both GPUs):** - `shader_library`: **PASS** on both GPUs. - `d3d12_compute`: **PASS** on both GPUs (`128-byte device built the tail PSO and 64/64 elements matched there and on this GPU`). - `d3d12_draw`: **PASS** on both GPUs (`128-byte device built the tail VS+PS PSO (VS without pc_tail, PS with set-1 tail) and 4096/4096 pixels matched there and on this GPU`). - `d3d12_stub_draw`: **PASS** on both GPUs. - `precompile_pc_tail` (`check_precompile_pc_tail.cmake`): **PASS** on both GPUs — first run exits `0` (`2 built (2 compiled, 0 from a cache), 0 failed`), second run exits `0` (`0 built, 2 journaled already, 0 failed`), `0` validation errors. LGTM.
zmasi commented 2026-11-29 02:35:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T02:35:40Z.


Follow-Up Verification Report (9ee8b36dd9 merged into main c8bf0e7b6)

  • Environment: Windows 11, MSVC 19.44 (Ninja Release), NVIDIA GeForce RTX 3090 (Ampere, driver 610.88, maxPushConstantsSize = 256, subgroup 32..32), Vulkan SDK 1.4.363.1 (LEONIDA_VK_VALIDATION=1 with VK_LAYER_KHRONOS_validation). No game data used (check_no_game_data.py rc=0).
  • Audit Follow-Up (#issuecomment-7237367134): Merged 9ee8b36dd9 cleanly into origin/main (c8bf0e7b6, 0 conflicts; 15 files changed). Confirmed both edge cases raised in #issuecomment-7237367134 (plus detail::first_use) are cleanly resolved:
    1. BuildHost (--precompile-pipelines / --compile-server) shares resolve_user_data_layout() and create_user_data_layout() across [tail][bindless][128|144], stays open when maxPushConstantsSize < 144, includes user.push_bytes and user.tail in pipeline/journal keys, and reports needs 144 push-constant bytes for non---pc-tail-ubo entries.
    2. PipelineState::stub_entry() sets push_constant_bytes = 128 (offsetof(ShaderUserData, heap_base)), keeping LEONIDA_STUB_PIPELINES buildable on 128-byte devices.

Red -> Green Results (LEONIDA_VK_VALIDATION=1)

Target Result on RTX 3090 (9ee8b36dd9 + main c8bf0e7b6)
shader_library PASS (rc=0; fails RED against main's shader_library.h lacking pc_tail_bytes)
d3d12_compute PASS (rc=0: --pc-tail-ubo: a 128-byte device built the tail PSO and 64/64 elements matched there and on this GPU, cached PSO: 2 host adapter(s) gave the same 11 answers, 0 validation errors)
d3d12_draw PASS (rc=0: --pc-tail-ubo graphics: a 128-byte device built the tail VS+PS PSO (VS without pc_tail, PS with set-1 tail) and 4096/4096 pixels matched there and on this GPU, 0 validation errors)
d3d12_stub_draw PASS (rc=0, including simulated 128-byte LEONIDA_STUB_PIPELINES=color draw, 0 validation errors)
precompile_pc_tail & precompile_skip_list PASS (rc=0 on both CTests, 0 validation errors)
test_docs_table_rows.py & test_docs_encoding.py PASS (rc=0)
  • Verdict: PASS (6/6 CTests + doc gates pass with 0 validation errors on RTX 3090; both prior audit items confirmed resolved).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249525794 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7249525794). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T02:35:40Z. --- ### Follow-Up Verification Report (`9ee8b36dd9` merged into `main` `c8bf0e7b6`) - **Environment**: Windows 11, MSVC 19.44 (Ninja Release), **NVIDIA GeForce RTX 3090** (Ampere, driver `610.88`, `maxPushConstantsSize = 256`, subgroup `32..32`), Vulkan SDK `1.4.363.1` (`LEONIDA_VK_VALIDATION=1` with `VK_LAYER_KHRONOS_validation`). No game data used (`check_no_game_data.py` `rc=0`). - **Audit Follow-Up (`#issuecomment-7237367134`)**: Merged `9ee8b36dd9` cleanly into `origin/main` (`c8bf0e7b6`, `0` conflicts; 15 files changed). Confirmed both edge cases raised in `#issuecomment-7237367134` (plus `detail::first_use`) are cleanly resolved: 1. `BuildHost` (`--precompile-pipelines` / `--compile-server`) shares `resolve_user_data_layout()` and `create_user_data_layout()` across `[tail][bindless][128|144]`, stays open when `maxPushConstantsSize < 144`, includes `user.push_bytes` and `user.tail` in pipeline/journal keys, and reports `needs 144 push-constant bytes` for non-`--pc-tail-ubo` entries. 2. `PipelineState::stub_entry()` sets `push_constant_bytes = 128` (`offsetof(ShaderUserData, heap_base)`), keeping `LEONIDA_STUB_PIPELINES` buildable on 128-byte devices. #### Red -> Green Results (`LEONIDA_VK_VALIDATION=1`) | Target | Result on RTX 3090 (`9ee8b36dd9` + `main` `c8bf0e7b6`) | |---|---| | `shader_library` | **PASS** (`rc=0`; fails **RED** against `main`'s `shader_library.h` lacking `pc_tail_bytes`) | | `d3d12_compute` | **PASS** (`rc=0`: `--pc-tail-ubo: a 128-byte device built the tail PSO and 64/64 elements matched there and on this GPU`, `cached PSO: 2 host adapter(s) gave the same 11 answers`, `0` validation errors) | | `d3d12_draw` | **PASS** (`rc=0`: `--pc-tail-ubo graphics: a 128-byte device built the tail VS+PS PSO (VS without pc_tail, PS with set-1 tail) and 4096/4096 pixels matched there and on this GPU`, `0` validation errors) | | `d3d12_stub_draw` | **PASS** (`rc=0`, including simulated 128-byte `LEONIDA_STUB_PIPELINES=color` draw, `0` validation errors) | | `precompile_pc_tail` & `precompile_skip_list` | **PASS** (`rc=0` on both CTests, `0` validation errors) | | `test_docs_table_rows.py` & `test_docs_encoding.py` | **PASS** (`rc=0`) | - **Verdict**: **PASS** (`6/6` CTests + doc gates pass with 0 validation errors on RTX 3090; both prior audit items confirmed resolved). AI-assisted.
enlight3d commented 2026-11-29 08:57:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T08:57:44Z.


Validation run of this PR on a Windows PC with a real GPU.

  • PR head: 9ee8b36dd9
  • main: 54b2a81e95
  • Tested merged: no. The merge into main conflicts in runtime/src/vulkan_replay.h, so I tested the PR head on its own (detached at the PR head, its own base).

Commands (RelWithDebInfo, Ninja, LEONIDA_REQUIRE_VULKAN=ON):

git fetch origin pull/767/head:pr-767
git checkout --detach pr-767
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 8 --target shader_library_test d3d12_compute_test d3d12_draw_test d3d12_stub_draw_test gta6rt
ctest -R "^(shader_library|d3d12_compute|d3d12_draw|d3d12_stub_draw|precompile_pc_tail|precompile_skip_list)$" --output-on-failure -j1
  • Green: 6/6 passed (none skipped).
  • Red, with the PR's non-test changes (d3d12_vulkan_device.cpp, d3d12_com.h, shader_library.h, vulkan_replay.h) reverted to the PR's merge base and the tests, CMake and shader sources kept:
    • d3d12_compute, d3d12_draw, d3d12_stub_draw fail on this 128-byte-push-constant device. The log says the pipelines need 144 bytes of push constants and the uniform-buffer fallback is not built; d3d12_draw_test then fails at its first CreateGraphicsPipelineState. This is the behaviour the PR fixes.
    • shader_library: with everything reverted it is only a build failure (pc_tail_bytes is new API). Behavioural red: ShaderEntry::pc_tail_bytes kept, only the line that reads pc_tail from the metadata removed; the test then exits 1 at native->push_constant_bytes == 128 && native->pc_tail_bytes == 16 && !entry->pc_tail_bytes.
    • precompile_pc_tail and precompile_skip_list pass with the revert too, so on this machine they do not tell the two versions apart.
  • Link: no new imports vs the PR's merge base (699 DLL!symbol entries, identical). Against current main the list differs by +1/-5 entries (__stdio_common_vswscanf added; fma, fmaf, GetXStateFeaturesMask, LocateXStateFeature, SetXStateFeaturesMask absent) because main has moved on since this PR's base; the PR diff itself adds no scanf call.

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44.

Could you merge main into the branch? It conflicts in runtime/src/vulkan_replay.h, so a green run on the merged tree could not be done. Thanks!

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253444285 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7253444285). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T08:57:44Z. --- Validation run of this PR on a Windows PC with a real GPU. - PR head: 9ee8b36dd9224f9dc21a4baf7acf9f6a62b14862 - main: 54b2a81e95c470c953ddee6177fd6255cbaf041d - Tested merged: no. The merge into main conflicts in `runtime/src/vulkan_replay.h`, so I tested the PR head on its own (detached at the PR head, its own base). Commands (RelWithDebInfo, Ninja, `LEONIDA_REQUIRE_VULKAN=ON`): ``` git fetch origin pull/767/head:pr-767 git checkout --detach pr-767 cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON cmake --build runtime/build -j 8 --target shader_library_test d3d12_compute_test d3d12_draw_test d3d12_stub_draw_test gta6rt ctest -R "^(shader_library|d3d12_compute|d3d12_draw|d3d12_stub_draw|precompile_pc_tail|precompile_skip_list)$" --output-on-failure -j1 ``` - Green: 6/6 passed (none skipped). - Red, with the PR's non-test changes (`d3d12_vulkan_device.cpp`, `d3d12_com.h`, `shader_library.h`, `vulkan_replay.h`) reverted to the PR's merge base and the tests, CMake and shader sources kept: - `d3d12_compute`, `d3d12_draw`, `d3d12_stub_draw` fail on this 128-byte-push-constant device. The log says the pipelines need 144 bytes of push constants and the uniform-buffer fallback is not built; `d3d12_draw_test` then fails at its first `CreateGraphicsPipelineState`. This is the behaviour the PR fixes. - `shader_library`: with everything reverted it is only a build failure (`pc_tail_bytes` is new API). Behavioural red: `ShaderEntry::pc_tail_bytes` kept, only the line that reads `pc_tail` from the metadata removed; the test then exits 1 at `native->push_constant_bytes == 128 && native->pc_tail_bytes == 16 && !entry->pc_tail_bytes`. - `precompile_pc_tail` and `precompile_skip_list` pass with the revert too, so on this machine they do not tell the two versions apart. - Link: no new imports vs the PR's merge base (699 DLL!symbol entries, identical). Against current main the list differs by +1/-5 entries (`__stdio_common_vswscanf` added; `fma`, `fmaf`, `GetXStateFeaturesMask`, `LocateXStateFeature`, `SetXStateFeaturesMask` absent) because main has moved on since this PR's base; the PR diff itself adds no scanf call. Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44. Could you merge main into the branch? It conflicts in `runtime/src/vulkan_replay.h`, so a green run on the merged tree could not be done. Thanks!
whoalin1 commented 2026-11-29 17:27:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-29T17:27:40Z.


Rebased onto current main as 5cb2fcdd0; the real runtime/src/vulkan_replay.h conflict is resolved by preserving upstream's earlier indirect-dispatch pipeline resolution and adding this PR's tail_set descriptor-set requirement there, rather than reintroducing the obsolete downstream duplicate block.

Validation after the rebase: CMake configure and build passed; ctest passed 46/47, with the single pipeline_workers failure reproduced identically on clean upstream main (so it is baseline rather than PR-specific); diff-check is clean. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7259708759 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7259708759). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-29T17:27:40Z. --- Rebased onto current `main` as `5cb2fcdd0`; the real `runtime/src/vulkan_replay.h` conflict is resolved by preserving upstream's earlier indirect-dispatch pipeline resolution and adding this PR's `tail_set` descriptor-set requirement there, rather than reintroducing the obsolete downstream duplicate block. Validation after the rebase: CMake configure and build passed; ctest passed 46/47, with the single `pipeline_workers` failure reproduced identically on clean upstream `main` (so it is baseline rather than PR-specific); diff-check is clean. AI-assisted.
whoalin1 commented 2026-11-30 19:45:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-30T19:45:50Z.


Rebased onto current \main\ (\51dbc5b58) as \20f2260bf1ee83298bf05965e8058a66edd15f2\ (now \MERGEABLE). Resolved conflicts in
untime/shims/d3d12_vulkan_device.cpp\ (\LiteralSamplerSpec, \masked_layout\ via \create_layout, \rena_host/\rena_ready(), \destroy_page_mirror()\ + \pc_tail\ teardown, and \BuildHost::unbuildable) and
untime/src/vulkan_replay.h\ (\ReplayStateCache\ set-1 \ ail_set/\ ail_offset\ and \push_bytes\ handling across Draw, Dispatch, and \ExecuteIndirect\ dispatch, plus \ ail_set\ checks in \collect_unbuilt_pipelines\ and \prepare).

Local verification on \20f2260b\ (Windows 11, MSVC 19.44, Ninja \RelWithDebInfo, \LEONIDA_REQUIRE_VULKAN=ON, \LEONIDA_VK_VALIDATION=1, \VK_LOADER_LAYERS_DISABLE=implicit):

  • NVIDIA GeForce RTX 4070 SUPER: \11/11\ targeted CTests passed (\shader_library, \d3d12_vulkan_device, \d3d12_compute_journal, \d3d12_compute, \d3d12_draw, \d3d12_stub_pipelines, \d3d12_stub_draw, \precompile_skip_list, \precompile_pc_tail, \ k_sample_mask,
    eplay_state_cache).
  • AMD Radeon(TM) Graphics (128-byte \maxPushConstantsSize): \7\ passed (\shader_library, \d3d12_vulkan_device, \d3d12_compute, \d3d12_draw, \d3d12_stub_pipelines, \d3d12_stub_draw, \precompile_pc_tail), \3\ skipped on capability checks (\d3d12_compute_journal, \precompile_skip_list, \ k_sample_mask), \1\ pre-existing baseline failure (
    eplay_state_cache: 5 validation errors from \main's raw 144-byte push-constant test fixtures on a 128-byte device; the live GPU \ReplayStateCache\ graphics/compute interleave subtest passed).
  • Python gates: \scripts/check_no_game_data.py\ clean, \ ests/test_docs_.py\ (57/57 OK), and \ ests/test_build_runtime_.py\ (13/13 OK).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7289903011 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7289903011). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-30T19:45:50Z. --- Rebased onto current \main\ (\51dbc5b58\) as \20f2260bf1ee83298bf05965e8058a66edd15f2\ (now \MERGEABLE\). Resolved conflicts in \ untime/shims/d3d12_vulkan_device.cpp\ (\LiteralSamplerSpec\, \masked_layout\ via \create_layout\, \rena_host\/\rena_ready()\, \destroy_page_mirror()\ + \pc_tail\ teardown, and \BuildHost::unbuildable\) and \ untime/src/vulkan_replay.h\ (\ReplayStateCache\ set-1 \ ail_set\/\ ail_offset\ and \push_bytes\ handling across Draw, Dispatch, and \ExecuteIndirect\ dispatch, plus \ ail_set\ checks in \collect_unbuilt_pipelines\ and \prepare\). Local verification on \20f2260b\ (Windows 11, MSVC 19.44, Ninja \RelWithDebInfo\, \LEONIDA_REQUIRE_VULKAN=ON\, \LEONIDA_VK_VALIDATION=1\, \VK_LOADER_LAYERS_DISABLE=~implicit~\): - **NVIDIA GeForce RTX 4070 SUPER**: \11/11\ targeted CTests passed (\shader_library\, \d3d12_vulkan_device\, \d3d12_compute_journal\, \d3d12_compute\, \d3d12_draw\, \d3d12_stub_pipelines\, \d3d12_stub_draw\, \precompile_skip_list\, \precompile_pc_tail\, \ k_sample_mask\, \ eplay_state_cache\). - **AMD Radeon(TM) Graphics (128-byte \maxPushConstantsSize\)**: \7\ passed (\shader_library\, \d3d12_vulkan_device\, \d3d12_compute\, \d3d12_draw\, \d3d12_stub_pipelines\, \d3d12_stub_draw\, \precompile_pc_tail\), \3\ skipped on capability checks (\d3d12_compute_journal\, \precompile_skip_list\, \ k_sample_mask\), \1\ pre-existing baseline failure (\ eplay_state_cache\: 5 validation errors from \main\'s raw 144-byte push-constant test fixtures on a 128-byte device; the live GPU \ReplayStateCache\ graphics/compute interleave subtest passed). - **Python gates**: \scripts/check_no_game_data.py\ clean, \ ests/test_docs_*.py\ (57/57 OK), and \ ests/test_build_runtime_*.py\ (13/13 OK). AI-assisted.
whoalin1 commented 2026-11-30 22:13:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-30T22:13:14Z.


The branch has been rebased again as b20f2260b and is now mergeable. The existing approval and independent Windows/GPU validations were against the same implementation before the rebase; is anything else needed before this can be merged?

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7293537705 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7293537705). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-30T22:13:14Z. --- The branch has been rebased again as `b20f2260b` and is now mergeable. The existing approval and independent Windows/GPU validations were against the same implementation before the rebase; is anything else needed before this can be merged?
aslan2142 commented 2026-12-01 16:31:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:31:24Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317746881 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/767#issuecomment-7317746881). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:31:24Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!767
No description provided.