Shaders: the null-buffer test skips hosts whose view heap is capped #3233
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3235"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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_zerosfails on NVIDIA withhardware: dispatch failed: The parameter is incorrect.The test uses
View::NullBuffers, which makes the test host create a view heap ofHEAP_VIEWS(2^21) slots, because the null raw SRV and UAV sit atNULL_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), soCreateDescriptorHeaprejects it.A capped host has no null buffer views in the runtime either:
victory-gpu'sHostHeap::newwarns "no room for the null buffer views". So there is no behaviour to check on that hardware.Change
Host::takes_full_view_heap()in the test host (emit/host.rs): tries a shader-visible view heap ofHEAP_VIEWSslots and drops it.Testing
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-shadersuite 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_strideandgathers_at_a_level_match_the_hardware) return wrong values on NVIDIA and are not addressed here.🤖 Generated with Claude Code
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 supportsHEAP_VIEWSshader-visible descriptors soa_heap_buffer_read_where_no_buffer_view_is_reads_zerosskips 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).
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, main63bcca43c6a00a758510398fa43096ce7e4f7df0(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 --nocaptureon head and on mainResults:
takes_full_view_heapskip for capped hosts. On WARP the heap ofHEAP_VIEWSslots is created, so the guarded test is not skipped: with--nocaptureneither "capped" nor "no SM 6.6" is printed, and it passes on head and on main.victory-shaderlib 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.AI-assisted: verification by Claude Code (Claude Sonnet 5.5). Synthetic tests only; no game files, dumps, shader names or hashes.
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 main63bcca4).cargo test -p victory-shader --lib --no-fail-fast, skippingheap_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_zerosfails on main here (hardware: dispatch failed: The parameter is incorrect) and passes with this PR. Run alone with--exact --nocapture, it printshardware: 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 failuresdynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views).Synthetic tests only, no game files. AI-assisted (Claude Code).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.