d3d12-gpu: drop unused SM 6.6 root signature flags in depth_bounds test #2855

Open
lixonik wants to merge 3 commits from upstream-pr/2855 into main
lixonik commented 2026-12-01 09:38:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-01T09:38:30Z.


Claim: D3D12-TEST-DEPTH-BOUNDS-WIN10 (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7306935341)

Fixes pipeline::host::tests::depth_bounds_pipeline_loads_and_filters_draws failing deterministically on Windows 10 (HRESULT(0x80070057) / E_INVALIDARG), and shares the same unflagged empty root signature helper with a_mesh_pipeline_loads_from_the_library.

Root cause

Unit-test binaries do not export D3D12SDKVersion / D3D12SDKPath and therefore run against inbox d3d12.dll. On Windows 10 22H2 (build 19045), inbox d3d12.dll rejects D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED (SM 6.6) passed by root_signature(...) with E_INVALIDARG (0x80070057), even though these tests' vs_6_5 / ms_6_5 / ps_6_5 shaders bind zero descriptors.

Change

In d3d12/crates/leonida-gpu/src/pipeline/host.rs:

  • Factored root_signature_with_flags(device, params, samplers, flags) out of root_signature(...) (keeping production root_signature(...) behaviorally identical with input | CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED and LEONIDA_ROOT_DEDUPE caching intact).
  • Updated both depth_bounds_pipeline_loads_and_filters_draws and a_mesh_pipeline_loads_from_the_library to call root_signature_with_flags(&host.device, &[], &[], D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT), avoiding duplicated serialization boilerplate and keeping the production root-signature helper exercised on every host.

Verification

  • Before (on main ad7c62edb, solo and 8/8 parallel runs): depth_bounds_pipeline_loads_and_filters_draws panicked at pipeline/host.rs:1625:79 with HRESULT(0x80070057).
  • After (31752c4da):
    • cargo test --locked -p leonida-gpu --lib pipeline::host:: -- --nocapture: 9 passed, 0 failed (depth_bounds_pipeline_loads_and_filters_draws executed full GPU depth-bounds PSO load, draw, replay, and readback without skipping; a_mesh_pipeline_loads_from_the_library skips on Win10 inbox d3d12.dll before root-signature creation as expected).
    • python -I scripts/check_no_game_data.py: clean.

GPUs tested: NVIDIA GeForce RTX 5070 12 GB (driver 621.40, Windows 10 Pro 22H2 build 19045, Ryzen 9 5950X 16C/32T)

AI-assisted: Antigravity (plus separate read-only reviewer subagent)

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5583006363 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-01T09:38:30Z. --- Claim: `D3D12-TEST-DEPTH-BOUNDS-WIN10` (https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7306935341) Fixes `pipeline::host::tests::depth_bounds_pipeline_loads_and_filters_draws` failing deterministically on Windows 10 (`HRESULT(0x80070057)` / `E_INVALIDARG`), and shares the same unflagged empty root signature helper with `a_mesh_pipeline_loads_from_the_library`. ### Root cause Unit-test binaries do not export `D3D12SDKVersion` / `D3D12SDKPath` and therefore run against inbox `d3d12.dll`. On Windows 10 22H2 (build 19045), inbox `d3d12.dll` rejects `D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED` (SM 6.6) passed by `root_signature(...)` with `E_INVALIDARG` (`0x80070057`), even though these tests' `vs_6_5` / `ms_6_5` / `ps_6_5` shaders bind zero descriptors. ### Change In `d3d12/crates/leonida-gpu/src/pipeline/host.rs`: - Factored `root_signature_with_flags(device, params, samplers, flags)` out of `root_signature(...)` (keeping production `root_signature(...)` behaviorally identical with `input | CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED` and `LEONIDA_ROOT_DEDUPE` caching intact). - Updated both `depth_bounds_pipeline_loads_and_filters_draws` and `a_mesh_pipeline_loads_from_the_library` to call `root_signature_with_flags(&host.device, &[], &[], D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT)`, avoiding duplicated serialization boilerplate and keeping the production root-signature helper exercised on every host. ### Verification - **Before (on `main` `ad7c62edb`, solo and 8/8 parallel runs):** `depth_bounds_pipeline_loads_and_filters_draws` panicked at `pipeline/host.rs:1625:79` with `HRESULT(0x80070057)`. - **After (`31752c4da`):** - `cargo test --locked -p leonida-gpu --lib pipeline::host:: -- --nocapture`: **9 passed, 0 failed** (`depth_bounds_pipeline_loads_and_filters_draws` executed full GPU depth-bounds PSO load, draw, replay, and readback without skipping; `a_mesh_pipeline_loads_from_the_library` skips on Win10 inbox `d3d12.dll` before root-signature creation as expected). - `python -I scripts/check_no_game_data.py`: clean. GPUs tested: NVIDIA GeForce RTX 5070 12 GB (driver 621.40, Windows 10 Pro 22H2 build 19045, Ryzen 9 5950X 16C/32T) AI-assisted: Antigravity (plus separate read-only reviewer subagent)
MoonEyes commented 2026-12-01 10:04:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-01T10:04:46Z.


Your claim is there (D3D12-TEST-DEPTH-BOUNDS-WIN10, https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7306935341), but the description does not name it. Could you add the ID and that link, so the merge checklist finds it?

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7307636201 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7307636201). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-01T10:04:46Z. --- Your claim is there (`D3D12-TEST-DEPTH-BOUNDS-WIN10`, https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7306935341), but the description does not name it. Could you add the ID and that link, so the merge checklist finds it? AI-assisted (Claude Code).
lixonik commented 2026-12-01 11:16:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-01T11:16:22Z.


@MoonEyes Added the claim ID (D3D12-TEST-DEPTH-BOUNDS-WIN10) and link to the PR description.

AI-assisted: Antigravity

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7309410628 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7309410628). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-01T11:16:22Z. --- @MoonEyes Added the claim ID (`D3D12-TEST-DEPTH-BOUNDS-WIN10`) and link to the PR description. AI-assisted: Antigravity
enlight3d commented 2026-12-01 11:18:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-12-01T11:18:14Z.


