Skip depth_bounds_pipeline_loads_and_filters_draws when host lacks SM 6.6 #1051

Open
github-bot wants to merge 3 commits from github-bot/gh-1051 into main AGit
Owner

@⁠meganegga on GitHub · 2026-11-25 17:34 UTC · original
meganegga:main → main · +5 −1 · 2 files · 3 commits · open

root_signature sets D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED and D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED, which require Shader Model 6.6.

On GPUs that support DepthBoundsTest but lack Shader Model 6.6, depth_bounds_pipeline_loads_and_filters_draws previously passed the host.depth_bounds() check and then panicked in root_signature with E_INVALIDARG (0x80070057).

This adds the same host.mesh_shaders() (SM 6.6) guard used in a_mesh_pipeline_loads_from_the_library so cargo test --workspace succeeds on older hardware.

**@⁠meganegga** on GitHub · 2026-11-25 17:34 UTC · [original](https://github.com/fxceless/victory-fork/pull/1051) `meganegga:main` → `main` · +5 −1 · 2 files · 3 commits · open `root_signature` sets `D3D12_ROOT_SIGNATURE_FLAG_CBV_SRV_UAV_HEAP_DIRECTLY_INDEXED` and `D3D12_ROOT_SIGNATURE_FLAG_SAMPLER_HEAP_DIRECTLY_INDEXED`, which require Shader Model 6.6. On GPUs that support `DepthBoundsTest` but lack Shader Model 6.6, `depth_bounds_pipeline_loads_and_filters_draws` previously passed the `host.depth_bounds()` check and then panicked in `root_signature` with `E_INVALIDARG (0x80070057)`. This adds the same `host.mesh_shaders()` (SM 6.6) guard used in `a_mesh_pipeline_loads_from_the_library` so `cargo test --workspace` succeeds on older hardware.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:56:39 +00:00
Author
Owner

@⁠HAL9000RELOADED on GitHub · 2026-11-25 19:29 UTC · original

Windows 10 data for this and #692, which change the same test. RX 7900 XTX, Windows 10 Pro 22H2 with the in-box D3D12 runtime (SM 6.5), main d510ee4, 5 runs each of cargo test -p victory-gpu --lib depth_bounds:

tree result
main FAILED 5/5 (HRESULT(0x80070057) from the root signature, see #850)
main + this PR ok 5/5, but skipped: no host shader model 6.6 support; skipped
main + #692 ok 5/5, and the test runs (its root signature has no bindless flags)

With the Agility runtime (#402), this PR runs the test and it passes. So on a Windows 10 machine without Agility, #692 keeps the depth-bounds check that this PR skips. Since they touch the same test, only one of them is needed.

**@⁠HAL9000RELOADED** on GitHub · 2026-11-25 19:29 UTC · [original](https://github.com/fxceless/victory-fork/pull/1051#issuecomment-7172369325) Windows 10 data for this and #692, which change the same test. RX 7900 XTX, Windows 10 Pro 22H2 with the in-box D3D12 runtime (SM 6.5), main `d510ee4`, 5 runs each of `cargo test -p victory-gpu --lib depth_bounds`: | tree | result | |---|---| | main | FAILED 5/5 (`HRESULT(0x80070057)` from the root signature, see #850) | | main + this PR | ok 5/5, but skipped: `no host shader model 6.6 support; skipped` | | main + #692 | ok 5/5, and the test runs (its root signature has no bindless flags) | With the Agility runtime (#402), this PR runs the test and it passes. So on a Windows 10 machine without Agility, #692 keeps the depth-bounds check that this PR skips. Since they touch the same test, only one of them is needed.
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 20:00 UTC · original

How it ended, with a correction to the check above: the software flag alone isn't enough on the runner.

With DXGI_ADAPTER_FLAG_SOFTWARE as the only test, the runner still failed at the same assertion (run 45688368007), so its adapter doesn't carry that flag. Matching Microsoft's PCI vendor id as well, which WARP and the Basic Render Driver both use, makes the skip trigger. The Tests job then passes (run 45690059730: depth_bounds_pipeline_loads_and_filters_draws ... ok, 197 passed, 0 failed):

// WARP or the Basic Render Driver (Microsoft's PCI vendor 0x1414)
let software = host.adapter.as_ref()
    .and_then(|a| unsafe { a.GetDesc1() }.ok())
    .is_some_and(|d| d.VendorId == 0x1414 || d.Flags & DXGI_ADAPTER_FLAG_SOFTWARE.0 as u32 != 0);

The test also prints the adapter's name, vendor and flags before it decides, so a run that still fails shows which device it was. On a card nothing changes: the RTX 5080 here runs the test in full and passes.

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

**@⁠tippythetaidum** on GitHub · 2026-11-25 20:00 UTC · [original](https://github.com/fxceless/victory-fork/pull/1051#issuecomment-7173068602) How it ended, with a correction to the check above: the software flag alone isn't enough on the runner. With `DXGI_ADAPTER_FLAG_SOFTWARE` as the only test, the runner still failed at the same assertion (run 45688368007), so its adapter doesn't carry that flag. Matching Microsoft's PCI vendor id as well, which WARP and the Basic Render Driver both use, makes the skip trigger. The Tests job then passes (run 45690059730: `depth_bounds_pipeline_loads_and_filters_draws ... ok`, 197 passed, 0 failed): ```rust // WARP or the Basic Render Driver (Microsoft's PCI vendor 0x1414) let software = host.adapter.as_ref() .and_then(|a| unsafe { a.GetDesc1() }.ok()) .is_some_and(|d| d.VendorId == 0x1414 || d.Flags & DXGI_ADAPTER_FLAG_SOFTWARE.0 as u32 != 0); ``` The test also prints the adapter's name, vendor and flags before it decides, so a run that still fails shows which device it was. On a card nothing changes: the RTX 5080 here runs the test in full and passes. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠tippythetaidum on GitHub · 2026-11-25 19:48 UTC · original · edited 2026-11-25 20:01 UTC

A data point from GitHub's Windows runner (no card, so the host device is WARP): with this PR, the test still fails, one step later.

WARP reports shader model 6.6 and the depth-bounds feature, so neither skip triggers. The test then fails at its first draw check:

panicked at crates\victory-gpu\src\pipeline\host.rs:1320:9:
assertion `left == right` failed: depth 0.5 outside [0.6, 1.0] must be rejected
  left: 255
 right: 0

The test turns the depth test itself off (DepthEnable: false) and relies on the depth bounds test alone. On a card the draw is culled; on WARP it comes through. In a build of my own I skip the test on the software adapter (DXGI_ADAPTER_FLAG_SOFTWARE on the host's adapter, the same check queue2_tests uses), with a message that says why. With that, this PR and #982 in the same tree, the runner's test step is running now; I'll say here how it ends. If you'd like that in this PR, here is the check (update: on the runner this flag alone did not catch the adapter; see the next comment for the check that does):

let software = host.adapter.as_ref()
    .and_then(|a| unsafe { a.GetDesc1() }.ok())
    .is_some_and(|d| d.Flags & DXGI_ADAPTER_FLAG_SOFTWARE.0 as u32 != 0);

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

**@⁠tippythetaidum** on GitHub · 2026-11-25 19:48 UTC · [original](https://github.com/fxceless/victory-fork/pull/1051#issuecomment-7172792278) · edited 2026-11-25 20:01 UTC A data point from GitHub's Windows runner (no card, so the host device is WARP): with this PR, the test still fails, one step later. WARP reports shader model 6.6 and the depth-bounds feature, so neither skip triggers. The test then fails at its first draw check: ``` panicked at crates\victory-gpu\src\pipeline\host.rs:1320:9: assertion `left == right` failed: depth 0.5 outside [0.6, 1.0] must be rejected left: 255 right: 0 ``` The test turns the depth test itself off (`DepthEnable: false`) and relies on the depth bounds test alone. On a card the draw is culled; on WARP it comes through. In a build of my own I skip the test on the software adapter (`DXGI_ADAPTER_FLAG_SOFTWARE` on the host's adapter, the same check `queue2_tests` uses), with a message that says why. With that, this PR and #982 in the same tree, the runner's test step is running now; I'll say here how it ends. If you'd like that in this PR, here is the check (**update:** on the runner this flag alone did not catch the adapter; see the next comment for the check that does): ```rust let software = host.adapter.as_ref() .and_then(|a| unsafe { a.GetDesc1() }.ok()) .is_some_and(|d| d.Flags & DXGI_ADAPTER_FLAG_SOFTWARE.0 as u32 != 0); ``` AI-assisted (Claude Code, Claude Opus 5.5).
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/draw.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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