d3d12: realize console streams with their depth-bounds flag and back-face stencil masks (RT-DEPTHBOUNDS-STREAM-EXTRAS) #1695

Closed
thiefyzheng wants to merge 3 commits from upstream-pr/1695 into main
thiefyzheng commented 2026-11-25 08:33:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by thiefyzheng on 2026-11-25T08:33:27Z.


RT-DEPTHBOUNDS-STREAM-EXTRAS — Depends on: #815

Claimed on #1608 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156944266). This fixes @djrolfes' integration finding on #815 (https://github.com/ubiquitarianism/leonida/pull/815#issuecomment-7156015786). @kotekompotek: happy to have this folded into #815 instead of a stacked PR — say so and I'll drop it.

Note: the diff includes #815's commit until it merges, since this branches from its head efea97331.

What

  • PipelineState::resolve_type's std::call_once block (runtime/shims/d3d12_vulkan_device.cpp:7059) realized a console stream with create_graphics(stream.graphics, &stream.ms, &stream.as), silently dropping stream.extras (the depth-bounds flag, #815's GraphicsStreamExtras) and stream.back_stencil (DEPTH_STENCIL2 back-face masks, which parse_pipeline_stream fills right next to the front ones). The eager CreatePipelineState branch passes both. It now passes stream.back_masks?&stream.back_stencil:nullptr and &stream.extras — argument-for-argument identical to the eager call at ~12104.
  • prepare_console_stream (~10367) set the pipeline cache key from pipeline_key(stream.graphics) alone; the plain D3D12_DEPTH_STENCIL_DESC the key hashes cannot see the depth-bounds flag or back-face masks, so two console PSOs differing only in those would collide. The key now post-mixes back_masks, back_stencil.read/.write and extras.depth_bounds_test with the same cached_pso::KeyBuilder/sha256_hex idiom pipeline_key itself uses.
  • Regression test in runtime/test/d3d12_mesh_test.cpp: a console stream (device slot 86, mesh-shader subobject 24) carrying DEPTH_STENCIL1 with DepthBoundsTestEnable and a D32_FLOAT DSV, drawn once inside OMSetDepthBounds(0, 1) (red — depth 0 is inside) and once inside OMSetDepthBounds(0.5, 1) (blue — the discard only happens if the flag reached the pipeline). Without the source fix both draws come out red.

What was run

  • Nothing was compiled or executed on the author host: no GPU, no Vulkan SDK, MSVC-only runtime tests. Not GPU-confirmed.
  • An independent mechanical review verified, against the actual branch sources: the create_graphics signature match (7119–7123), the PipelineStream fields and their parse fill, every identifier the test uses in scope with types lined up, fence values (the new bounds_fence pre-increments from 3, first Signal is 4 — no collision with the earlier Signals 1–3), the readback footprint/offset parity with the file's existing usage, slot 86 = console CreatePipelineState, and subobject 24 = the console mesh shader (consistent with the existing stream test at line 341 and the console→PC remap in d3d12_xs_pso_stream.h:31). That review caught two real defects, both fixed here: the test's second-frame depth barrier indicated a COMMON→DEPTH_WRITE transition from a buffer already in DEPTH_WRITE (now conditional on first_frame), and the cache-key collision above.
  • The guard demonstration owed (run d3d12_mesh_test with the one-line source change reverted and show the bounds case fails) needs a depth-bounds-capable Vulkan device, which the author host does not have. The test skips cleanly when DepthBoundsTestSupported is FALSE or in pc_only builds.

Attribution

