Shaders: the null-buffer test skips hosts whose view heap is capped #3235

Open
github-bot wants to merge 1 commit from github-bot/gh-3235 into main AGit
Owner

@⁠Indy2l on GitHub · 2026-11-26 14:07 UTC · original
Indy2l:shader/capped-null-buffers → main · +24 −0 · 2 files · 1 commits · open

What

stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros fails on NVIDIA with hardware: dispatch failed: The parameter is incorrect.

The test uses View::NullBuffers, which makes the test host create a view heap of HEAP_VIEWS (2^21) slots, because the null raw SRV and UAV sit at NULL_BUFFER_VIEW, an index translated shaders read directly. Hosts on resource binding tier 1 or 2 cap shader-visible view heaps lower (NVIDIA: 1,000,000), so CreateDescriptorHeap rejects it.

A capped host has no null buffer views in the runtime either: victory-gpu's HostHeap::new warns "no room for the null buffer views". So there is no behaviour to check on that hardware.

Change

  • New Host::takes_full_view_heap() in the test host (emit/host.rs): tries a shader-visible view heap of HEAP_VIEWS slots and drops it.
  • The test skips its hardware pass with a message when that fails, as it already does without an SM 6.6 device. WARP still runs it, so the behaviour stays covered in CI.

Testing

  • RTX 3060, driver 32.0.16.2140, Windows 11: the hardware pass prints hardware: view heap capped below HEAP_VIEWS; skipped, and the test passes.
  • VICTORY_WARP=1: the test runs on WARP and passes.
  • cargo clippy --workspace --all-targets [--all-features] --locked -- -D warnings: clean.

Independent of #3226, which fixes the NVIDIA crash that aborts the victory-shader suite before this test is reached. #3226 lists this failure among the ones it uncovered. The other two it lists (a_heap_buffer_read_by_element_takes_the_views_stride and gathers_at_a_level_match_the_hardware) return wrong values on NVIDIA and are not addressed here.

🤖 Generated with Claude Code