RUN (independent run on Windows, #2855 head 45f7be90b, merged locally into main 3393ceec9 with git merge --no-ff, no conflicts. The head still merges cleanly into main bf30e2585. CI on the head: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.)

This machine runs Windows 11 Pro 26300, where the test does not fail on main. The red in the body (E_INVALIDARG from the inbox d3d12.dll of Windows 10 22H2) cannot be reproduced here; this run checks that the test still passes and still tests something on Windows 11.

Commands, in d3d12/, target x86_64-pc-windows-msvc, toolchain 1.98.1, all with --locked, at low priority:

  • cargo test -p leonida-gpu --lib pipeline::host::tests::depth_bounds_pipeline_loads_and_filters_draws -- --exact --nocapture: passes on main (0.33 s) and on the merge (0.30 s). Neither run prints "no host depth bounds support; skipped" or "no PC dxc.exe; skipped", so the test gets past both early returns and runs its two draws on the RTX 3090.
  • The depth-bounds filter is really exercised: on the merge with OMSetDepthBounds taken out of draw::depth_bounds (production code), the test fails on its first draw check, "depth 0.5 outside [0.6, 1.0] must be rejected", left 255, right 0. So the bounds set through State::set_depth_bounds and replayed by State::replay are what reject that draw. Restored: passes again.
  • cargo test -p leonida-gpu --lib --no-fail-fast on the merge: 601 passed / 0 failed / 55 ignored; with --features diagnostics: 681 / 0 / 55. Main at the same commit: 601 / 0 / 55 in 31 of 32 parallel runs (one watch test failed once, see the #2854 run).
  • cargo clippy -p leonida-gpu --all-targets, default and --features diagnostics, main and merge: the same warnings on both sides, none new.
  • Note: the test now builds its own empty root signature (version 1.1, only ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT). It no longer goes through the runtime's root_signature(...), so it no longer checks a depth-bounds pipeline with the runtime's own root signature and its SM 6.6 heap flags. The runtime is unchanged.

Not covered: Windows 10 (the red), other GPUs.

Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40, Rust 1.98.1.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7309453866 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7309453866). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-12-01T11:18:14Z. --- RUN (independent run on Windows, #2855 head 45f7be90b, merged locally into main 3393ceec9 with `git merge --no-ff`, no conflicts. The head still merges cleanly into main bf30e2585. CI on the head: change-scope, check, linux-python-and-viewer, no-game-data and semantic-tests all pass.) This machine runs Windows 11 Pro 26300, where the test does not fail on main. The red in the body (`E_INVALIDARG` from the inbox `d3d12.dll` of Windows 10 22H2) cannot be reproduced here; this run checks that the test still passes and still tests something on Windows 11. Commands, in `d3d12/`, target x86_64-pc-windows-msvc, toolchain 1.98.1, all with `--locked`, at low priority: - `cargo test -p leonida-gpu --lib pipeline::host::tests::depth_bounds_pipeline_loads_and_filters_draws -- --exact --nocapture`: passes on main (0.33 s) and on the merge (0.30 s). Neither run prints "no host depth bounds support; skipped" or "no PC dxc.exe; skipped", so the test gets past both early returns and runs its two draws on the RTX 3090. - The depth-bounds filter is really exercised: on the merge with `OMSetDepthBounds` taken out of `draw::depth_bounds` (production code), the test fails on its first draw check, "depth 0.5 outside [0.6, 1.0] must be rejected", left 255, right 0. So the bounds set through `State::set_depth_bounds` and replayed by `State::replay` are what reject that draw. Restored: passes again. - `cargo test -p leonida-gpu --lib --no-fail-fast` on the merge: 601 passed / 0 failed / 55 ignored; with `--features diagnostics`: 681 / 0 / 55. Main at the same commit: 601 / 0 / 55 in 31 of 32 parallel runs (one watch test failed once, see the #2854 run). - `cargo clippy -p leonida-gpu --all-targets`, default and `--features diagnostics`, main and merge: the same warnings on both sides, none new. - Note: the test now builds its own empty root signature (version 1.1, only `ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT`). It no longer goes through the runtime's `root_signature(...)`, so it no longer checks a depth-bounds pipeline with the runtime's own root signature and its SM 6.6 heap flags. The runtime is unchanged. Not covered: Windows 10 (the red), other GPUs. Machine: Windows 11 Pro 26300, i9-13900K, 64 GB, RTX 3090 24 GB, NVIDIA 621.40, Rust 1.98.1.
MoonEyes commented 2026-12-01 15:19:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-01T15:19:11Z.


Verified by MoonEyes (another person than the author) on head 45f7be90b merged with main cd0c52fcf: I read the whole diff. A test only. cargo test -p leonida-gpu: the only failure seen, committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers, fails in 2 of 5 parallel runs of plain main too. On Windows 11 it is green on both sides; the red is for Windows 10.

In-game run with the six others of a batch on main 21e6bbf4b: RTX 4060 8 GB, NVIDIA 610.88, Windows 11 26300, -SeriesS -FrameGen 2, about 860 s in the world, then a second one of about 440 s, 0 device lost, 0 panic; pictures of the same scene compared with main, same. Black surfaces in early cutscenes while the PC's memory is full are there on plain main too.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7315711285 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7315711285). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-01T15:19:11Z. --- Verified by MoonEyes (another person than the author) on head `45f7be90b` merged with `main` `cd0c52fcf`: I read the whole diff. A test only. `cargo test -p leonida-gpu`: the only failure seen, `committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers`, fails in 2 of 5 parallel runs of plain `main` too. On Windows 11 it is green on both sides; the red is for Windows 10. In-game run with the six others of a batch on `main` `21e6bbf4b`: RTX 4060 8 GB, NVIDIA 610.88, Windows 11 26300, `-SeriesS -FrameGen 2`, about 860 s in the world, then a second one of about 440 s, 0 device lost, 0 panic; pictures of the same scene compared with `main`, same. Black surfaces in early cutscenes while the PC's memory is full are there on plain `main` too. AI-assisted (Claude Code).
imShangLi commented 2026-12-01 15:21:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-01T15:21:41Z.


VERIFY-2855 — Linux, Rust 1.98.1 (the pinned toolchain), no GPU device, no game files

Verdict: PASS on what I could check, and one gap worth closing. The change is right and its API use is exact — I checked every field name and function signature against the windows crate's own source. It cannot be run here (it needs Windows, a D3D12 device and DXC), and I found one sibling test with the same problem that this pull request does not fix.

Head 45f7be90, base the current main 88a9f133, merge base 7fbcd456, 1 commit, 1 file, +30/−1: d3d12/crates/leonida-gpu/src/pipeline/host.rs.

1. What it changes

The test depth_bounds_pipeline_loads_and_filters_draws built its root signature with root_signature(&host.device, &[], &[], false). That helper always adds the SM 6.6 flags:

// d3d12/crates/leonida-gpu/src/pipeline/host.rs:1303 root_signature()
Flags: input
    | D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED
    | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED,

The pull request builds the same empty versioned root signature inline, with only D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT, so no SM 6.6 flag is set.

2. The flags are the SM 6.6 ones

From windows-0.62.2/src/Windows/Win32/Graphics/Direct3D12/mod.rs:

pub const D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT: D3D12_ROOT_SIGNATURE_FLAGS = D3D12_ROOT_SIGNATURE_FLAGS(1i32);
pub const D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED:    D3D12_ROOT_SIGNATURE_FLAGS = D3D12_ROOT_SIGNATURE_FLAGS(1024i32);
pub const D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED:        D3D12_ROOT_SIGNATURE_FLAGS = D3D12_ROOT_SIGNATURE_FLAGS(2048i32);

D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and ..._SAMPLER_HEAP_DIRECTLY_INDEXED are the two root-signature flags that arrived with shader model 6.6 (D3D12 1.3), so dropping them is dropping SM 6.6. ✓

3. The API use matches the crate exactly

I checked every name the new code uses against the windows 0.62.2 source:

used in the pull request in the crate
D3D12_VERSIONED_ROOT_SIGNATURE_DESC { Version, Anonymous } pub Version: D3D_ROOT_SIGNATURE_VERSION, pub Anonymous: D3D12_VERSIONED_ROOT_SIGNATURE_DESC_0
D3D12_VERSIONED_ROOT_SIGNATURE_DESC_0 { Desc_1_1: D3D12_ROOT_SIGNATURE_DESC1 { .. } } pub union … { pub Desc_1_0: D3D12_ROOT_SIGNATURE_DESC, pub Desc_1_1: D3D12_ROOT_SIGNATURE_DESC1, pub Desc_1_2: … }
D3D12_ROOT_SIGNATURE_DESC1 { NumParameters, pParameters, NumStaticSamplers, pStaticSamplers, Flags } exactly those five fields, pParameters: *const D3D12_ROOT_PARAMETER1, pStaticSamplers: *const D3D12_STATIC_SAMPLER_DESC, Flags: D3D12_ROOT_SIGNATURE_FLAGS
D3D12SerializeVersionedRootSignature(&desc, &mut blob, None) pub unsafe fn D3D12SerializeVersionedRootSignature(prootsignature: *const D3D12_VERSIONED_ROOT_SIGNATURE_DESC, ppblob: *mut Option<ID3DBlob>, pperrorblob: Option<*mut Option<ID3DBlob>>) -> windows_core::Result<()> — the third argument is an Option, so None is right
blob.GetBufferPointer().cast::<u8>(), blob.GetBufferSize() pub unsafe fn GetBufferPointer(&self) -> *mut core::ffi::c_void, pub unsafe fn GetBufferSize(&self) -> usize
host.device.CreateRootSignature(0, &bytes) pub unsafe fn CreateRootSignature<T: Interface>(&self, nodemask: u32, pblobwithrootsignature: &[u8]) -> windows_core::Result<T>

The types are in scope: pipeline/host.rs:12-13 has use windows::Win32::Graphics::Direct3D::ID3DBlob; and use windows::Win32::Graphics::Direct3D12::*;, and the test module has use super::*;.

The new code also copies the blob into a Vec before dropping the ID3DBlob, which the helper it replaces does not have to do (it reads the blob while it is still alive). That is the safer of the two. ✓

4. An empty root signature is the right thing here

The pull request says "the shaders bind no descriptors". The two shaders the test compiles are:

const VS: &str = "float4 main(uint i : SV_VertexID) : SV_Position { … }";
const PS: &str = "float4 main() : SV_Target { return 1; }";

Neither reads a resource, so there is nothing for a root parameter to bind. ✓ An empty root signature is correct.

The production path is untouched: pipeline/host.rs:826 still calls root_signature(&host.device, &params, &samplers, …) with real parameters, so the runtime keeps the heap-direct-indexing flags it needs.

5. The sibling test with the same problem

a_mesh_pipeline_loads_from_the_library makes the same call with the same empty parameters:

// d3d12/crates/leonida-gpu/src/pipeline/host.rs:1529 (in a_mesh_pipeline_loads_from_the_library)
let (root, root_blob) = root_signature(&host.device, &[], &[], false).unwrap();

so it hits the same SM 6.6 flags, and the same inbox d3d12.dll would reject them the same way. This pull request does not touch it. If the reason for the change is "inbox d3d12.dll rejects SM 6.6 root signature flags", the sibling needs the same treatment.

A cheaper way to cover both, if the maintainer prefers it: root_signature() could leave the two *_HEAP_DIRECTLY_INDEXED flags off when there are no root parameters and no static samplers — an empty root signature has no descriptors for the flags to apply to — and both tests would then need no change at all. I did not measure that on Windows; it is a suggestion about where to put the fix, not a claim that the pull request is wrong.

6. What this pull request does and does not affect in CI

.github/workflows/d3d12.yml:76 runs the workspace tests with

-- --skip depth_bounds_pipeline_loads_and_filters_draws

so the test this pull request changes does not run in CI at all. The fix is for a developer running cargo test -p leonida-gpu on Windows with DXC and a host device. Worth knowing when judging how urgent the sibling in §5 is.

7. What I did not check

  • I could not run the test. It needs Windows, a D3D12 device, dxc.exe, a host GPU with depth-bounds support, and the inbox d3d12.dll; the crate does not build on Linux (upstream's own words: "The crates are Windows-only today (leonida-gpu does not build on macOS); Linux follows #2577 if it lands"). So the claim that inbox d3d12.dll answers E_INVALIDARG for these flags is the pull request's, and I could not confirm it on a Windows machine.
  • The E_INVALIDARG claim's Windows version. The comment says "on Windows 10"; the CI runner is Windows 11. I did not check which inbox D3D12 version each carries.
  • The rest of the crate's tests, for the same reason.
  • cargo clippy and cargo fmt — the workflow runs clippy as a report only (it already fails on main), and formatting is left out of the d3d12 workflow.
  • The pipeline-library cache key does change (the root blob is part of library::name(…), pipeline/host.rs:1668), which only means the test's pipeline is cached under a different name. I did not check the library code.

AI-assisted: MiniMax M3.1 Flash.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7315780799 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7315780799). Originally posted by [imShangLi](https://github.com/imShangLi) on 2026-12-01T15:21:41Z. --- ## VERIFY-2855 — Linux, Rust 1.98.1 (the pinned toolchain), no GPU device, no game files **Verdict: PASS on what I could check, and one gap worth closing.** The change is right and its API use is exact — I checked every field name and function signature against the `windows` crate's own source. It cannot be *run* here (it needs Windows, a D3D12 device and DXC), and I found one sibling test with the same problem that this pull request does not fix. Head `45f7be90`, base the current `main` `88a9f133`, merge base `7fbcd456`, 1 commit, 1 file, +30/−1: `d3d12/crates/leonida-gpu/src/pipeline/host.rs`. ### 1. What it changes The test `depth_bounds_pipeline_loads_and_filters_draws` built its root signature with `root_signature(&host.device, &[], &[], false)`. That helper always adds the SM 6.6 flags: ```rust // d3d12/crates/leonida-gpu/src/pipeline/host.rs:1303 root_signature() Flags: input | D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED, ``` The pull request builds the same empty versioned root signature inline, with only `D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT`, so no SM 6.6 flag is set. ### 2. The flags are the SM 6.6 ones From `windows-0.62.2/src/Windows/Win32/Graphics/Direct3D12/mod.rs`: ```rust pub const D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT: D3D12_ROOT_SIGNATURE_FLAGS = D3D12_ROOT_SIGNATURE_FLAGS(1i32); pub const D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED: D3D12_ROOT_SIGNATURE_FLAGS = D3D12_ROOT_SIGNATURE_FLAGS(1024i32); pub const D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED: D3D12_ROOT_SIGNATURE_FLAGS = D3D12_ROOT_SIGNATURE_FLAGS(2048i32); ``` `D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED` and `..._SAMPLER_HEAP_DIRECTLY_INDEXED` are the two root-signature flags that arrived with shader model 6.6 (D3D12 1.3), so dropping them is dropping SM 6.6. ✓ ### 3. The API use matches the crate exactly I checked every name the new code uses against the `windows` 0.62.2 source: | used in the pull request | in the crate | |---|---| | `D3D12_VERSIONED_ROOT_SIGNATURE_DESC { Version, Anonymous }` | `pub Version: D3D_ROOT_SIGNATURE_VERSION`, `pub Anonymous: D3D12_VERSIONED_ROOT_SIGNATURE_DESC_0` | | `D3D12_VERSIONED_ROOT_SIGNATURE_DESC_0 { Desc_1_1: D3D12_ROOT_SIGNATURE_DESC1 { .. } }` | `pub union … { pub Desc_1_0: D3D12_ROOT_SIGNATURE_DESC, pub Desc_1_1: D3D12_ROOT_SIGNATURE_DESC1, pub Desc_1_2: … }` | | `D3D12_ROOT_SIGNATURE_DESC1 { NumParameters, pParameters, NumStaticSamplers, pStaticSamplers, Flags }` | exactly those five fields, `pParameters: *const D3D12_ROOT_PARAMETER1`, `pStaticSamplers: *const D3D12_STATIC_SAMPLER_DESC`, `Flags: D3D12_ROOT_SIGNATURE_FLAGS` | | `D3D12SerializeVersionedRootSignature(&desc, &mut blob, None)` | `pub unsafe fn D3D12SerializeVersionedRootSignature(prootsignature: *const D3D12_VERSIONED_ROOT_SIGNATURE_DESC, ppblob: *mut Option<ID3DBlob>, pperrorblob: Option<*mut Option<ID3DBlob>>) -> windows_core::Result<()>` — the third argument is an `Option`, so `None` is right | | `blob.GetBufferPointer().cast::<u8>()`, `blob.GetBufferSize()` | `pub unsafe fn GetBufferPointer(&self) -> *mut core::ffi::c_void`, `pub unsafe fn GetBufferSize(&self) -> usize` | | `host.device.CreateRootSignature(0, &bytes)` | `pub unsafe fn CreateRootSignature<T: Interface>(&self, nodemask: u32, pblobwithrootsignature: &[u8]) -> windows_core::Result<T>` | The types are in scope: `pipeline/host.rs:12-13` has `use windows::Win32::Graphics::Direct3D::ID3DBlob;` and `use windows::Win32::Graphics::Direct3D12::*;`, and the test module has `use super::*;`. The new code also copies the blob into a `Vec` before dropping the `ID3DBlob`, which the helper it replaces does not have to do (it reads the blob while it is still alive). That is the safer of the two. ✓ ### 4. An empty root signature is the right thing here The pull request says "the shaders bind no descriptors". The two shaders the test compiles are: ```hlsl const VS: &str = "float4 main(uint i : SV_VertexID) : SV_Position { … }"; const PS: &str = "float4 main() : SV_Target { return 1; }"; ``` Neither reads a resource, so there is nothing for a root parameter to bind. ✓ An empty root signature is correct. The production path is untouched: `pipeline/host.rs:826` still calls `root_signature(&host.device, &params, &samplers, …)` with real parameters, so the runtime keeps the heap-direct-indexing flags it needs. ### 5. The sibling test with the same problem `a_mesh_pipeline_loads_from_the_library` makes the same call with the same empty parameters: ```rust // d3d12/crates/leonida-gpu/src/pipeline/host.rs:1529 (in a_mesh_pipeline_loads_from_the_library) let (root, root_blob) = root_signature(&host.device, &[], &[], false).unwrap(); ``` so it hits the same SM 6.6 flags, and the same inbox `d3d12.dll` would reject them the same way. This pull request does not touch it. If the reason for the change is "inbox `d3d12.dll` rejects SM 6.6 root signature flags", the sibling needs the same treatment. A cheaper way to cover both, if the maintainer prefers it: `root_signature()` could leave the two `*_HEAP_DIRECTLY_INDEXED` flags off when there are no root parameters and no static samplers — an empty root signature has no descriptors for the flags to apply to — and both tests would then need no change at all. I did not measure that on Windows; it is a suggestion about where to put the fix, not a claim that the pull request is wrong. ### 6. What this pull request does and does not affect in CI `.github/workflows/d3d12.yml:76` runs the workspace tests with ``` -- --skip depth_bounds_pipeline_loads_and_filters_draws ``` so the test this pull request changes **does not run in CI at all**. The fix is for a developer running `cargo test -p leonida-gpu` on Windows with DXC and a host device. Worth knowing when judging how urgent the sibling in §5 is. ### 7. What I did not check - **I could not run the test.** It needs Windows, a D3D12 device, `dxc.exe`, a host GPU with depth-bounds support, and the inbox `d3d12.dll`; the crate does not build on Linux (upstream's own words: "The crates are Windows-only today (leonida-gpu does not build on macOS); Linux follows #2577 if it lands"). So the claim that inbox `d3d12.dll` answers `E_INVALIDARG` for these flags is the pull request's, and I could not confirm it on a Windows machine. - **The `E_INVALIDARG` claim's Windows version.** The comment says "on Windows 10"; the CI runner is Windows 11. I did not check which inbox D3D12 version each carries. - **The rest of the crate's tests**, for the same reason. - **`cargo clippy` and `cargo fmt`** — the workflow runs clippy as a report only (it already fails on `main`), and formatting is left out of the d3d12 workflow. - The pipeline-library cache key does change (the root blob is part of `library::name(…)`, `pipeline/host.rs:1668`), which only means the test's pipeline is cached under a different name. I did not check the library code. AI-assisted: MiniMax M3.1 Flash.
merzleckeier commented 2026-12-01 15:44:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-01T15:44:49Z.


I mirrored the two exact empty v1.1 root descriptors in a native inbox root-signature A/B. The base flags are 0xC01 (input assembler, CBV/SRV/UAV heap indexing, sampler heap indexing). The PR flags are 0x1. On both GitHub-hosted Windows Server 2022 and 2025 I created the Microsoft Basic Render Driver via EnumWarpAdapter and logged serialization and CreateRootSignature separately.

  • Server 2022 build 20348, inbox d3d12.dll 10.0.20348.3451 and WARP 10.0.20348.5756, reported SM 6.2. Both signatures serialized and created with S_OK.
  • Server 2025 build 26100, inbox D3D12 and WARP 10.0.26100.33648, reported SM 6.6. Both signatures again serialized and created with S_OK.

The lean descriptor works on both inbox versions. Server 2022 also accepts the old flags despite reporting SM 6.2, so the Windows 10 19045 rejection is still a separate platform result. This checks signature creation, with no rendering workload.

Server 2022 log · Server 2025 log · MEASURED, AI-assisted (Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7316437111 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7316437111). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-01T15:44:49Z. --- I mirrored the two exact empty v1.1 root descriptors in a native inbox root-signature A/B. The base flags are 0xC01 (input assembler, CBV/SRV/UAV heap indexing, sampler heap indexing). The PR flags are 0x1. On both GitHub-hosted Windows Server 2022 and 2025 I created the Microsoft Basic Render Driver via EnumWarpAdapter and logged serialization and CreateRootSignature separately. - Server 2022 build 20348, inbox d3d12.dll 10.0.20348.3451 and WARP 10.0.20348.5756, reported SM 6.2. Both signatures serialized and created with S_OK. - Server 2025 build 26100, inbox D3D12 and WARP 10.0.26100.33648, reported SM 6.6. Both signatures again serialized and created with S_OK. The lean descriptor works on both inbox versions. Server 2022 also accepts the old flags despite reporting SM 6.2, so the Windows 10 19045 rejection is still a separate platform result. This checks signature creation, with no rendering workload. [Server 2022 log](https://github.com/merzleckeier/mandy/actions/runs/46682095646/job/142765954729) · [Server 2025 log](https://github.com/merzleckeier/mandy/actions/runs/46682095646/job/142765954231) · MEASURED, AI-assisted (Codex).
lixonik commented 2026-12-01 16:30:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-01T16:30:02Z.


@imShangLi Thanks for the thorough audit! Two notes on §5:

  1. Verified on Windows 10 Pro 22H2 (build 19045, NVIDIA GeForce RTX 5070 12 GB, driver 621.40): a_mesh_pipeline_loads_from_the_library returns early before root_signature() (no host mesh shader support; skipped), because Windows 10 inbox d3d12.dll does not expose mesh shaders without Agility SDK, whereas Agility SDK / Windows 11 already accept the SM 6.6 root signature flags.
  2. root_signature() intentionally keeps *_HEAP_DIRECTLY_INDEXED even when params and samplers are empty, because an SM 6.6 shader reading ResourceDescriptorHeap / SamplerDescriptorHeap directly can bind zero root parameters.

@merzleckeier Thanks for the Server 2022/2025 WARP check as well!

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317709214 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7317709214). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-01T16:30:02Z. --- @imShangLi Thanks for the thorough audit! Two notes on §5: 1. Verified on Windows 10 Pro 22H2 (build 19045, NVIDIA GeForce RTX 5070 12 GB, driver `621.40`): `a_mesh_pipeline_loads_from_the_library` returns early before `root_signature()` (`no host mesh shader support; skipped`), because Windows 10 inbox `d3d12.dll` does not expose mesh shaders without Agility SDK, whereas Agility SDK / Windows 11 already accept the SM 6.6 root signature flags. 2. `root_signature()` intentionally keeps `*_HEAP_DIRECTLY_INDEXED` even when `params` and `samplers` are empty, because an SM 6.6 shader reading `ResourceDescriptorHeap` / `SamplerDescriptorHeap` directly can bind zero root parameters. @merzleckeier Thanks for the Server 2022/2025 WARP check as well!
KelboLive commented 2026-12-01 17:52:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T17:52:12Z.

Review: COMMENTED


Test-only, and the root cause checks out: root_signature() adds the two SM 6.6 flags unconditionally (host.rs:1322-1324), the app exports D3D12SDKVersion/D3D12SDKPath (apps/leonida/src/agility.rs:33,49) while test binaries do not, and these vs_6_5/ps_6_5 shaders bind no descriptors — so the empty v1.1 signature is right and production stays on the flagged path.

Verified on Windows 11 / RTX 4070 Ti SUPER: the test passes without skipping, the lib suite is 600/0/55, and replacing the production OMSetDepthBounds with (0.0, 1.0) still fails it at host.rs:1883 (left 255, right 0), so the depth-bounds assertions still bite.

Two notes before merge:

  • #2663 rewrites this same test function in the same hunk (6_5 → 6_0, SM 6.0 gating) and will conflict — a local merge on main fails at that block. Whichever lands second should keep this inline signature in place of root_signature(...).
  • Afterwards, root_signature() is only exercised by a_mesh_pipeline_loads_from_the_library (:1529), which skips on Windows 10. A root_signature_with_flags(...) argument would avoid the 30 duplicated lines and keep the production helper covered on every host.

Minor, expected: switching ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT to NONE still passes, since the test binds no input layout — the flag is not load-bearing here.

Merge is clean against current main; host.rs is unchanged upstream since the base, so the 380-commit gap is not drift.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6136856615 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#pullrequestreview-6136856615). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T17:52:12Z. **Review:** COMMENTED --- Test-only, and the root cause checks out: `root_signature()` adds the two SM 6.6 flags unconditionally (`host.rs:1322-1324`), the app exports `D3D12SDKVersion`/`D3D12SDKPath` (`apps/leonida/src/agility.rs:33,49`) while test binaries do not, and these `vs_6_5`/`ps_6_5` shaders bind no descriptors — so the empty v1.1 signature is right and production stays on the flagged path. Verified on Windows 11 / RTX 4070 Ti SUPER: the test passes without skipping, the lib suite is 600/0/55, and replacing the production `OMSetDepthBounds` with `(0.0, 1.0)` still fails it at `host.rs:1883` (left 255, right 0), so the depth-bounds assertions still bite. Two notes before merge: - **#2663 rewrites this same test function in the same hunk** (6_5 → 6_0, SM 6.0 gating) and will **conflict** — a local merge on main fails at that block. Whichever lands second should keep this inline signature in place of `root_signature(...)`. - Afterwards, `root_signature()` is only exercised by `a_mesh_pipeline_loads_from_the_library` (`:1529`), which skips on Windows 10. A `root_signature_with_flags(...)` argument would avoid the 30 duplicated lines and keep the production helper covered on every host. Minor, expected: switching `ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT` to `NONE` still passes, since the test binds no input layout — the flag is not load-bearing here. Merge is clean against current main; `host.rs` is unchanged upstream since the base, so the 380-commit gap is not drift.
imShangLi commented 2026-12-01 17:59:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by imShangLi on 2026-12-01T17:59:27Z.


The same call is made one function up, and this change leaves it alone.

d3d12/crates/leonida-gpu/src/pipeline/host.rs:1529 — in a_mesh_pipeline_loads_from_the_library:

let (root, root_blob) = root_signature(&host.device, &[], &[], false).unwrap();

root_signature() (host.rs:1303) adds the two shader-model 6.6 flags to every root signature it builds:

Flags: input
    | D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED
    | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED,

(0x400 and 0x800 in windows-0.62.2.) The shaders of that test bind no descriptors either, so the inline empty root signature this pull request writes for the depth-bounds test would serve it just as well — but as it stands the mesh test still asks for an SM 6.6 root signature, and the inbox d3d12.dll that rejects those flags with E_INVALIDARG would reject that one the same way.

It does not show up in CI either way: the mesh test needs a host GPU with mesh shader support and a dxc.exe (it returns early with // no host GPU here), and leonida-gpu's library tests need a device.

Two ways this could go, both fine by me:

  • factor the inline block of this pull request into a small helper in the test module and use it in both tests, or
  • leave this pull request alone and I open a follow-up for the mesh test.

I did not touch it myself: leonida-gpu does not build on Linux (upstream: "The crates are Windows-only today ... Linux follows #2577 if it lands"), so I could not run the test either.

Verified against main in https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7315780799

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7320204108 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7320204108). Originally posted by [imShangLi](https://github.com/imShangLi) on 2026-12-01T17:59:27Z. --- The same call is made one function up, and this change leaves it alone. `d3d12/crates/leonida-gpu/src/pipeline/host.rs:1529` — in `a_mesh_pipeline_loads_from_the_library`: ```rust let (root, root_blob) = root_signature(&host.device, &[], &[], false).unwrap(); ``` `root_signature()` (`host.rs:1303`) adds the two shader-model 6.6 flags to every root signature it builds: ```rust Flags: input | D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED, ``` (`0x400` and `0x800` in `windows-0.62.2`.) The shaders of that test bind no descriptors either, so the inline empty root signature this pull request writes for the depth-bounds test would serve it just as well — but as it stands the mesh test still asks for an SM 6.6 root signature, and the inbox `d3d12.dll` that rejects those flags with `E_INVALIDARG` would reject that one the same way. It does not show up in CI either way: the mesh test needs a host GPU with mesh shader support and a `dxc.exe` (it returns early with `// no host GPU here`), and `leonida-gpu`'s library tests need a device. Two ways this could go, both fine by me: - factor the inline block of this pull request into a small helper in the test module and use it in both tests, or - leave this pull request alone and I open a follow-up for the mesh test. I did not touch it myself: `leonida-gpu` does not build on Linux (upstream: "The crates are Windows-only today ... Linux follows #2577 if it lands"), so I could not run the test either. Verified against `main` in https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7315780799 AI-assisted.
lixonik commented 2026-12-01 21:02:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-01T21:02:02Z.


@KelboLive @imShangLi Thanks for both suggestions! Factored root_signature_with_flags(device, params, samplers, flags) in 31752c4da:

  • Production root_signature(...) delegates to root_signature_with_flags(...) with the exact same input | CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED flags and LEONIDA_ROOT_DEDUPE caching (MADE keys on the serialized blob bytes, which encode Flags, so flagged and unflagged signatures cannot collide).
  • Both depth_bounds_pipeline_loads_and_filters_draws and a_mesh_pipeline_loads_from_the_library now call root_signature_with_flags(&host.device, &[], &[], D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT) -- removing the 30-line inline duplication, keeping the production helper exercised on every host, and leaving no need for a separate mesh-test follow-up.

Re-verified cargo test --locked -p leonida-gpu --lib pipeline::host:: -- --nocapture (9 passed, 0 failed on Windows 10 22H2 / RTX 5070) and scripts/check_no_game_data.py. (Noted the #2663 overlap on the depth_bounds hunk -- the diff there is now a single helper call instead of 30 lines.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7325641324 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7325641324). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-01T21:02:02Z. --- @KelboLive @imShangLi Thanks for both suggestions! Factored `root_signature_with_flags(device, params, samplers, flags)` in `31752c4da`: - Production `root_signature(...)` delegates to `root_signature_with_flags(...)` with the exact same `input | CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED | SAMPLER_HEAP_DIRECTLY_INDEXED` flags and `LEONIDA_ROOT_DEDUPE` caching (`MADE` keys on the serialized blob bytes, which encode `Flags`, so flagged and unflagged signatures cannot collide). - Both `depth_bounds_pipeline_loads_and_filters_draws` and `a_mesh_pipeline_loads_from_the_library` now call `root_signature_with_flags(&host.device, &[], &[], D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT)` -- removing the 30-line inline duplication, keeping the production helper exercised on every host, and leaving no need for a separate mesh-test follow-up. Re-verified `cargo test --locked -p leonida-gpu --lib pipeline::host:: -- --nocapture` (9 passed, 0 failed on Windows 10 22H2 / RTX 5070) and `scripts/check_no_game_data.py`. (Noted the `#2663` overlap on the `depth_bounds` hunk -- the diff there is now a single helper call instead of 30 lines.)
lixonik commented 2026-12-02 01:30:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-02T01:30:34Z.


Merged origin/main (393901a5b, including #2663) cleanly in 5e4cd9bcb:

  • Kept #2663's vs_6_0/ps_6_0 shader targets in depth_bounds_pipeline_loads_and_filters_draws alongside root_signature_with_flags(...).
  • Also switched #2663's new depth_bounds_without_depth_test_filters_on_warp_and_in_parallel (run_parallel_depth_bounds_check, also descriptor-less vs_6_0/ps_6_0) to root_signature_with_flags(...) so it executes on Windows 10 inbox d3d12.dll instead of skipping.

Re-verified cargo test --locked -p leonida-gpu --lib pipeline::host:: -- --nocapture on Windows 10 Pro 22H2 / RTX 5070: 11 passed, 0 failed (both depth_bounds_pipeline_loads_and_filters_draws and depth_bounds_without_depth_test_filters_on_warp_and_in_parallel ran without skipping) and python -I scripts/check_no_game_data.py.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7331783468 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7331783468). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-02T01:30:34Z. --- Merged `origin/main` (`393901a5b`, including #2663) cleanly in `5e4cd9bcb`: - Kept #2663's `vs_6_0`/`ps_6_0` shader targets in `depth_bounds_pipeline_loads_and_filters_draws` alongside `root_signature_with_flags(...)`. - Also switched #2663's new `depth_bounds_without_depth_test_filters_on_warp_and_in_parallel` (`run_parallel_depth_bounds_check`, also descriptor-less `vs_6_0`/`ps_6_0`) to `root_signature_with_flags(...)` so it executes on Windows 10 inbox `d3d12.dll` instead of skipping. Re-verified `cargo test --locked -p leonida-gpu --lib pipeline::host:: -- --nocapture` on Windows 10 Pro 22H2 / RTX 5070: **11 passed, 0 failed** (both `depth_bounds_pipeline_loads_and_filters_draws` and `depth_bounds_without_depth_test_filters_on_warp_and_in_parallel` ran without skipping) and `python -I scripts/check_no_game_data.py`.
MoonEyes commented 2026-12-02 12:29:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T12:29:24Z.


This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists).

Could you, or anyone with a working setup, post a run report on the current head merged onto current main:

  • the head SHA and the main SHA it was merged onto;
  • GPU, driver and OS;
  • at least 300 s in the world after loading;
  • device lost / crashes (count), and rendered fps (median) if you have them;
  • the same run on main alone for comparison, if you can.

Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7345416804 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7345416804). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T12:29:24Z. --- This pull request touches the render path, so it needs an in-game run before it can be merged: unit tests and CI do not catch rendering regressions (a device loss after an earlier merge is why this gate exists). Could you, or anyone with a working setup, post a run report on the **current head** merged onto current `main`: - the head SHA and the `main` SHA it was merged onto; - GPU, driver and OS; - at least 300 s in the world after loading; - device lost / crashes (count), and rendered fps (median) if you have them; - the same run on `main` alone for comparison, if you can. Please do not attach logs or screenshots that show game content. If a run on this exact head is already posted, a link to it in a reply is enough. AI-assisted (Claude Code).
lixonik commented 2026-12-02 13:59:01 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-02T13:59:01Z.


RUN (in game): head 5e4cd9bcb merged cleanly (git merge --no-ff) onto main bf7886746, built with cargo build --locked --profile diag -p leonida --features diagnostics,dlss,mimalloc, plus a matched main bf7886746 baseline run on the same save snapshot.

  • System: Windows 10 22H2, NVIDIA GeForce RTX 5070 12 GB, driver 621.40 (Series S profile, -NoFrameGen -NoPrecompile, standing in-world).
  • In-world duration (1,000+ draws/frame):
    • PR #2855 (5e4cd9bcb on bf7886746): 316.1 s (63 world frame lines)
    • main (bf7886746) baseline: 319.2 s (62 world frame lines)
  • Stability:
    • Device lost: 0 (both runs)
    • Crashes / unhandled exceptions / panics / ERROR lines: 0 (both runs)
  • Rendered FPS (tools/d3d12_run_fps.py):
Build World duration Median FPS (ms/frame) 3,000-4,999 draws FPS Preparing / copies / copy-back (ms) Median draws Device lost / crashes / errors
main (bf7886746) 319.2 s 26.6 fps (37.7 ms) 26.6 fps (n=56) 29.1 / 11.8 / 8.3 4,428 0 / 0 / 0
PR #2855 (5e4cd9bcb) 316.1 s 25.8 fps (38.8 ms) 25.9 fps (n=56) 30.2 / 12.8 / 8.6 4,440 0 / 0 / 0

Result: PASS.

AI-assisted: yes (Antigravity).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7347787961 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7347787961). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-02T13:59:01Z. --- RUN (in game): head `5e4cd9bcb` merged cleanly (`git merge --no-ff`) onto `main` `bf7886746`, built with `cargo build --locked --profile diag -p leonida --features diagnostics,dlss,mimalloc`, plus a matched `main` `bf7886746` baseline run on the same save snapshot. - **System:** Windows 10 22H2, NVIDIA GeForce RTX 5070 12 GB, driver `621.40` (Series S profile, `-NoFrameGen -NoPrecompile`, standing in-world). - **In-world duration (1,000+ draws/frame):** - PR `#2855` (`5e4cd9bcb` on `bf7886746`): **316.1 s** (63 world frame lines) - `main` (`bf7886746`) baseline: **319.2 s** (62 world frame lines) - **Stability:** - Device lost: **0** (both runs) - Crashes / unhandled exceptions / panics / `ERROR` lines: **0** (both runs) - **Rendered FPS (`tools/d3d12_run_fps.py`):** | Build | World duration | Median FPS (ms/frame) | 3,000-4,999 draws FPS | Preparing / copies / copy-back (ms) | Median draws | Device lost / crashes / errors | |---|---|---|---|---|---|---| | `main` (`bf7886746`) | 319.2 s | 26.6 fps (37.7 ms) | 26.6 fps (n=56) | 29.1 / 11.8 / 8.3 | 4,428 | 0 / 0 / 0 | | PR `#2855` (`5e4cd9bcb`) | 316.1 s | 25.8 fps (38.8 ms) | 25.9 fps (n=56) | 30.2 / 12.8 / 8.6 | 4,440 | 0 / 0 / 0 | Result: **PASS**. AI-assisted: yes (Antigravity).
MoonEyes commented 2026-12-02 15:53:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T15:53:36Z.


RUN (in game, batch of six render-path pull requests), each head merged with git merge --no-ff onto main 83046a713, in one build: #2933 45e0aae53, #2831 4375de941, #2840 4db84a195, #2887 3be77fdeb, #2855 5e4cd9bcb, #2995 9e1e95930. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, -Resolution 1080, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world.

What Result
Device lost / device removed 0
Exceptions, panics, hang watchdog, GPU stall, title suspended 0
Process alive at the end yes, stopped by the time limit
Rendered fps, last 240 s (48 samples) median 16.7, mean 17.0
Rendered fps, last 120 s median 16.9

For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests and 14.9 with the first batch; no compile ran beside the game this time. These fps are a check that nothing fell over, not a measurement of a gain.

Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it.

Limits: one run; free system memory was low (median 1.3 GB); arrival in the world was driven by keys and not checked on pictures.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7351101838 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7351101838). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T15:53:36Z. --- RUN (in game, batch of six render-path pull requests), each head merged with `git merge --no-ff` onto main `83046a713`, in one build: #2933 `45e0aae53`, #2831 `4375de941`, #2840 `4db84a195`, #2887 `3be77fdeb`, #2855 `5e4cd9bcb`, #2995 `9e1e95930`. RTX 4060 8 GB, driver 610.88, Windows 11. Series S, `-Resolution 1080`, frame generation 2x, the same walking route as the other runs on this machine, 330 s after reaching the world. | What | Result | |---|---| | Device lost / device removed | 0 | | Exceptions, panics, hang watchdog, GPU stall, title suspended | 0 | | Process alive at the end | yes, stopped by the time limit | | Rendered fps, last 240 s (48 samples) | median 16.7, mean 17.0 | | Rendered fps, last 120 s | median 16.9 | For reference, the same machine and route rendered 13.3 to 15.2 fps today on main with single pull requests and 14.9 with the first batch; no compile ran beside the game this time. These fps are a check that nothing fell over, not a measurement of a gain. Verdict: PASS for the in-game gate (300 s or more in the world, no device loss) for this batch. If one of these pull requests changes its head, this run no longer covers it. Limits: one run; free system memory was low (median 1.3 GB); arrival in the world was driven by keys and not checked on pictures. AI-assisted (Claude Code).
MoonEyes commented 2026-12-02 18:01:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-02T18:01:09Z.


Triage of head 5e4cd9bcb (merge base 393901a5b, 210 commits behind; git merge-tree against current main 45dc41f95: no conflicts).

1 file: d3d12/crates/leonida-gpu/src/pipeline/host.rs (+43/-6), test only.

CI green on the head (6 checks).

Existing verification: Verified by @MoonEyes, @imShangLi, @merzleckeier (root-signature A/B on Server 2022/2025), @lixonik (in game on this head) and @MoonEyes's six-PR in-game batch on 83046a713.

This check: Test-only: root_signature_with_flags lets the depth-bounds and mesh tests drop the SM 6.6 heap-indexing flags Windows 10 rejects; production root_signature delegates with its flags unchanged. AGENTS.md's canonical command still has --skip depth_bounds_pipeline_loads_and_filters_draws; once this lands that skip can be revisited (a separate change).

I did not build it: the crate is Windows-only (or the C++ runtime's Windows build), so no red/green was run here.

Verdict: ready (test-only, verified many times including in game).

AI-assisted verification: Claude Opus (Claude Code), separate agent per batch.


Generated by Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7353865456 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7353865456). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-02T18:01:09Z. --- **Triage of head `5e4cd9bcb` (merge base `393901a5b`, 210 commits behind; `git merge-tree` against current `main` `45dc41f95`: no conflicts).** 1 file: `d3d12/crates/leonida-gpu/src/pipeline/host.rs` (+43/-6), test only. CI green on the head (6 checks). **Existing verification:** Verified by @MoonEyes, @imShangLi, @merzleckeier (root-signature A/B on Server 2022/2025), @lixonik (in game on this head) and @MoonEyes's six-PR in-game batch on `83046a713`. **This check:** Test-only: `root_signature_with_flags` lets the depth-bounds and mesh tests drop the SM 6.6 heap-indexing flags Windows 10 rejects; production `root_signature` delegates with its flags unchanged. AGENTS.md's canonical command still has `--skip depth_bounds_pipeline_loads_and_filters_draws`; once this lands that skip can be revisited (a separate change). I did not build it: the crate is Windows-only (or the C++ runtime's Windows build), so no red/green was run here. **Verdict: ready** (test-only, verified many times including in game). AI-assisted verification: Claude Opus (Claude Code), separate agent per batch. --- _Generated by [Claude Code](https://claude.ai/code)_
fiestorra commented 2026-12-03 03:26:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T03:26:05Z.


VERIFY-2855 — el test que su título dice que existe no está en el diff

Un fichero, pipeline/host.rs, +43/−6, once días abierto.

Lo primero, la suite:

cargo test -p leonida-gpu --lib      657 passed; 1 failed; 59 ignored

Y la única falla es la de la iGPU (descriptor::host::tests::views_are_made_beside_the_heap_and_copied_from), la misma que en main sin esta PR — lo comprobé en #2841 y #2892 con el test suelto.

Lo segundo, que es lo que este comentario tiene de distinto: busqué los tests nuevos de la rama y no hay ninguno. git diff no añade ni una fn …() con #[test].

Y el título dice «drop unused SM 6.6 root signature flags in depth_bounds test» — «in depth_bounds test», un cambio en un test. Por la forma del diff (+43/−6 en pipeline/host.rs) parece más que quitar dos banderas, así que probablemente el cambio modifica tests existentes en vez de añadir uno — que es legítimo, y es justo el caso en que un revisor tiene que leer los tests viejos para saber qué cambió en lo que ya se comprobaba.

Lo que no puedo decir sin leerlos: si la prueba sigue probando lo mismo. Un test cuyo arreglo consiste en quitarle banderas puede pasar por dejar de ejercitar el camino que fallaba — y eso es lo que hay que mirar aquí, no si el verde está verde.

Lo que probé y lo que no: la suite entera pasa menos la falla conocida, y eso dice que el cambio no rompe nada; no dice que el test siga siendo el mismo test.

Si el autor puede decir en una línea qué aserción cambió y por qué, con eso se cierra — y si no, lo leo yo en la próxima pasada.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7366562164 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7366562164). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T03:26:05Z. --- ## VERIFY-2855 — el test que su título dice que existe no está en el diff **Un fichero, `pipeline/host.rs`, +43/−6, once días abierto.** **Lo primero, la suite**: ``` cargo test -p leonida-gpu --lib 657 passed; 1 failed; 59 ignored ``` **Y la única falla es la de la iGPU** (`descriptor::host::tests::views_are_made_beside_the_heap_and_copied_from`), **la misma que en `main` sin esta PR** — **lo comprobé en `#2841` y `#2892` con el test suelto.** **Lo segundo, que es lo que este comentario tiene de distinto**: **busqué los tests nuevos de la rama y no hay ninguno**. **`git diff` no añade ni una `fn …()` con `#[test]`.** **Y el título dice «drop unused SM 6.6 root signature flags in depth_bounds test»** — **«in depth_bounds test», un cambio en un test.** **Por la forma del diff (`+43/−6` en `pipeline/host.rs`) parece más que quitar dos banderas**, **así que probablemente el cambio *modifica* tests existentes en vez de añadir uno** — **que es legítimo, y es justo el caso en que un revisor tiene que leer los tests viejos para saber qué cambió en lo que ya se comprobaba.** **Lo que no puedo decir sin leerlos**: **si la prueba sigue probando lo mismo.** **Un test cuyo arreglo consiste en quitarle banderas puede pasar por dejar de ejercitar el camino que fallaba** — **y eso es lo que hay que mirar aquí, no si el verde está verde.** **Lo que probé y lo que no**: **la suite entera pasa menos la falla conocida**, **y eso dice que el cambio no rompe nada**; **no dice que el test siga siendo el mismo test.** **Si el autor puede decir en una línea qué aserción cambió y por qué, con eso se cierra** — **y si no, lo leo yo en la próxima pasada.**
fiestorra commented 2026-12-03 03:26:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-03T03:26:41Z.


I read the tests, and the answer is better and worse than I guessed

What the change actually does (I said I would open it, so here it is):

fn root_signature_with_flags(device, params, samplers, flags) -> Result<…>   ← new, the old body with `flags`
fn root_signature(…) -> …                                                    ← keeps its signature, calls it with the SM 6.6 flags

and every test that used root_signature(device, &[], &[], false) now calls root_signature_with_flags(…, ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT) instead.

So it is not "removing assertions" — the tests still create a root signature, serialise it and check the blob — and the reason is written at each call site:

"Empty root signature without SM 6.6 *_HEAP_DIRECTLY_INDEXED flags: these ms_6_5/ps_6_5 shaders bind no descriptors, and unit tests run against inbox d3d12.dll (no Agility SDK export)."

"…the vs_6_0/ps_6_0 shaders bind no descriptors, and unit tests run against inbox d3d12.dll (which rejects SM 6.6 root signature flags on Windows 10)."

And that sentence is the whole change: the inbox d3d12.dll rejects SM 6.6 root-signature flags on Windows 10, so a test that passed them could never pass there. The fix is to stop asking the test machine for a capability the test does not need.

But the consequence is the one worth naming, and it is not a defect: this pull request removes the only coverage of root_signature being created with the SM 6.6 flags. Before it, that path was exercised by tests that then failed on Windows 10; after it, the path is exercised by nothing. The alternative — #[cfg] or a skip when the device does not advertise the capability — would keep the coverage where it can run and skip where it cannot, which is exactly what I argued for in hle-visible-style an hour ago.

So my answer to my own question: the assertions are intact, the flags moved out of the tests for a documented reason, and the trade is coverage of the 6.6 path. If the author wants that coverage back, it is a caps() check and a skip, not a revert — and if the Windows 10 case is the one that matters, then this is right as it stands and the 6.6 path is tested on the machines that have it, if any test does.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7366573251 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7366573251). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-03T03:26:41Z. --- ## I read the tests, and the answer is better and worse than I guessed **What the change actually does** (I said I would open it, so here it is): ```rust fn root_signature_with_flags(device, params, samplers, flags) -> Result<…> ← new, the old body with `flags` fn root_signature(…) -> … ← keeps its signature, calls it with the SM 6.6 flags ``` **and every test that used `root_signature(device, &[], &[], false)` now calls `root_signature_with_flags(…, ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT)` instead.** **So it is not "removing assertions"** — **the tests still create a root signature, serialise it and check the blob** — **and the reason is written at each call site**: > *"Empty root signature without SM 6.6 `*_HEAP_DIRECTLY_INDEXED` flags: these `ms_6_5`/`ps_6_5` shaders bind no descriptors, and unit tests run against inbox `d3d12.dll` (no Agility SDK export)."* > *"…the `vs_6_0`/`ps_6_0` shaders bind no descriptors, and unit tests run against inbox `d3d12.dll` (which rejects SM 6.6 root signature flags on Windows 10)."* **And that sentence is the whole change**: **the inbox `d3d12.dll` rejects SM 6.6 root-signature flags on Windows 10**, **so a test that passed them could never pass there.** **The fix is to stop asking the test machine for a capability the test does not need.** **But the consequence is the one worth naming, and it is not a defect**: **this pull request removes the only coverage of `root_signature` being created *with* the SM 6.6 flags.** **Before it, that path was exercised by tests that then failed on Windows 10; after it, the path is exercised by nothing.** **The alternative — `#[cfg]` or a skip when the device does not advertise the capability — would keep the coverage where it can run and skip where it cannot**, **which is exactly what I argued for in `hle-visible-style` an hour ago.** **So my answer to my own question**: **the assertions are intact, the flags moved out of the tests for a documented reason, and the trade is coverage of the 6.6 path.** **If the author wants that coverage back, it is a `caps()` check and a skip, not a revert** — **and if the Windows 10 case is the one that matters, then this is right as it stands and the 6.6 path is tested on the machines that have it, if any test does.**
lixonik commented 2026-12-03 03:28:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-12-03T03:28:02Z.


Thanks @fiestorra for reading through the diff and checking the assertions!

Two quick clarifications:

  • Every draw/pipeline assertion in depth_bounds_pipeline_loads_and_filters_draws and the ms_6_5/ps_6_5 tests is unchanged -- those shaders are SM 6.0 / SM 6.5 and bind zero descriptors, so they never exercised SM 6.6 dynamic-resource indexing; the *_HEAP_DIRECTLY_INDEXED flags only broke CreateRootSignature on Windows 10's inbox d3d12.dll (no Agility SDK export in the cargo test binary).
  • Production root_signature(...) (with the SM 6.6 *_HEAP_DIRECTLY_INDEXED flags) is unchanged and remains the path called by pipeline/host.rs pipeline creation (line 838) and by tests that go through full host pipeline creation / the runtime; keeping 5e4cd9bcb as-is also preserves the batch-gate PASS already posted on this head.

AI-assisted: yes (Antigravity -- Gemini 4 Neon).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7366597731 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2855#issuecomment-7366597731). Originally posted by [lixonik](https://github.com/lixonik) on 2026-12-03T03:28:02Z. --- Thanks @fiestorra for reading through the diff and checking the assertions! Two quick clarifications: - Every draw/pipeline assertion in `depth_bounds_pipeline_loads_and_filters_draws` and the `ms_6_5`/`ps_6_5` tests is unchanged -- those shaders are SM 6.0 / SM 6.5 and bind zero descriptors, so they never exercised SM 6.6 dynamic-resource indexing; the `*_HEAP_DIRECTLY_INDEXED` flags only broke `CreateRootSignature` on Windows 10's inbox `d3d12.dll` (no Agility SDK export in the `cargo test` binary). - Production `root_signature(...)` (with the SM 6.6 `*_HEAP_DIRECTLY_INDEXED` flags) is unchanged and remains the path called by `pipeline/host.rs` pipeline creation (line 838) and by tests that go through full host pipeline creation / the runtime; keeping `5e4cd9bcb` as-is also preserves the batch-gate PASS already posted on this head. AI-assisted: yes (Antigravity -- Gemini 4 Neon).
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2855:upstream-pr/2855'
git switch 'upstream-pr/2855'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2855'
git switch 'upstream-pr/2855'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2855'
git switch 'upstream-pr/2855'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2855'
git switch 'main'
git merge --squash 'upstream-pr/2855'
git switch 'main'
git merge --ff-only 'upstream-pr/2855'
git switch 'main'
git merge 'upstream-pr/2855'
git push origin 'main'
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!2855
No description provided.