d3d12: a depth-bounds test without a DSV is dropped, not refused (RT-STATE-DEPTH-BOUNDS-NO-DSV) #2474

Closed
Tyrannys wants to merge 1 commit from upstream-pr/2474 into main
Tyrannys commented 2026-11-27 15:52:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tyrannys on 2026-11-27T15:52:27Z.


Claimed in the coordination issue as: RT-STATE-DEPTH-BOUNDS-NO-DSV (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7222238523)

What and why

Item 7 of @kevincommits' RT-STATE-AUDIT-PIPELINE finding in #1608 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7221587976), part of #2464 Part B. Thanks for the audit.

create_graphics (runtime/shims/d3d12_vulkan_device.cpp) kept DEPTH_STENCIL1/2 DepthBoundsTestEnable when the PSO has no depth-stencil format. Such a PSO was:

  • refused (E_NOTIMPL) on a device without the depthBounds feature, and
  • elsewhere built with depthBoundsTestEnable and a dynamic VK_DYNAMIC_STATE_DEPTH_BOUNDS, but no depth attachment.

With no depth there is nothing to test against the bounds. The native path (d3d12_xs_native_pso.h) already strips depth state without a DSV. So the test is now dropped when DSVFormat == DXGI_FORMAT_UNKNOWN, before the feature check and the pipeline state are built. A PSO with a DSV is unchanged: it still needs depthBounds.

Tested

Windows 11, MSVC (VS 18), Vulkan SDK 1.4.341, RelWithDebInfo, on main ec91d695c.

  • d3d12_pso_validation_test (its layer device enables no depthBounds): a stream PSO with DEPTH_STENCIL1 DepthBoundsTestEnable = TRUE and no DSV must be made, and the same with a D32_FLOAT DSV must still be refused with E_NOTIMPL. With main's d3d12_vulkan_device.cpp the first check fails (E_NOTIMPL, "depth-bounds tests need depthBounds, which the device lacks"); with the fix both pass.
  • d3d12_mesh_test had the same case without a DSV and expected E_NOTIMPL on devices without the feature, which is the behaviour being fixed. It now adds a D32_FLOAT DSV to that stream, so the "refused without the feature" branch still tests the refusal, and checks the no-DSV stream is made on any device.
  • ctest -R "^(d3d12_mesh|d3d12_mesh_heavy_cache|d3d12_pso_validation|pso_stream|d3d12_draw)$": 5/5 pass; d3d12_mesh, d3d12_pso_validation and d3d12_draw also pass with LEONIDA_VK_VALIDATION=1.
  • scripts/check_no_game_data.py: clean.

