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

Open
Indy2l wants to merge 1 commit from upstream-pr/3235 into main
Indy2l commented 2026-11-26 14:07:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Indy2l on 2026-11-26T14:07:02Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:issue:5511496397 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3235). Originally posted by [Indy2l](https://github.com/Indy2l) on 2026-11-26T14:07:02Z. --- ## 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)
Dukestar69 commented 2026-11-26 14:52:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T14:52:11Z.

Review: APPROVED


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).

<!-- greyfinch-sync:Marvisak/VIctory:review:6076207476 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3235#pullrequestreview-6076207476). Originally posted by [Dukestar69](https://github.com/Dukestar69) on 2026-11-26T14:52:11Z. **Review:** APPROVED --- 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).
oni-swr commented 2026-11-26 16:05:06 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by oni-swr on 2026-11-26T15:28:28Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7196316579 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3235#issuecomment-7196316579). Originally posted by [oni-swr](https://github.com/oni-swr) on 2026-11-26T15:28:28Z. --- **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.
kalberts0089-hash commented 2026-11-27 08:15:11 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kalberts0089-hash on 2026-11-27T08:15:11Z.


NVIDIA test report: RTX 4070 Ti (desktop, driver 621.01), Windows 11 Pro, rustc 1.98.1. Head 2c27fe2 (base main 63bcca4).

  • cargo test -p victory-shader --lib --no-fail-fast, skipping heap_direct_texture_reads_mark_their_heap_index (#2571): 299 passed, 2 failed, 3 ignored (main: 298 / 3 / 3). a_heap_buffer_read_where_no_buffer_view_is_reads_zeros fails on main here (hardware: dispatch failed: The parameter is incorrect) and passes with this PR. Run alone with --exact --nocapture, it prints hardware: view heap capped below HEAP_VIEWS; skipped, and the WARP leg still runs and passes. So the capped-host skip works; the null buffer views are still not there on this host, as the PR says. The other 2 failures are the known NVIDIA ones (a_heap_buffer_read_by_element_takes_the_views_stride, gathers_at_a_level_match_the_hardware), unrelated.
  • cargo test -p victory-gpu --lib -- --test-threads=1: 229 passed, 2 failed, 1 ignored, same as main (the known capped-heap failures dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views).
  • Not tested: nothing game-side; this is a test-only change.

Synthetic tests only, no game files. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7213321161 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/3235#issuecomment-7213321161). Originally posted by [kalberts0089-hash](https://github.com/kalberts0089-hash) on 2026-11-27T08:15:11Z. --- NVIDIA test report: RTX 4070 Ti (desktop, driver 621.01), Windows 11 Pro, rustc 1.98.1. Head `2c27fe2` (base main `63bcca4`). - `cargo test -p victory-shader --lib --no-fail-fast`, skipping `heap_direct_texture_reads_mark_their_heap_index` (#2571): 299 passed, 2 failed, 3 ignored (main: 298 / 3 / 3). `a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` fails on main here (`hardware: dispatch failed: The parameter is incorrect`) and passes with this PR. Run alone with `--exact --nocapture`, it prints `hardware: view heap capped below HEAP_VIEWS; skipped`, and the WARP leg still runs and passes. So the capped-host skip works; the null buffer views are still not there on this host, as the PR says. The other 2 failures are the known NVIDIA ones (`a_heap_buffer_read_by_element_takes_the_views_stride`, `gathers_at_a_level_match_the_hardware`), unrelated. - `cargo test -p victory-gpu --lib -- --test-threads=1`: 229 passed, 2 failed, 1 ignored, same as main (the known capped-heap failures `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). - Not tested: nothing game-side; this is a test-only change. Synthetic tests only, no game files. AI-assisted (Claude Code).
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/3235:upstream-pr/3235'
git switch 'upstream-pr/3235'

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/3235'
git switch 'upstream-pr/3235'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/3235'
git switch 'upstream-pr/3235'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/3235'
git switch 'main'
git merge --squash 'upstream-pr/3235'
git switch 'main'
git merge --ff-only 'upstream-pr/3235'
git switch 'main'
git merge 'upstream-pr/3235'
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
Marvisak/VIctory!3233
No description provided.