AI-assisted: implementation (Claude Sonnet 5.5 worker), independent review and follow-up fixes (GLM 5.3 Flash worker), orchestration and verification by the contributor. No game files were used or are needed; no game data in this PR.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5487878530 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1695). Originally posted by [thiefyzheng](https://github.com/thiefyzheng) on 2026-11-25T08:33:27Z. --- ## RT-DEPTHBOUNDS-STREAM-EXTRAS — Depends on: #815 Claimed on #1608 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7156944266). This fixes @djrolfes' integration finding on #815 (https://github.com/ubiquitarianism/leonida/pull/815#issuecomment-7156015786). @kotekompotek: happy to have this folded into #815 instead of a stacked PR — say so and I'll drop it. **Note:** the diff includes #815's commit until it merges, since this branches from its head `efea97331`. ### What - `PipelineState::resolve_type`'s `std::call_once` block (`runtime/shims/d3d12_vulkan_device.cpp:7059`) realized a console stream with `create_graphics(stream.graphics, &stream.ms, &stream.as)`, silently dropping `stream.extras` (the depth-bounds flag, #815's `GraphicsStreamExtras`) and `stream.back_stencil` (DEPTH_STENCIL2 back-face masks, which `parse_pipeline_stream` fills right next to the front ones). The eager `CreatePipelineState` branch passes both. It now passes `stream.back_masks?&stream.back_stencil:nullptr` and `&stream.extras` — argument-for-argument identical to the eager call at ~12104. - `prepare_console_stream` (~10367) set the pipeline cache key from `pipeline_key(stream.graphics)` alone; the plain `D3D12_DEPTH_STENCIL_DESC` the key hashes cannot see the depth-bounds flag or back-face masks, so two console PSOs differing only in those would collide. The key now post-mixes `back_masks`, `back_stencil.read/.write` and `extras.depth_bounds_test` with the same `cached_pso::KeyBuilder`/`sha256_hex` idiom `pipeline_key` itself uses. - Regression test in `runtime/test/d3d12_mesh_test.cpp`: a console stream (device slot 86, mesh-shader subobject 24) carrying DEPTH_STENCIL1 with `DepthBoundsTestEnable` and a D32_FLOAT DSV, drawn once inside `OMSetDepthBounds(0, 1)` (red — depth 0 is inside) and once inside `OMSetDepthBounds(0.5, 1)` (blue — the discard only happens if the flag reached the pipeline). Without the source fix both draws come out red. ### What was run - **Nothing was compiled or executed on the author host: no GPU, no Vulkan SDK, MSVC-only runtime tests.** Not GPU-confirmed. - An independent mechanical review verified, against the actual branch sources: the `create_graphics` signature match (7119–7123), the `PipelineStream` fields and their parse fill, every identifier the test uses in scope with types lined up, fence values (the new `bounds_fence` pre-increments from 3, first Signal is 4 — no collision with the earlier Signals 1–3), the readback footprint/offset parity with the file's existing usage, slot 86 = console `CreatePipelineState`, and subobject 24 = the console mesh shader (consistent with the existing stream test at line 341 and the console→PC remap in `d3d12_xs_pso_stream.h:31`). That review caught two real defects, both fixed here: the test's second-frame depth barrier indicated a COMMON→DEPTH_WRITE transition from a buffer already in DEPTH_WRITE (now conditional on `first_frame`), and the cache-key collision above. - The guard demonstration owed (run `d3d12_mesh_test` with the one-line source change reverted and show the bounds case fails) needs a depth-bounds-capable Vulkan device, which the author host does not have. The test skips cleanly when `DepthBoundsTestSupported` is FALSE or in `pc_only` builds. ### Attribution AI-assisted: implementation (Claude Sonnet 5.5 worker), independent review and follow-up fixes (GLM 5.3 Flash worker), orchestration and verification by the contributor. No game files were used or are needed; no game data in this PR.
kawaii-shakal commented 2026-11-25 09:45:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kawaii-shakal on 2026-11-25T09:45:31Z.

Review: COMMENTED


Review (read-only, not run). The pipeline-cache key now including the back-face masks and the depth-bounds flag is an important catch, and the plumbing through OMSetDepthBounds, bundles and Draw looks complete. Three points:

  1. Nothing has been compiled or run (per the description). This touches vulkan_replay.h, d3d12_com.cpp and the device; please get at least a build and d3d12_mesh_test from someone with a depthBounds-capable GPU before merge. I can run it on an RTX 5070 Ti if it helps.
  2. Feature enable on the non-standalone device. enable.depthBounds = chosen_features.depthBounds is added in create_vulkan_device_standalone. DepthBoundsTestSupported and the PSO check read state_.info.features.depthBounds. When the device comes from the runtime's own creation path (not standalone), is info.features the enabled set or the supported set? If it is the supported set, a PSO could enable depthBoundsTestEnable on a device that never enabled the feature (a VUID).
  3. dyn_list[9]: with #778 (adds VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT to the same list) the maximum becomes 7 + 1 + 1 = 9, so 9 is exactly enough. A static_assert or a comment counting the entries would keep the next addition from overflowing it.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6055209578 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1695#pullrequestreview-6055209578). Originally posted by [kawaii-shakal](https://github.com/kawaii-shakal) on 2026-11-25T09:45:31Z. **Review:** COMMENTED --- Review (read-only, not run). The pipeline-cache key now including the back-face masks and the depth-bounds flag is an important catch, and the plumbing through `OMSetDepthBounds`, bundles and `Draw` looks complete. Three points: 1. **Nothing has been compiled or run** (per the description). This touches `vulkan_replay.h`, `d3d12_com.cpp` and the device; please get at least a build and `d3d12_mesh_test` from someone with a depthBounds-capable GPU before merge. I can run it on an RTX 5070 Ti if it helps. 2. **Feature enable on the non-standalone device.** `enable.depthBounds = chosen_features.depthBounds` is added in `create_vulkan_device_standalone`. `DepthBoundsTestSupported` and the PSO check read `state_.info.features.depthBounds`. When the device comes from the runtime's own creation path (not standalone), is `info.features` the enabled set or the supported set? If it is the supported set, a PSO could enable `depthBoundsTestEnable` on a device that never enabled the feature (a VUID). 3. `dyn_list[9]`: with #778 (adds `VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT` to the same list) the maximum becomes 7 + 1 + 1 = 9, so 9 is exactly enough. A `static_assert` or a comment counting the entries would keep the next addition from overflowing it. AI-assisted review (Claude Code, Claude Opus 5.5).
potatoe0100 commented 2026-11-25 11:18:34 +00:00 (Migrated from github.com)

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


Tested 766c6c42e merged onto main bcaa13dad (clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060 (depthBounds and mesh shaders supported), driver 621.14, VS 2022 RelWithDebInfo + Ninja.

  • Full ctest -j 6: 409 of 409 passed, same as main; that includes d3d12_mesh, d3d12_bundle_forbidden, d3d12_close_parity, d3d12_com and d3d12_vulkan_device.
  • d3d12_mesh_test with LEONIDA_VK_VALIDATION=1: exit 0, 0 VUIDs, "DispatchMesh over X, Y and Z and a stream VS draw matched all 4096 pixels".
  • run_gpu_tests.py: 209/263 passed, 53 skipped, identical to main.

AI-assisted testing (non-developer tester).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7160873978 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7160873978). Originally posted by [potatoe0100](https://github.com/potatoe0100) on 2026-11-25T11:18:34Z. --- Tested `766c6c42e` merged onto `main` `bcaa13dad` (clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060 (depthBounds and mesh shaders supported), driver 621.14, VS 2022 RelWithDebInfo + Ninja. - Full `ctest -j 6`: 409 of 409 passed, same as `main`; that includes `d3d12_mesh`, `d3d12_bundle_forbidden`, `d3d12_close_parity`, `d3d12_com` and `d3d12_vulkan_device`. - `d3d12_mesh_test` with `LEONIDA_VK_VALIDATION=1`: exit 0, 0 VUIDs, "DispatchMesh over X, Y and Z and a stream VS draw matched all 4096 pixels". - `run_gpu_tests.py`: 209/263 passed, 53 skipped, identical to `main`. AI-assisted testing (non-developer tester).
adrianmjim commented 2026-11-25 11:24:32 +00:00 (Migrated from github.com)

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


Tested 766c6c42e applied onto main 42537e7b6 on AMD: Radeon RX 7900 XT (RDNA3, depthBounds = true), AMD driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, VS 2022 RelWithDebInfo. No game files.

Tests:

  • The 14 related tests pass, plain and with LEONIDA_VK_VALIDATION=1 (no messages): d3d12_mesh, d3d12_com, d3d12_close_parity, d3d12_bundle_forbidden, d3d12_vulkan_device, pso_stream, d3d12_draw, d3d12_pso_validation, d3d12_depth24_draw, d3d12_geometry, d3d12_multi_viewport, d3d12_rect_list, d3d12_quad_index, d3d12_translated_draw.
  • Whole ctest -j 6: 399 of 402, with the same three failures as main.

Three things in the code:

1. OMSetDepthBounds with a NaN. The D3D12 reference says of both Min and Max: "NaN values silently convert to 0". At replay the PR makes any NaN an empty range ((mn != mn) || (mx != mx) → set_depth_bounds(1, 0)), so every pixel is discarded. OMSetDepthBounds(NaN, 0.5) should test [0, 0.5]. (0.2, NaN) happens to come out right, because D3D12's [0.2, 0] is empty too. Mapping NaN to 0 first and then applying the existing clamp/empty rules would match D3D12.

2. The extra cache-key mix is dropped. pipeline->set_cache_key(pipeline_key(stream.graphics) + leonida::sha256_hex(extra.data())) appends a second 64-character hash to a key that is already a 64-character sha256_hex. cached_pso::encode()/check() do padded.resize(key_bytes) with key_bytes = 64, so the back-face masks and the depth-bounds flag never reach the cached blob. So two console streams that differ only in those return byte-identical GetCachedBlob blobs, and the mix has no effect. Hashing the two parts together, for example by feeding extra's bytes into the same KeyBuilder before the sha256_hex, would keep the key at 64 characters.

3. The new d3d12_mesh case doesn't go through the new resolve_type path. ctest runs it without LEONIDA_PIPELINE_COMPILE=on-demand, so slot 86 goes to the eager CreatePipelineState path, which this PR also changes to pass &stream.extras. The test would pass without the resolve_type change.

I tried it with LEONIDA_PIPELINE_COMPILE=on-demand. d3d12_mesh then fails, but it fails the same way on main without this PR: the console stream from slot 86 isn't created (SUCCEEDED(console_hr) && console_pso.p, line 353 with the PR, line 344 on main). So the test can't cover the on-demand path at the moment. That failure is separate and predates this PR.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7161007242 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7161007242). Originally posted by [adrianmjim](https://github.com/adrianmjim) on 2026-11-25T11:24:32Z. --- Tested `766c6c42e` applied onto `main` `42537e7b6` on AMD: Radeon RX 7900 XT (RDNA3, `depthBounds = true`), AMD driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, VS 2022 RelWithDebInfo. No game files. **Tests:** - The 14 related tests pass, plain and with `LEONIDA_VK_VALIDATION=1` (no messages): `d3d12_mesh`, `d3d12_com`, `d3d12_close_parity`, `d3d12_bundle_forbidden`, `d3d12_vulkan_device`, `pso_stream`, `d3d12_draw`, `d3d12_pso_validation`, `d3d12_depth24_draw`, `d3d12_geometry`, `d3d12_multi_viewport`, `d3d12_rect_list`, `d3d12_quad_index`, `d3d12_translated_draw`. - Whole `ctest -j 6`: 399 of 402, with the same three failures as `main`. Three things in the code: **1. `OMSetDepthBounds` with a NaN.** The D3D12 reference says of both `Min` and `Max`: "NaN values silently convert to 0". At replay the PR makes any NaN an empty range (`(mn != mn) || (mx != mx)` → `set_depth_bounds(1, 0)`), so every pixel is discarded. `OMSetDepthBounds(NaN, 0.5)` should test `[0, 0.5]`. `(0.2, NaN)` happens to come out right, because D3D12's `[0.2, 0]` is empty too. Mapping NaN to 0 first and then applying the existing clamp/empty rules would match D3D12. **2. The extra cache-key mix is dropped.** `pipeline->set_cache_key(pipeline_key(stream.graphics) + leonida::sha256_hex(extra.data()))` appends a second 64-character hash to a key that is already a 64-character `sha256_hex`. `cached_pso::encode()`/`check()` do `padded.resize(key_bytes)` with `key_bytes = 64`, so the back-face masks and the depth-bounds flag never reach the cached blob. So two console streams that differ only in those return byte-identical `GetCachedBlob` blobs, and the mix has no effect. Hashing the two parts together, for example by feeding `extra`'s bytes into the same `KeyBuilder` before the `sha256_hex`, would keep the key at 64 characters. **3. The new `d3d12_mesh` case doesn't go through the new `resolve_type` path.** ctest runs it without `LEONIDA_PIPELINE_COMPILE=on-demand`, so slot 86 goes to the eager `CreatePipelineState` path, which this PR also changes to pass `&stream.extras`. The test would pass without the `resolve_type` change. I tried it with `LEONIDA_PIPELINE_COMPILE=on-demand`. `d3d12_mesh` then fails, but it fails the same way on `main` without this PR: the console stream from slot 86 isn't created (`SUCCEEDED(console_hr) && console_pso.p`, line 353 with the PR, line 344 on `main`). So the test can't cover the on-demand path at the moment. That failure is separate and predates this PR.
thiefyzheng commented 2026-11-25 11:28:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by thiefyzheng on 2026-11-25T11:28:43Z.


@adrianmjim — thank you for the 7900 XT run and the three review points. Both code findings are fixed in 6f710e57 (a fast-forward on the tested 766c6c42, so your results still describe the base):

1. Cache-key mix truncated away — fixed. cached_pso resizing the key to 64 chars means the appended second hash never reached the blob. pipeline_key (graphics overload) now takes an optional const KeyBuilder* extra hashed into the same builder before its single sha256_hex; prepare_console_stream passes the back-masks/back-stencil/depth-bounds builder. All other pipeline_key call sites keep byte-identical keys (default nullptr, no bytes appended): the trace print at ~7285, the compute overload at ~10371, shared_native_graphics at ~10388, CreateComputePipelineState at ~11967, CreateGraphicsPipelineState at ~11984 (eager CreatePipelineState doesn't call pipeline_key at all).

2. NaN depth bounds — fixed on this branch, with a note for @kotekompotek. Replay now maps NaN to 0 first (vulkan_replay.h ~4893), then the existing clamp/inverted-is-empty rules unchanged — so (NaN, 0.5) behaves as [0, 0.5] and (0.2, NaN) as [0.2, 0] (empty). Record-time acceptance and bundles are untouched. This is replay-side code that came in with #815; kotekompotek, if you would rather carry it in #815 itself, say so and I'll drop the hunk here and rebase on your fix.

3. Test covers only the eager slot-86 path — acknowledged. Under plain ctest LEONIDA_PIPELINE_COMPILE isn't on-demand, so CreatePipelineState (~12090-12122, eager create_graphics at 12118) is what the mesh case exercises; the resolve_type lazy realization at ~7055/7063 is not covered, because on-demand mode fails earlier — console stream from slot 86 not created (the SUCCEEDED(console_hr) bail at d3d12_mesh_test.cpp:349/~353), identically on main. I have not touched that pre-existing failure; the case still guards the eager path plus the replay-side bounds, and the resolve_type change remains a code-path-observation fix for now.

New commit is again not compiled and not GPU-confirmed on the author host (no Vulkan SDK / MSVC here); it needs one more hardware look like yours when convenient.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7161099527 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7161099527). Originally posted by [thiefyzheng](https://github.com/thiefyzheng) on 2026-11-25T11:28:43Z. --- @adrianmjim — thank you for the 7900 XT run and the three review points. Both code findings are fixed in `6f710e57` (a fast-forward on the tested `766c6c42`, so your results still describe the base): **1. Cache-key mix truncated away — fixed.** `cached_pso` resizing the key to 64 chars means the appended second hash never reached the blob. `pipeline_key` (graphics overload) now takes an optional `const KeyBuilder* extra` hashed into the *same* builder before its single `sha256_hex`; `prepare_console_stream` passes the back-masks/back-stencil/depth-bounds builder. All other `pipeline_key` call sites keep byte-identical keys (default `nullptr`, no bytes appended): the trace print at ~7285, the compute overload at ~10371, `shared_native_graphics` at ~10388, `CreateComputePipelineState` at ~11967, `CreateGraphicsPipelineState` at ~11984 (eager `CreatePipelineState` doesn't call `pipeline_key` at all). **2. NaN depth bounds — fixed on this branch, with a note for @kotekompotek.** Replay now maps NaN to 0 *first* (`vulkan_replay.h` ~4893), then the existing clamp/inverted-is-empty rules unchanged — so `(NaN, 0.5)` behaves as `[0, 0.5]` and `(0.2, NaN)` as `[0.2, 0]` (empty). Record-time acceptance and bundles are untouched. This is replay-side code that came in with #815; kotekompotek, if you would rather carry it in #815 itself, say so and I'll drop the hunk here and rebase on your fix. **3. Test covers only the eager slot-86 path — acknowledged.** Under plain ctest `LEONIDA_PIPELINE_COMPILE` isn't on-demand, so `CreatePipelineState` (~12090-12122, eager `create_graphics` at 12118) is what the mesh case exercises; the `resolve_type` lazy realization at ~7055/7063 is not covered, because on-demand mode fails earlier — console stream from slot 86 not created (the SUCCEEDED(console_hr) bail at `d3d12_mesh_test.cpp:349`/~353), identically on `main`. I have not touched that pre-existing failure; the case still guards the eager path plus the replay-side bounds, and the `resolve_type` change remains a code-path-observation fix for now. New commit is again **not compiled and not GPU-confirmed on the author host** (no Vulkan SDK / MSVC here); it needs one more hardware look like yours when convenient.
adrianmjim commented 2026-11-25 12:48:47 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by adrianmjim on 2026-11-25T12:48:47Z.


Rechecked 6f710e574 on the RX 7900 XT (driver 32.0.32029.2010, Windows 11 26300, VS 2022 RelWithDebInfo). Both points are fixed:

  • The extras now go through the same KeyBuilder, so the key stays one 64-character hash.
  • OMSetDepthBounds(NaN, 0.5) is in the state sweep and gives the same result as host D3D12 here (0x00000000 | 0x00000000 | match).

The 14 related tests pass with LEONIDA_VK_VALIDATION=1 and no VUIDs. Whole ctest -j 6: 398 of 402 pass or skip. The failures are d3d12_texture_tiles, d3d12_clear and d3d12_geometry_views, which fail on main here too, plus d3d12_api_descriptor_copy, which failed once under -j 6 and passes 3 of 3 alone.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7162892079 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7162892079). Originally posted by [adrianmjim](https://github.com/adrianmjim) on 2026-11-25T12:48:47Z. --- Rechecked `6f710e574` on the RX 7900 XT (driver 32.0.32029.2010, Windows 11 26300, VS 2022 RelWithDebInfo). Both points are fixed: - The extras now go through the same `KeyBuilder`, so the key stays one 64-character hash. - `OMSetDepthBounds(NaN, 0.5)` is in the state sweep and gives the same result as host D3D12 here (`0x00000000 | 0x00000000 | match`). The 14 related tests pass with `LEONIDA_VK_VALIDATION=1` and no VUIDs. Whole `ctest -j 6`: 398 of 402 pass or skip. The failures are `d3d12_texture_tiles`, `d3d12_clear` and `d3d12_geometry_views`, which fail on `main` here too, plus `d3d12_api_descriptor_copy`, which failed once under `-j 6` and passes 3 of 3 alone.
thiefyzheng commented 2026-11-25 12:52:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by thiefyzheng on 2026-11-25T12:52:07Z.


@adrianmjim — thank you for the recheck on 6f710e57. Recording the state for whoever merges: the head now carries an independent hardware verification on RDNA3 covering all three of your original points (single 64-char key, NaN→0 matching host D3D12, eager-path suite green with LEONIDA_VK_VALIDATION=1, 0 VUIDs), with the only ctest failures being the three pre-existing main baseline ones plus one -j 6 flake that passes alone.

Open item unchanged: @kotekompotek, whether the NaN hunk stays here or you carry it in #815 — the default assumed here is that it stays unless you'd rather have it; a maintainer can also drop it at merge. Everything else on this PR is reviewer-verified. AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7162968215 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7162968215). Originally posted by [thiefyzheng](https://github.com/thiefyzheng) on 2026-11-25T12:52:07Z. --- @adrianmjim — thank you for the recheck on `6f710e57`. Recording the state for whoever merges: the head now carries an independent hardware verification on RDNA3 covering all three of your original points (single 64-char key, NaN→0 matching host D3D12, eager-path suite green with `LEONIDA_VK_VALIDATION=1`, 0 VUIDs), with the only ctest failures being the three pre-existing `main` baseline ones plus one `-j 6` flake that passes alone. Open item unchanged: @kotekompotek, whether the NaN hunk stays here or you carry it in #815 — the default assumed here is that it stays unless you'd rather have it; a maintainer can also drop it at merge. Everything else on this PR is reviewer-verified. AI-assisted.
thiefyzheng commented 2026-11-25 14:26:07 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by thiefyzheng on 2026-11-25T14:26:07Z.


Rebased onto #815's new head a635392c6 (post its 71a769d7d rebase) — our two commits are now 6b7bf490 and bb8e1131, conflict-free (this PR never touches d3d12_com.cpp, where #815's own conflict was). The commit contents are unchanged from the previously verified 766c6c42/6f710e57, so the hardware receipts above (RTX 4060 full suite, RX 7900 XT recheck of both review fixes) carry over modulo the new base; one more spot-check on the new head is welcome when convenient — @potatoe0100, @adrianmjim, either of you has the fastest boots for this.

The NaN hunk stays in this branch as agreed default unless @kotekompotek moves it into #815 — say the word and I'll drop it here. AI-assisted (orchestrator).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7165272962 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7165272962). Originally posted by [thiefyzheng](https://github.com/thiefyzheng) on 2026-11-25T14:26:07Z. --- Rebased onto #815's new head `a635392c6` (post its `71a769d7d` rebase) — our two commits are now `6b7bf490` and `bb8e1131`, conflict-free (this PR never touches `d3d12_com.cpp`, where #815's own conflict was). The commit contents are unchanged from the previously verified `766c6c42`/`6f710e57`, so the hardware receipts above (RTX 4060 full suite, RX 7900 XT recheck of both review fixes) carry over modulo the new base; one more spot-check on the new head is welcome when convenient — @potatoe0100, @adrianmjim, either of you has the fastest boots for this. The NaN hunk stays in this branch as agreed default unless @kotekompotek moves it into #815 — say the word and I'll drop it here. AI-assisted (orchestrator).
MoonEyes commented 2026-11-25 18:15:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-25T18:15:56Z.


Ran #1695 at head bb8e11314 on a depth-bounds-capable GPU.

Config: Windows 11 (26300), RTX 4060 desktop, NVIDIA 610.88 (depthBounds = true), MSVC 19.44, RelWithDebInfo, Vulkan SDK 1.4.363.0. Test targets only, no game files.

  • Builds with MSVC: d3d12_mesh_test, d3d12_vulkan_device_test, d3d12_com_test, d3d12_close_parity_test, d3d12_bundle_forbidden_test (0 errors).
  • ctest: d3d12_mesh, d3d12_vulkan_device, d3d12_com, d3d12_close_parity, d3d12_bundle_forbidden all pass. The new depth-bounds case does run here (not skipped): red inside OMSetDepthBounds(0, 1), clear blue inside (0.5, 1).
  • Guard demonstration (the one owed): with the resolve_type line put back to create_graphics(stream.graphics,&stream.ms,&stream.as) and d3d12_mesh_test rebuilt, the test still passes. So under plain ctest the new case does not catch the dropped flag; slot 86 takes the eager path, as in your finding 7161103050.
  • LEONIDA_PIPELINE_COMPILE=on-demand: fails at line 353: SUCCEEDED(console_hr) && console_pso.p, the same with and without the fix, before the depth-bounds case. That is consistent with 7161103050 on NVIDIA (I compared the PR head with and without the fix line, not main).

So: it compiles and nothing regresses in these 5 tests, but the lazy-path fix itself is not exercised by any test I ran. Not covered: full runtime build, full ctest, AMD/Intel.

AI-assisted: yes (Claude Code ran the tests)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7170671259 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7170671259). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-25T18:15:56Z. --- Ran #1695 at head `bb8e11314` on a depth-bounds-capable GPU. Config: Windows 11 (26300), RTX 4060 desktop, NVIDIA 610.88 (`depthBounds` = true), MSVC 19.44, RelWithDebInfo, Vulkan SDK 1.4.363.0. Test targets only, no game files. - Builds with MSVC: `d3d12_mesh_test`, `d3d12_vulkan_device_test`, `d3d12_com_test`, `d3d12_close_parity_test`, `d3d12_bundle_forbidden_test` (0 errors). - `ctest`: `d3d12_mesh`, `d3d12_vulkan_device`, `d3d12_com`, `d3d12_close_parity`, `d3d12_bundle_forbidden` all pass. The new depth-bounds case does run here (not skipped): red inside `OMSetDepthBounds(0, 1)`, clear blue inside `(0.5, 1)`. - Guard demonstration (the one owed): with the `resolve_type` line put back to `create_graphics(stream.graphics,&stream.ms,&stream.as)` and `d3d12_mesh_test` rebuilt, the test **still passes**. So under plain ctest the new case does not catch the dropped flag; slot 86 takes the eager path, as in your finding 7161103050. - `LEONIDA_PIPELINE_COMPILE=on-demand`: fails at `line 353: SUCCEEDED(console_hr) && console_pso.p`, the same with and without the fix, before the depth-bounds case. That is consistent with 7161103050 on NVIDIA (I compared the PR head with and without the fix line, not main). So: it compiles and nothing regresses in these 5 tests, but the lazy-path fix itself is not exercised by any test I ran. Not covered: full runtime build, full ctest, AMD/Intel. AI-assisted: yes (Claude Code ran the tests)
Tauwni commented 2026-11-27 13:23:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-27T13:23:00Z.


@thiefyzheng heads-up from RT-STATE-AUDIT-PIPELINE (issue #2464, part B): this PR is listed there for depth bounds and back-face stencil, but it carries needs rebase and conflicts with main (2859d0c9b). Once it's updated, I can run it on a Mac (Apple M3, under Wine) and report here. One thing worth knowing for it: MoltenVK and KosmicKrisp both lack depthBounds, so on Macs d3d12_vulkan_device.cpp:12096 refuses every depth-bounds PSO, and carrying the flag on more paths would turn more PSOs into refusals there (finding: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7216500497).

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7219409788 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7219409788). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-27T13:23:00Z. --- @thiefyzheng heads-up from RT-STATE-AUDIT-PIPELINE (issue #2464, part B): this PR is listed there for depth bounds and back-face stencil, but it carries *needs rebase* and conflicts with `main` (`2859d0c9b`). Once it's updated, I can run it on a Mac (Apple M3, under Wine) and report here. One thing worth knowing for it: MoltenVK and KosmicKrisp both lack `depthBounds`, so on Macs `d3d12_vulkan_device.cpp:12096` refuses every depth-bounds PSO, and carrying the flag on more paths would turn more PSOs into refusals there (finding: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7216500497). AI-assisted (Claude Code, Claude Opus 5.5).
thiefyzheng commented 2026-11-27 15:49:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by thiefyzheng on 2026-11-27T15:49:58Z.


Status for @Tauwni and whoever tests this next: #1695 is stacked on #815 (our two commits sit on #815 head a635392c6), and #815 itself is currently dirty against main (ec91d695c). Rebasing this PR first would not build without #815's changes, so it waits for #815's own rebase; once that lands we rebase onto it and re-run the 14 related tests. No change to the commits (6b7bf490d, bb8e11314) until then.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7222535796 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1695#issuecomment-7222535796). Originally posted by [thiefyzheng](https://github.com/thiefyzheng) on 2026-11-27T15:49:58Z. --- Status for @Tauwni and whoever tests this next: #1695 is stacked on #815 (our two commits sit on #815 head `a635392c6`), and #815 itself is currently `dirty` against `main` (`ec91d695c`). Rebasing this PR first would not build without #815's changes, so it waits for #815's own rebase; once that lands we rebase onto it and re-run the 14 related tests. No change to the commits (`6b7bf490d`, `bb8e11314`) until then. AI-assisted (Claude Code).
MoonEyes commented 2026-11-28 17:59:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T17:59:18Z.


Hi @thiefyzheng, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/shims/d3d12_com.cpp, runtime/shims/d3d12_com.h, runtime/shims/d3d12_vulkan_device.cpp, runtime/src/vulkan_backend.h, runtime/src/vulkan_replay.h, runtime/test/d3d12_mesh_test.cpp, runtime/test/d3d12_vulkan_device_test.cpp), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7243441225 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1695#issuecomment-7243441225). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T17:59:18Z. --- Hi @thiefyzheng, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/shims/d3d12_com.cpp`, `runtime/shims/d3d12_com.h`, `runtime/shims/d3d12_vulkan_device.cpp`, `runtime/src/vulkan_backend.h`, `runtime/src/vulkan_replay.h`, `runtime/test/d3d12_mesh_test.cpp`, `runtime/test/d3d12_vulkan_device_test.cpp`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
enlight3d commented 2026-11-29 12:33:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T12:33:40Z.


Run of #1695 on a native Windows GPU (NVIDIA RTX 3090, depthBounds supported). Synthetic tests only, no game files.

Heads: PR bb8e11314, main 8fb974878.
Merged or head-only: head-only. git merge --no-ff of the PR into main conflicts in runtime/shims/d3d12_com.cpp, runtime/shims/d3d12_com.h, runtime/shims/d3d12_vulkan_device.cpp, runtime/src/vulkan_backend.h, runtime/src/vulkan_replay.h, runtime/test/d3d12_mesh_test.cpp, runtime/test/d3d12_vulkan_device_test.cpp, so everything below ran on the PR head itself (detached at bb8e11314, which carries #815's commit).

Commands:

git checkout --detach pr-1695
cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
cmake --build runtime/build -j 8 --target gta6rt d3d12_mesh_test d3d12_vulkan_device_test d3d12_com_test d3d12_close_parity_test d3d12_bundle_forbidden_test
ctest -R "^<test>$" --output-on-failure -j1

Green (all Passed, none skipped): d3d12_mesh, d3d12_vulkan_device, d3d12_com, d3d12_close_parity, d3d12_bundle_forbidden.

Red:

  • Behavioural (the PR's own two commits, 6b7bf490d and bb8e11314, reverted in d3d12_vulkan_device.cpp and vulkan_replay.h, tests kept): not red. All five tests still pass, including d3d12_mesh. The new case's console stream carries a mesh shader, so it is created through the eager CreatePipelineState branch, not PipelineState::resolve_type, and the resolve_type change is not what the case measures. To check that the case is live, I passed nullptr for the extras in the eager call only: d3d12_mesh then fails at bounded_pixel(0.5f, 1.0f) == clear_blue. So the case guards the eager path (already in #815's commit) and does not fail for the resolve_type / cache-key / NaN changes in this PR. The cache-key and NaN changes have no red here either.
  • All non-test changes of the PR (the 7 files outside runtime/test, plus the docs) reverted to the merge base 71a769d7d, tests kept: build failure only, d3d12_com_test.cpp does not compile (rt::d3d12::depth_bounds missing). d3d12_mesh, d3d12_close_parity and d3d12_vulkan_device build and pass in that state, most likely because the depth-bounds block of d3d12_mesh is skipped there (DepthBoundsTestSupported is only reported with #815's changes); I did not trace that.

Link: no new imports vs the merge base 71a769d7d (gta6rt.exe built at both). Against current main 8fb974878 the only difference is api-ms-win-crt-stdio-l1-1-0.dll!__stdio_common_vswscanf, which the merge-base build already has, so it is not from this PR (main's own build does not import it).

Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, RelWithDebInfo, Ninja, Vulkan SDK 1.4.363.1.

Could you add a case that reaches PipelineState::resolve_type (a stream that is not created eagerly), so the PR's own change has a red/green? And the branch conflicts with current main in the 7 files above: could you merge main into it? Thanks.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7255900264 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1695#issuecomment-7255900264). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T12:33:40Z. --- Run of #1695 on a native Windows GPU (NVIDIA RTX 3090, depthBounds supported). Synthetic tests only, no game files. Heads: PR `bb8e11314`, main `8fb974878`. Merged or head-only: **head-only**. `git merge --no-ff` of the PR into main conflicts in `runtime/shims/d3d12_com.cpp`, `runtime/shims/d3d12_com.h`, `runtime/shims/d3d12_vulkan_device.cpp`, `runtime/src/vulkan_backend.h`, `runtime/src/vulkan_replay.h`, `runtime/test/d3d12_mesh_test.cpp`, `runtime/test/d3d12_vulkan_device_test.cpp`, so everything below ran on the PR head itself (detached at `bb8e11314`, which carries #815's commit). Commands: ``` git checkout --detach pr-1695 cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON cmake --build runtime/build -j 8 --target gta6rt d3d12_mesh_test d3d12_vulkan_device_test d3d12_com_test d3d12_close_parity_test d3d12_bundle_forbidden_test ctest -R "^<test>$" --output-on-failure -j1 ``` Green (all Passed, none skipped): `d3d12_mesh`, `d3d12_vulkan_device`, `d3d12_com`, `d3d12_close_parity`, `d3d12_bundle_forbidden`. Red: - Behavioural (the PR's own two commits, `6b7bf490d` and `bb8e11314`, reverted in `d3d12_vulkan_device.cpp` and `vulkan_replay.h`, tests kept): **not red**. All five tests still pass, including `d3d12_mesh`. The new case's console stream carries a mesh shader, so it is created through the eager `CreatePipelineState` branch, not `PipelineState::resolve_type`, and the `resolve_type` change is not what the case measures. To check that the case is live, I passed `nullptr` for the extras in the eager call only: `d3d12_mesh` then fails at `bounded_pixel(0.5f, 1.0f) == clear_blue`. So the case guards the eager path (already in #815's commit) and does not fail for the `resolve_type` / cache-key / NaN changes in this PR. The cache-key and NaN changes have no red here either. - All non-test changes of the PR (the 7 files outside `runtime/test`, plus the docs) reverted to the merge base `71a769d7d`, tests kept: build failure only, `d3d12_com_test.cpp` does not compile (`rt::d3d12::depth_bounds` missing). `d3d12_mesh`, `d3d12_close_parity` and `d3d12_vulkan_device` build and pass in that state, most likely because the depth-bounds block of `d3d12_mesh` is skipped there (`DepthBoundsTestSupported` is only reported with #815's changes); I did not trace that. Link: no new imports vs the merge base `71a769d7d` (gta6rt.exe built at both). Against current main `8fb974878` the only difference is `api-ms-win-crt-stdio-l1-1-0.dll!__stdio_common_vswscanf`, which the merge-base build already has, so it is not from this PR (main's own build does not import it). Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44, RelWithDebInfo, Ninja, Vulkan SDK 1.4.363.1. Could you add a case that reaches `PipelineState::resolve_type` (a stream that is not created eagerly), so the PR's own change has a red/green? And the branch conflicts with current main in the 7 files above: could you merge main into it? Thanks.
thiefyzheng commented 2026-12-01 00:24:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by thiefyzheng on 2026-12-01T00:24:43Z.


Follow-up investigation of @enlight3d's deferred-path request (local only; no branch change):

The existing mesh case is the wrong vehicle for the on-demand case because its earlier slot-86 mesh stream fails first. A clean test shape appears to be the existing synthetic VS harness in runtime/test/d3d12_depth24_draw_test.cpp, with VulkanDeviceInfo::prepare_on_bind = true, a valid slot-86 VS stream using D3D12_DEPTH_STENCIL_DESC1.DepthBoundsTestEnable, then reset/bind/draw so realization necessarily goes through PipelineState::resolve_type.

Suggested assertions on the existing depth triangle:

  • [0.5,1] at depth 0.25 must produce 0/4096 passes (shows deferred extras arrived);
  • [NaN,0.5] must produce 4096/4096 (shows NaN maps to zero);
  • two pending streams differing only in the depth-bounds flag should have different cached blobs (additional cache-key assertion, not a substitute for the draws).

Independent controls: drop &stream.extras only in resolve_type for the first red; revert only the single-key cache expression for the second; revert only NaN mapping for the third.

I have not implemented or claimed this green: this Linux host has no Windows compiler/Wine and CMake omits the D3D12 targets (No rule to make target 'd3d12_depth24_draw_test'). No replay-only test is being offered as a substitute. Dependency #815 is unchanged and this branch has not been rebased or pushed. AI-assisted source-path investigation.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7296303698 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1695#issuecomment-7296303698). Originally posted by [thiefyzheng](https://github.com/thiefyzheng) on 2026-12-01T00:24:43Z. --- Follow-up investigation of @enlight3d's deferred-path request (local only; no branch change): The existing mesh case is the wrong vehicle for the on-demand case because its earlier slot-86 mesh stream fails first. A clean test shape appears to be the existing synthetic **VS** harness in `runtime/test/d3d12_depth24_draw_test.cpp`, with `VulkanDeviceInfo::prepare_on_bind = true`, a valid slot-86 VS stream using `D3D12_DEPTH_STENCIL_DESC1.DepthBoundsTestEnable`, then reset/bind/draw so realization necessarily goes through `PipelineState::resolve_type`. Suggested assertions on the existing depth triangle: - `[0.5,1]` at depth 0.25 must produce 0/4096 passes (shows deferred extras arrived); - `[NaN,0.5]` must produce 4096/4096 (shows NaN maps to zero); - two pending streams differing only in the depth-bounds flag should have different cached blobs (additional cache-key assertion, not a substitute for the draws). Independent controls: drop `&stream.extras` only in `resolve_type` for the first red; revert only the single-key cache expression for the second; revert only NaN mapping for the third. I have **not** implemented or claimed this green: this Linux host has no Windows compiler/Wine and CMake omits the D3D12 targets (`No rule to make target 'd3d12_depth24_draw_test'`). No replay-only test is being offered as a substitute. Dependency #815 is unchanged and this branch has not been rebased or pushed. AI-assisted source-path investigation.
thiefyzheng commented 2026-12-01 11:09:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by thiefyzheng on 2026-12-01T11:09:11Z.


Rebased the two #1695 commits onto current canonical main da56079c9e plus a local rebase of dependency #815 (171c85b41b). New head: 651a3c21d8a72263c9d674869e5d2c56f23b14a3 (f746816544 + this commit).

The resolution preserves main's order-key/prewarm handling and ReplayStateCache, #815's clamp/empty-range rules, and this PR's deferred extras/back-stencil path, single-key cache hashing and D3D12 NaN-to-zero conversion. Range-diff maps both original commits one-to-one.

Focused portable checks (CPU-only, no game data): replay_state_cache_test and vk_command_replay_test build and pass 2/2; git diff --check and no-game-data checks pass. #815's separately verified stack had 6,721 semantic + 69 viewer tests passing and one CTest failure reproduced identically on main (vk_predicated_copy).

The requested deferred PipelineState::resolve_type VS regression is still NOT implemented here, because the native Windows/D3D12 target cannot compile or run on this host. No new off-target replay test is substituted. Native Windows/MSVC and depth-bounds GPU behavior remain unverified on this rebased head; the earlier deferred-VS design and three controls remain the next test step.

AI-assisted (Kimi K3.1 Pro).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7309242332 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1695#issuecomment-7309242332). Originally posted by [thiefyzheng](https://github.com/thiefyzheng) on 2026-12-01T11:09:11Z. --- Rebased the two #1695 commits onto current canonical main `da56079c9e` plus a local rebase of dependency #815 (`171c85b41b`). New head: `651a3c21d8a72263c9d674869e5d2c56f23b14a3` (`f746816544` + this commit). The resolution preserves main's order-key/prewarm handling and `ReplayStateCache`, #815's clamp/empty-range rules, and this PR's deferred extras/back-stencil path, single-key cache hashing and D3D12 NaN-to-zero conversion. Range-diff maps both original commits one-to-one. Focused portable checks (CPU-only, no game data): `replay_state_cache_test` and `vk_command_replay_test` build and pass 2/2; `git diff --check` and no-game-data checks pass. #815's separately verified stack had 6,721 semantic + 69 viewer tests passing and one CTest failure reproduced identically on main (`vk_predicated_copy`). The requested deferred `PipelineState::resolve_type` VS regression is still NOT implemented here, because the native Windows/D3D12 target cannot compile or run on this host. No new off-target replay test is substituted. Native Windows/MSVC and depth-bounds GPU behavior remain unverified on this rebased head; the earlier deferred-VS design and three controls remain the next test step. AI-assisted (Kimi K3.1 Pro).
aslan2142 commented 2026-12-01 16:36:59 +00:00 (Migrated from github.com)

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


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:7317900474 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1695#issuecomment-7317900474). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:36:59Z. --- 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!1695
No description provided.