**@⁠Indy2l** on GitHub · 2026-11-26 14:07 UTC · [original](https://github.com/Marvisak/VIctory/pull/3235) `Indy2l:shader/capped-null-buffers` → `main` · +24 −0 · 2 files · 1 commits · open ## What `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` fails on NVIDIA with `hardware: dispatch failed: The parameter is incorrect`. The test uses `View::NullBuffers`, which makes the test host create a view heap of `HEAP_VIEWS` (2^21) slots, because the null raw SRV and UAV sit at `NULL_BUFFER_VIEW`, an index translated shaders read directly. Hosts on resource binding tier 1 or 2 cap shader-visible view heaps lower (NVIDIA: 1,000,000), so `CreateDescriptorHeap` rejects it. A capped host has no null buffer views in the runtime either: `victory-gpu`'s `HostHeap::new` warns "no room for the null buffer views". So there is no behaviour to check on that hardware. ## Change - New `Host::takes_full_view_heap()` in the test host (`emit/host.rs`): tries a shader-visible view heap of `HEAP_VIEWS` slots and drops it. - The test skips its hardware pass with a message when that fails, as it already does without an SM 6.6 device. WARP still runs it, so the behaviour stays covered in CI. ## Testing - RTX 3060, driver 32.0.16.2140, Windows 11: the hardware pass prints `hardware: view heap capped below HEAP_VIEWS; skipped`, and the test passes. - `VICTORY_WARP=1`: the test runs on WARP and passes. - `cargo clippy --workspace --all-targets [--all-features] --locked -- -D warnings`: clean. Independent of #3226, which fixes the NVIDIA crash that aborts the `victory-shader` suite before this test is reached. #3226 lists this failure among the ones it uncovered. The other two it lists (`a_heap_buffer_read_by_element_takes_the_views_stride` and `gathers_at_a_level_match_the_hardware`) return wrong values on NVIDIA and are not addressed here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
a_heap_buffer_read_where_no_buffer_view_is_reads_zeros needs a view heap
of HEAP_VIEWS (2^21) slots: View::NullBuffers places the null raw SRV and
UAV at NULL_BUFFER_VIEW, an index translated shaders read directly. Hosts
on resource binding tier 1 or 2 cap shader-visible view heaps lower
(NVIDIA: 1,000,000), so its hardware pass failed with "dispatch failed:
The parameter is incorrect" from CreateDescriptorHeap.

Such a host has no null buffer views in the runtime either
(victory-gpu's HostHeap warns "no room for the null buffer views"), so
there is nothing to check there. Host::takes_full_view_heap tells, and
the test skips that pass with a message, as it does without an SM 6.6
device; WARP still runs it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:12:08 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 14:52 UTC · original · approved these changes

Reviewed the diff and verified locally on Windows 11 x64 (RTX 5090 + WARP):

  • Host::takes_full_view_heap() cleanly probes whether the adapter supports HEAP_VIEWS shader-visible descriptors so a_heap_buffer_read_where_no_buffer_view_is_reads_zeros skips capped NVIDIA adapters (hardware: view heap capped below HEAP_VIEWS; skipped) while still running and passing on WARP.
  • cargo test -p victory-shader --lib emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros -- --test-threads=1 --nocapture: 1 passed, 0 failed.
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-26 14:52 UTC · [original](https://github.com/Marvisak/VIctory/pull/3235#pullrequestreview-6076207476) · **approved these changes** Reviewed the diff and verified locally on Windows 11 x64 (RTX 5090 + WARP): - `Host::takes_full_view_heap()` cleanly probes whether the adapter supports `HEAP_VIEWS` shader-visible descriptors so `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` skips capped NVIDIA adapters (`hardware: view heap capped below HEAP_VIEWS; skipped`) while still running and passing on WARP. - `cargo test -p victory-shader --lib emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros -- --test-threads=1 --nocapture`: 1 passed, 0 failed. - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Author
Owner

@⁠oni-swr on GitHub · 2026-11-26 15:28 UTC · original

WARP verification of #3235 (test report only, no code changes)

Head 2c27fe25467eeaf9bda33357b0a36a3ca9d24ef5, main 63bcca43c6a00a758510398fa43096ce7e4f7df0 (merge base = main).

Env: Windows 11, WARP only (adapter "Microsoft Basic Render Driver", d3d10warp.dll 10.0.26100.9818), VICTORY_WARP=1 and VICTORY_D3D12_WARP=1, dxil.dll 1.8.2502.11 (Windows Kit 10.0.26100.0), cargo -j 4. No physical GPU used. Each test was run in its own process (<test> --exact), so one crashing test cannot hide the others. (With the old 10.0.19041 dxil.dll the validator tests crash with an access violation, on main too; unrelated to this PR.)

Commands (head, checked out detached):

  • cargo test -j 4 -p victory-shader --lib (features: none)
  • emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --exact --nocapture on head and on main

Results:

  • The PR adds no new test, only the takes_full_view_heap skip for capped hosts. On WARP the heap of HEAP_VIEWS slots is created, so the guarded test is not skipped: with --nocapture neither "capped" nor "no SM 6.6" is printed, and it passes on head and on main.
  • victory-shader lib on head: 305 tests, 298 passed, 3 ignored, 4 failed. On main: 305 tests, 298 passed, 3 ignored, 4 failed. Same 4 failing tests on both (emit::synthetic_tests::{a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches, permutes_read_the_lane_named_and_zero_from_lanes_left_out}), so no change from the PR.
  • Control: not applicable, there is no regression test. The skip path itself (a capped NVIDIA host) is not exercised here and needs that hardware.

AI-assisted: verification by Claude Code (Claude Sonnet 5.5). Synthetic tests only; no game files, dumps, shader names or hashes.

**@⁠oni-swr** on GitHub · 2026-11-26 15:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/3235#issuecomment-7196316579) **WARP verification of #3235** (test report only, no code changes) Head `2c27fe25467eeaf9bda33357b0a36a3ca9d24ef5`, main `63bcca43c6a00a758510398fa43096ce7e4f7df0` (merge base = main). Env: Windows 11, WARP only (adapter "Microsoft Basic Render Driver", d3d10warp.dll 10.0.26100.9818), VICTORY_WARP=1 and VICTORY_D3D12_WARP=1, dxil.dll 1.8.2502.11 (Windows Kit 10.0.26100.0), cargo -j 4. No physical GPU used. Each test was run in its own process (`<test> --exact`), so one crashing test cannot hide the others. (With the old 10.0.19041 dxil.dll the validator tests crash with an access violation, on main too; unrelated to this PR.) Commands (head, checked out detached): - `cargo test -j 4 -p victory-shader --lib` (features: none) - `emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --exact --nocapture` on head and on main Results: - The PR adds no new test, only the `takes_full_view_heap` skip for capped hosts. On WARP the heap of `HEAP_VIEWS` slots is created, so the guarded test is not skipped: with `--nocapture` neither "capped" nor "no SM 6.6" is printed, and it passes on head and on main. - `victory-shader` lib on head: 305 tests, 298 passed, 3 ignored, 4 failed. On main: 305 tests, 298 passed, 3 ignored, 4 failed. Same 4 failing tests on both (`emit::synthetic_tests::{a_mask_joined_with_data_at_a_uniform_loop_is_its_number, gathers_at_a_level_match_the_hardware, permutes_mask_high_address_bits_and_divergent_branches, permutes_read_the_lane_named_and_zero_from_lanes_left_out}`), so no change from the PR. - Control: not applicable, there is no regression test. The skip path itself (a capped NVIDIA host) is not exercised here and needs that hardware. AI-assisted: verification by Claude Code (Claude Sonnet 5.5). Synthetic tests only; no game files, dumps, shader names or hashes.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3235'
git switch 'github-bot/gh-3235'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3235'
git switch 'github-bot/gh-3235'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3235'
git switch 'main'
git merge --squash 'github-bot/gh-3235'
git switch 'main'
git merge --ff-only 'github-bot/gh-3235'
git switch 'main'
git merge 'github-bot/gh-3235'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3235
No description provided.