GPUs tested: profile M: NVIDIA GeForce RTX 4070 SUPER, 12 GB, desktop, driver 621.01, Windows 11

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5529453504 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2474). Originally posted by [Tyrannys](https://github.com/Tyrannys) on 2026-11-27T15:52:27Z. --- Claimed in the coordination issue as: RT-STATE-DEPTH-BOUNDS-NO-DSV (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7222238523) ### What and why Item 7 of @kevincommits' `RT-STATE-AUDIT-PIPELINE` finding in #1608 (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7221587976), part of #2464 Part B. Thanks for the audit. `create_graphics` (`runtime/shims/d3d12_vulkan_device.cpp`) kept `DEPTH_STENCIL1/2` `DepthBoundsTestEnable` when the PSO has no depth-stencil format. Such a PSO was: - refused (`E_NOTIMPL`) on a device without the `depthBounds` feature, and - elsewhere built with `depthBoundsTestEnable` and a dynamic `VK_DYNAMIC_STATE_DEPTH_BOUNDS`, but no depth attachment. With no depth there is nothing to test against the bounds. The native path (`d3d12_xs_native_pso.h`) already strips depth state without a DSV. So the test is now dropped when `DSVFormat == DXGI_FORMAT_UNKNOWN`, before the feature check and the pipeline state are built. A PSO with a DSV is unchanged: it still needs `depthBounds`. ### Tested Windows 11, MSVC (VS 18), Vulkan SDK 1.4.341, RelWithDebInfo, on `main` `ec91d695c`. - `d3d12_pso_validation_test` (its layer device enables no `depthBounds`): a stream PSO with `DEPTH_STENCIL1` `DepthBoundsTestEnable = TRUE` and no DSV must be made, and the same with a `D32_FLOAT` DSV must still be refused with `E_NOTIMPL`. With `main`'s `d3d12_vulkan_device.cpp` the first check fails (`E_NOTIMPL`, "depth-bounds tests need depthBounds, which the device lacks"); with the fix both pass. - `d3d12_mesh_test` had the same case without a DSV and expected `E_NOTIMPL` on devices without the feature, which is the behaviour being fixed. It now adds a `D32_FLOAT` DSV to that stream, so the "refused without the feature" branch still tests the refusal, and checks the no-DSV stream is made on any device. - `ctest -R "^(d3d12_mesh|d3d12_mesh_heavy_cache|d3d12_pso_validation|pso_stream|d3d12_draw)$"`: 5/5 pass; `d3d12_mesh`, `d3d12_pso_validation` and `d3d12_draw` also pass with `LEONIDA_VK_VALIDATION=1`. - `scripts/check_no_game_data.py`: clean. GPUs tested: profile M: NVIDIA GeForce RTX 4070 SUPER, 12 GB, desktop, driver 621.01, Windows 11 AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Tauwni commented 2026-11-27 16:17:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-27T16:17:44Z.


Tested on a Mac under Wine. This is the case Macs hit on every depth-bounds PSO, since MoltenVK (and KosmicKrisp) lack depthBounds:

Tree d3d12_pso_validation d3d12_mesh
main pass skip (no mesh shaders)
this PR's tests on main, no fix fail: FAIL [stream: depth bounds without a DSV]: layer returned 0x80004001, expected S_OK (line 474: no_dsv == S_OK) skip
main + this PR pass skip

So on a device without depthBounds, a depth-bounds PSO with no DSV went from refused (E_NOTIMPL) to created. A PSO that does have a DSV is still refused there (d3d12_vulkan_device.cpp depthBounds check), as before.

GPUs tested: Apple M3 (profile S), macOS 26.5.1, Wine 11.0 (WineHQ macOS build) with its MoltenVK 1.4.1, clang-cl/lld-link 23.1.6 cross build, main ec91d695c. No game files. MEASURED, 1 run each.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7223089880 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2474#issuecomment-7223089880). Originally posted by [Tauwni](https://github.com/Tauwni) on 2026-11-27T16:17:44Z. --- Tested on a Mac under Wine. This is the case Macs hit on every depth-bounds PSO, since MoltenVK (and KosmicKrisp) lack `depthBounds`: | Tree | `d3d12_pso_validation` | `d3d12_mesh` | |---|---|---| | `main` | pass | skip (no mesh shaders) | | this PR's tests on `main`, no fix | **fail**: `FAIL [stream: depth bounds without a DSV]: layer returned 0x80004001, expected S_OK` (`line 474: no_dsv == S_OK`) | skip | | `main` + this PR | pass | skip | So on a device without `depthBounds`, a depth-bounds PSO with no DSV went from refused (`E_NOTIMPL`) to created. A PSO that does have a DSV is still refused there (`d3d12_vulkan_device.cpp` depthBounds check), as before. GPUs tested: Apple M3 (profile S), macOS 26.5.1, Wine 11.0 (WineHQ macOS build) with its MoltenVK 1.4.1, clang-cl/lld-link 23.1.6 cross build, `main` `ec91d695c`. No game files. MEASURED, 1 run each. AI-assisted (Claude Code, Claude Opus 5.5).
djrolfes commented 2026-11-27 17:15:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by djrolfes on 2026-11-27T17:15:04Z.


Independent Linux/Wine + NVIDIA check at head cdf2db2df (merged cleanly onto origin/main c0201a806 alongside #2480, #2478, #2477, #2476).

  • Environment: Linux 7.2.15, wine-11.22, clang-cl + xwin cross-build, NVIDIA GeForce RTX 3070 Ti 8 GB, driver 620.73.04, Ryzen 7 5800X, 32 GB RAM. No game files.
  • CTest:
    • d3d12_pso_validation: passed (5.95 s) on RTX 3070 Ti under Wine.
    • d3d12_mesh: passed (6.12 s), d3d12_mesh_heavy_cache: passed (6.15 s).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7224196962 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2474#issuecomment-7224196962). Originally posted by [djrolfes](https://github.com/djrolfes) on 2026-11-27T17:15:04Z. --- Independent Linux/Wine + NVIDIA check at head `cdf2db2df` (merged cleanly onto `origin/main` `c0201a806` alongside `#2480`, `#2478`, `#2477`, `#2476`). - **Environment:** Linux `7.2.15`, `wine-11.22`, `clang-cl` + `xwin` cross-build, NVIDIA GeForce RTX 3070 Ti 8 GB, driver `620.73.04`, Ryzen 7 5800X, 32 GB RAM. No game files. - **CTest:** - `d3d12_pso_validation`: **passed** (`5.95 s`) on RTX 3070 Ti under Wine. - `d3d12_mesh`: **passed** (`6.12 s`), `d3d12_mesh_heavy_cache`: **passed** (`6.15 s`). AI-assisted.
MoonEyes commented 2026-11-27 18:40:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T18:40:46Z.


Tested for #2464 as Aslanek asked: unit tests and a game run on my machine; CI ignored for now as asked.

RUN pr2474-court | 2026-11-27 | MoonEyes | AI-assisted: Claude Code (Claude Opus 5.5)
BASE:        main ec91d695c + PR #2474 (head cdf2db2df), merged locally without conflict, nothing pushed | shaders: main's own translation
MACHINE:     RTX 4060 8 GB, desktop, only GPU, display attached | NVIDIA 610.88 | Windows 11 Pro 26300 | Ryzen 5 3600 | 32 GB | Windows GPU timeout at the default (2 s)
RECIPE:      short recipe: docs/running.md Windows NVIDIA recipe, pipeline cache warm, 330 s cap, scripted button presses from 60 s | build RelWithDebInfo, only the PR's targets built
TESTS:
  - d3d12_mesh_test (ctest d3d12_mesh, d3d12_mesh_heavy_cache): pass on the PR | fails on main: yes (exit 1, a depth-bounds pipeline without a depth-stencil view is refused)
  - d3d12_pso_validation_test: pass on the PR | fails on main: yes (exit 1, the same create does not return S_OK)
GAME:        session=1 at 95 s | world entered at 150 s | last window >= 1 img/s ends at 236 s | 0 frames after world entry + 240 s | end: stopped by my local stall guard at 236 s (no new frame line for 180 s; a compute pipeline build of 11.3 s in the log, another in progress), not by the cap | device loss: no (no fault report) | private RAM max 16957 MB
COMPARED TO: w77 (main ec91d695c, same short recipe): session=1 at 145 s, world at 195 s, last window >= 1 img/s at 293 s, private RAM max 16043 MB, ended by the time limit (337 s)
             w79 (main, same short recipe): world at 200 s, last window >= 1 img/s at 286 s, private RAM max 16583 MB, ended by the time limit (350 s)
             one run each (n=1); on main the spread of world entry on this recipe is about 165 to 200 s, so no conclusion on timings
VERDICT:     unit tests pass and fail on main; game reached the world, stopped by the stall guard, no device loss; inconclusive for the game (n=1)

Reading (marked):

  • MEASURED: the display stops after the world is entered (86 s after world entry for the last window >= 1 img/s here; 98 s on w77, 86 s on w79). Present on main too, not caused by this PR (finding https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7224692645).
  • MEASURED: the run was ended by my local stall guard, not by a crash or a device loss. A stall guard end is not comparable with the time-limit end of the main runs; compare the last-window figure, not the end time. I do not attribute the stop to this PR.
  • The game logs of this run were deleted by a disk cleanup before this write-up; the figures above were extracted before that and cannot be re-checked from the logs now.

Limits: one machine, one run for the PR, one run for each main witness.

AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7225748852 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2474#issuecomment-7225748852). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-27T18:40:46Z. --- Tested for #2464 as Aslanek asked: unit tests and a game run on my machine; CI ignored for now as asked. ``` RUN pr2474-court | 2026-11-27 | MoonEyes | AI-assisted: Claude Code (Claude Opus 5.5) BASE: main ec91d695c + PR #2474 (head cdf2db2df), merged locally without conflict, nothing pushed | shaders: main's own translation MACHINE: RTX 4060 8 GB, desktop, only GPU, display attached | NVIDIA 610.88 | Windows 11 Pro 26300 | Ryzen 5 3600 | 32 GB | Windows GPU timeout at the default (2 s) RECIPE: short recipe: docs/running.md Windows NVIDIA recipe, pipeline cache warm, 330 s cap, scripted button presses from 60 s | build RelWithDebInfo, only the PR's targets built TESTS: - d3d12_mesh_test (ctest d3d12_mesh, d3d12_mesh_heavy_cache): pass on the PR | fails on main: yes (exit 1, a depth-bounds pipeline without a depth-stencil view is refused) - d3d12_pso_validation_test: pass on the PR | fails on main: yes (exit 1, the same create does not return S_OK) GAME: session=1 at 95 s | world entered at 150 s | last window >= 1 img/s ends at 236 s | 0 frames after world entry + 240 s | end: stopped by my local stall guard at 236 s (no new frame line for 180 s; a compute pipeline build of 11.3 s in the log, another in progress), not by the cap | device loss: no (no fault report) | private RAM max 16957 MB COMPARED TO: w77 (main ec91d695c, same short recipe): session=1 at 145 s, world at 195 s, last window >= 1 img/s at 293 s, private RAM max 16043 MB, ended by the time limit (337 s) w79 (main, same short recipe): world at 200 s, last window >= 1 img/s at 286 s, private RAM max 16583 MB, ended by the time limit (350 s) one run each (n=1); on main the spread of world entry on this recipe is about 165 to 200 s, so no conclusion on timings VERDICT: unit tests pass and fail on main; game reached the world, stopped by the stall guard, no device loss; inconclusive for the game (n=1) ``` Reading (marked): - MEASURED: the display stops after the world is entered (86 s after world entry for the last window >= 1 img/s here; 98 s on w77, 86 s on w79). Present on main too, not caused by this PR (finding https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7224692645). - MEASURED: the run was ended by my local stall guard, not by a crash or a device loss. A stall guard end is not comparable with the time-limit end of the main runs; compare the last-window figure, not the end time. I do not attribute the stop to this PR. - The game logs of this run were deleted by a disk cleanup before this write-up; the figures above were extracted before that and cannot be re-checked from the logs now. Limits: one machine, one run for the PR, one run for each main witness. AI-assisted (Claude Code, Claude Opus 5.5)
timbot103 commented 2026-11-28 02:02:21 +00:00 (Migrated from github.com)

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


Reviewed at head cdf2db2df on Windows 11 (MSVC 2022 19.44) with dual-GPU Vulkan validation (LEONIDA_VK_VALIDATION=1, Vulkan SDK 1.4.363.0).

Verification

  • Built d3d12_pso_validation_test and d3d12_mesh_test.
  • d3d12_pso_validation_test (LEONIDA_VK_VALIDATION=1): PASS (62 layer checks, 100 host comparisons across 2 host devices) on both NVIDIA GeForce RTX 5080 (616.64) and AMD Radeon(TM) Graphics (25.10.30.02), 0 validation errors.
  • d3d12_mesh_test (LEONIDA_VK_VALIDATION=1): passed on RTX 5080 (0 validation errors); on AMD Radeon, all mesh/PSO checks passed and only the pre-existing mixed.GSInvocations == 0 statistics check at line 780 failed (unrelated to this PR).

Notes

  • Clearing effective depth-bounds enable when DSVFormat == DXGI_FORMAT_UNKNOWN before feature validation and metadata storage (d3d12_vulkan_device.cpp:11775-11815, 12295-12347, 12470-12474, 17939) while still enforcing the feature for typed DSVs matches the DirectX Depth Bounds spec.

Approve.

AI-assisted review + local MSVC/dual-GPU verification.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7232086625 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2474#issuecomment-7232086625). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-28T02:02:21Z. --- Reviewed at head `cdf2db2df` on Windows 11 (MSVC 2022 `19.44`) with dual-GPU Vulkan validation (`LEONIDA_VK_VALIDATION=1`, Vulkan SDK `1.4.363.0`). ### Verification - Built `d3d12_pso_validation_test` and `d3d12_mesh_test`. - `d3d12_pso_validation_test` (`LEONIDA_VK_VALIDATION=1`): **PASS (62 layer checks, 100 host comparisons across 2 host devices)** on both **NVIDIA GeForce RTX 5080** (`616.64`) and **AMD Radeon(TM) Graphics** (`25.10.30.02`), 0 validation errors. - `d3d12_mesh_test` (`LEONIDA_VK_VALIDATION=1`): **passed** on **RTX 5080** (0 validation errors); on **AMD Radeon**, all mesh/PSO checks passed and only the pre-existing `mixed.GSInvocations == 0` statistics check at line 780 failed (unrelated to this PR). ### Notes - Clearing effective depth-bounds enable when `DSVFormat == DXGI_FORMAT_UNKNOWN` before feature validation and metadata storage (`d3d12_vulkan_device.cpp:11775-11815`, `12295-12347`, `12470-12474`, `17939`) while still enforcing the feature for typed DSVs matches the DirectX Depth Bounds spec. Approve. AI-assisted review + local MSVC/dual-GPU verification.
lixonik commented 2026-11-28 10:37:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-28T10:37:24Z.

Review: APPROVED


Reviewed cdf2db2df and tested the new depth-bounds-without-DSV cases on live Vulkan.

Code audit:

  • runtime/shims/d3d12_vulkan_device.cpp: clearing depth_bounds when desc.DSVFormat == DXGI_FORMAT_UNKNOWN matches D3D12 / native PSO behavior (no depth attachment to bounds-test) instead of refusing PSO creation on devices without depthBounds.
  • Tests in d3d12_pso_validation_test.cpp (section 5b) and d3d12_mesh_test.cpp cover both the no-DSV drop and the with-DSV rejection/behavior.

Verification (Windows 11, MSVC 19.44, Ninja Release, LEONIDA_VK_VALIDATION=1):

  • Built d3d12_pso_validation_test and d3d12_mesh_test.
  • ctest -R '^d3d12_mesh$': 1/1 passed.
  • d3d12_pso_validation: both new section 5b checks (stream: depth bounds without a DSV -> S_OK and D32_FLOAT -> E_NOTIMPL) passed; the binary later failed on the unrelated pre-existing host-D3D12 parity check gfx: Flags=DYNAMIC_DEPTH_BIAS (layer 0x00000000 != host 0x80070057, inbox d3d12.dll on this machine rejects D3D12_PIPELINE_STATE_FLAG_DYNAMIC_DEPTH_BIAS).
  • python -I scripts/check_no_game_data.py: passed.

GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341, VK_LAYER_KHRONOS_validation 1.4.363).

AI-assisted (Antigravity, Gemini).

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6097267925 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2474#pullrequestreview-6097267925). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-28T10:37:24Z. **Review:** APPROVED --- Reviewed `cdf2db2df` and tested the new depth-bounds-without-DSV cases on live Vulkan. Code audit: - `runtime/shims/d3d12_vulkan_device.cpp`: clearing `depth_bounds` when `desc.DSVFormat == DXGI_FORMAT_UNKNOWN` matches D3D12 / native PSO behavior (no depth attachment to bounds-test) instead of refusing PSO creation on devices without `depthBounds`. - Tests in `d3d12_pso_validation_test.cpp` (section 5b) and `d3d12_mesh_test.cpp` cover both the no-DSV drop and the with-DSV rejection/behavior. Verification (Windows 11, MSVC 19.44, Ninja Release, `LEONIDA_VK_VALIDATION=1`): - Built `d3d12_pso_validation_test` and `d3d12_mesh_test`. - `ctest -R '^d3d12_mesh$'`: 1/1 passed. - `d3d12_pso_validation`: both new section 5b checks (`stream: depth bounds without a DSV` -> `S_OK` and `D32_FLOAT` -> `E_NOTIMPL`) passed; the binary later failed on the unrelated pre-existing host-D3D12 parity check `gfx: Flags=DYNAMIC_DEPTH_BIAS` (`layer 0x00000000 != host 0x80070057`, inbox `d3d12.dll` on this machine rejects `D3D12_PIPELINE_STATE_FLAG_DYNAMIC_DEPTH_BIAS`). - `python -I scripts/check_no_game_data.py`: passed. GPUs tested: NVIDIA GeForce RTX 5070 12 GB (Windows 11, driver 610.88, Vulkan 1.4.341, `VK_LAYER_KHRONOS_validation` 1.4.363). AI-assisted (Antigravity, Gemini).
zmasi commented 2026-11-28 23:02:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:02:18Z.


#2474 | head cdf2db2dfc (merged cleanly with main adfb3821a2) | ctest --test-dir runtime/build -C RelWithDebInfo -R "^(d3d12_pso_validation|d3d12_mesh|d3d12_mesh_heavy_cache|pso_stream|d3d12_draw)$" --output-on-failure (LEONIDA_VK_VALIDATION=1) | red on main: d3d12_pso_validation fails (FAIL [stream: depth bounds without a DSV]: layer returned 0x80004001, expected S_OK, line 474: no_dsv == S_OK) | green on PR+main: 5/5 CTests (d3d12_pso_validation, d3d12_mesh, d3d12_mesh_heavy_cache, pso_stream, d3d12_draw) pass on RTX 3090 in 3.14 s with 0 Khronos validation errors; check_no_game_data.py 0 violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247155102 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2474#issuecomment-7247155102). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T23:02:18Z. --- #2474 | head cdf2db2dfccf70798b22042f695ef6e764c17da2 (merged cleanly with main adfb3821a23612263c1c5b195453ed01c4c114db) | `ctest --test-dir runtime/build -C RelWithDebInfo -R "^(d3d12_pso_validation|d3d12_mesh|d3d12_mesh_heavy_cache|pso_stream|d3d12_draw)$" --output-on-failure` (`LEONIDA_VK_VALIDATION=1`) | red on main: `d3d12_pso_validation` fails (`FAIL [stream: depth bounds without a DSV]: layer returned 0x80004001, expected S_OK`, `line 474: no_dsv == S_OK`) | green on PR+main: `5/5` CTests (`d3d12_pso_validation`, `d3d12_mesh`, `d3d12_mesh_heavy_cache`, `pso_stream`, `d3d12_draw`) pass on RTX 3090 in `3.14 s` with `0` Khronos validation errors; `check_no_game_data.py` `0` violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes
timbot103 commented 2026-11-29 04:28:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-29T04:28:55Z.

Review: COMMENTED


Reviewed head cdf2db2df by static inspection only. No builds, tests, or GPU runs.

  • runtime/shims/d3d12_vulkan_device.cpp:11814 clears the common DEPTH_STENCIL1/2 flag for DXGI_FORMAT_UNKNOWN before feature validation, Vulkan state construction, and replay metadata storage. This bypasses an unnecessary feature refusal while preserving the gate for depth-capable formats, consistent with VUID-VkPipelineDepthStencilStateCreateInfo-depthBoundsTestEnable-00598. The console stencil-plane enum passes the PSO's aspect check and still reaches that gate. The layer exposes that enum as a shader-readable plane without DSV support (runtime/shims/d3d12_vulkan_device.cpp:19968).
  • A typed PSO drawn with no DSV uses the existing unbound-depth variant (runtime/src/vulkan_replay.h:2861), which uses undefined depth and stencil attachment formats. Replay still sets the dynamic bounds for a typed PSO that enables them, satisfying the draw-time state requirement in VUID 07836. The unbound-depth bit distinguishes variants within each PSO, and the Vulkan caches receive the effective pipeline create info.
  • The PSO validation test covers creation with an unknown format and rejection with D32_FLOAT when the shim's feature flag is false. Both changed tests use the existing Windows C++20 build path, including the clang-cl cross-build from Linux.
  • Minor coverage gap at runtime/test/d3d12_mesh_test.cpp:362. The mesh fixture leaves info.features.depthBounds zero even on a Vulkan device that enables the feature, so the D32_FLOAT case always takes the refusal branch. Set info.features.depthBounds = d.enabled.depthBounds and check that OPTIONS2 reports the same value so a capable device exercises the success branch.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6101400720 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2474#pullrequestreview-6101400720). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-29T04:28:55Z. **Review:** COMMENTED --- Reviewed head `cdf2db2df` by static inspection only. No builds, tests, or GPU runs. - `runtime/shims/d3d12_vulkan_device.cpp:11814` clears the common DEPTH_STENCIL1/2 flag for `DXGI_FORMAT_UNKNOWN` before feature validation, Vulkan state construction, and replay metadata storage. This bypasses an unnecessary feature refusal while preserving the gate for depth-capable formats, consistent with `VUID-VkPipelineDepthStencilStateCreateInfo-depthBoundsTestEnable-00598`. The console stencil-plane enum passes the PSO's aspect check and still reaches that gate. The layer exposes that enum as a shader-readable plane without DSV support (`runtime/shims/d3d12_vulkan_device.cpp:19968`). - A typed PSO drawn with no DSV uses the existing unbound-depth variant (`runtime/src/vulkan_replay.h:2861`), which uses undefined depth and stencil attachment formats. Replay still sets the dynamic bounds for a typed PSO that enables them, satisfying the draw-time state requirement in VUID 07836. The unbound-depth bit distinguishes variants within each PSO, and the Vulkan caches receive the effective pipeline create info. - The PSO validation test covers creation with an unknown format and rejection with `D32_FLOAT` when the shim's feature flag is false. Both changed tests use the existing Windows C++20 build path, including the clang-cl cross-build from Linux. - **Minor coverage gap** at `runtime/test/d3d12_mesh_test.cpp:362`. The mesh fixture leaves `info.features.depthBounds` zero even on a Vulkan device that enables the feature, so the `D32_FLOAT` case always takes the refusal branch. Set `info.features.depthBounds = d.enabled.depthBounds` and check that OPTIONS2 reports the same value so a capable device exercises the success branch. AI-assisted.
enlight3d commented 2026-11-29 15:17:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T15:17:31Z.


RUN #2474 (depth-bounds test without a DSV)

  • Heads: PR head cdf2db2dfccf70798b22042f695ef6e764c17da2, main bd643e46e784daf6bf3a45d09f0ec20e669c4ddb.
  • Merged locally with main (git merge --no-ff), no conflicts, nothing pushed.
  • Commands:
    • cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON
    • cmake --build runtime/build -j 6 --target d3d12_pso_validation_test d3d12_mesh_test gta6rt
    • ctest --test-dir runtime/build -C RelWithDebInfo -R "^(d3d12_pso_validation|d3d12_mesh|d3d12_mesh_heavy_cache)$" --output-on-failure -j1 (once as is, once with LEONIDA_VK_VALIDATION=1)
  • Red (behavioural): same tests, PR tests kept, runtime/shims/d3d12_vulkan_device.cpp reverted to main's version. The API does not change, so this is a real behavioural red, not a build failure. 0 of 3 pass:
    • d3d12_pso_validation: FAIL [stream: depth bounds without a DSV]: layer returned 0x80004001, expected S_OK (line 474: no_dsv == S_OK)
    • d3d12_mesh and d3d12_mesh_heavy_cache: line 359: SUCCEEDED(create(device.p, bad, no_dsv)) && no_dsv.p
  • Green (PR merged into main): 3 of 3 pass, none skipped, both without and with LEONIDA_VK_VALIDATION=1.
  • Link: gta6rt.exe built from the merged tree has no new imports vs main (693 DLL!symbol entries, identical list, from dumpbin /imports).
  • Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44.
  • Prep notes by TheGeogeo's review session.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257972725 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2474#issuecomment-7257972725). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T15:17:31Z. --- RUN #2474 (depth-bounds test without a DSV) - Heads: PR head `cdf2db2dfccf70798b22042f695ef6e764c17da2`, main `bd643e46e784daf6bf3a45d09f0ec20e669c4ddb`. - Merged locally with main (`git merge --no-ff`), no conflicts, nothing pushed. - Commands: - `cmake -S runtime -B runtime/build -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLEONIDA_REQUIRE_VULKAN=ON` - `cmake --build runtime/build -j 6 --target d3d12_pso_validation_test d3d12_mesh_test gta6rt` - `ctest --test-dir runtime/build -C RelWithDebInfo -R "^(d3d12_pso_validation|d3d12_mesh|d3d12_mesh_heavy_cache)$" --output-on-failure -j1` (once as is, once with `LEONIDA_VK_VALIDATION=1`) - Red (behavioural): same tests, PR tests kept, `runtime/shims/d3d12_vulkan_device.cpp` reverted to main's version. The API does not change, so this is a real behavioural red, not a build failure. 0 of 3 pass: - `d3d12_pso_validation`: `FAIL [stream: depth bounds without a DSV]: layer returned 0x80004001, expected S_OK` (`line 474: no_dsv == S_OK`) - `d3d12_mesh` and `d3d12_mesh_heavy_cache`: `line 359: SUCCEEDED(create(device.p, bad, no_dsv)) && no_dsv.p` - Green (PR merged into main): 3 of 3 pass, none skipped, both without and with `LEONIDA_VK_VALIDATION=1`. - Link: gta6rt.exe built from the merged tree has no new imports vs main (693 DLL!symbol entries, identical list, from `dumpbin /imports`). - Machine: RTX 3090 24 GB, NVIDIA 621.40, Windows 11 Pro 10.0.26300, MSVC 19.44. - Prep notes by TheGeogeo's review session.
ammonium231 commented 2026-11-30 16:11:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ammonium231 on 2026-11-30T16:11:25Z.


RTX 3090 / 621.40, validation on, cdf2db2df merged onto main c38c9e6a4: d3d12_pso_validation PASS (62 layer checks, 100 host comparisons across 2 host devices) (main 60 layer checks, 100 host comparisons, also PASS). d3d12_mesh and d3d12_mesh_heavy_cache exit 0 on both: 4096 pixels matched, 9 stream PSOs refused as invalid, 2 as not implemented. No validation errors.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284260946 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2474#issuecomment-7284260946). Originally posted by [ammonium231](https://github.com/ammonium231) on 2026-11-30T16:11:25Z. --- RTX 3090 / 621.40, validation on, cdf2db2df merged onto main c38c9e6a4: d3d12_pso_validation PASS (62 layer checks, 100 host comparisons across 2 host devices) (main 60 layer checks, 100 host comparisons, also PASS). d3d12_mesh and d3d12_mesh_heavy_cache exit 0 on both: 4096 pixels matched, 9 stream PSOs refused as invalid, 2 as not implemented. No validation errors.
aslan2142 commented 2026-12-01 16:44:57 +00:00 (Migrated from github.com)

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


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