NVIDIA (RTX 5070 Ti): workspace test failures an AMD card cannot see, and one independent of vendor #2317
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#2317
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@xiaotu030202 on GitHub · 2026-11-25 10:28 UTC · original
Summary
cargo test --workspaceon an NVIDIA card shows failures that an AMD card cannot, plus one that fails on its own regardless of vendor. I fixed the largest one in #2315; this records what is left, with the isolation I did, so it can be judged without re-deriving it.Environment: Windows 11, Ryzen 7 9800X3D, RTX 5070 Ti (driver 32.0.16.2140), Rust 1.98.1 (pinned), MSVC 14.44.35207, Windows SDK 10.0.26100.0,
VICTORY_DXILset to that SDK'sdxil.dll. No game files, sovictory runwas never in play: everything here iscargo test.1.
cargo test --workspacetakes the test binary downvictory-gpu's test binary exits0xc0000409(STATUS_STACK_BUFFER_OVERRUN) partway through its 145 tests. The panic that starts it:buffer_data_reaches_the_host_texturepasses on its own and passes insideresource::. It only dies when run after the rest of the crate, which points at a shared device one earlier test left removed: a0x887A0005from any test poisonshost()for every later one, and the failure then surfaces wherever the nextunwrap()on a device call happens — sometimes as a stack overrun rather than a clean panic.The root of the
0x887A0005s is #2315 (HEAP_VIEWSwas past what D3D12 gives, so the fallback heap was smaller than the index shaders clamped to). With #2315 applied,descriptor::,memory::,draw::all improve and no test removes the device while doing heap work.Worth considering separately: the tests share one
host()in aOnceLock, so the first device removal cascades. Per-test isolation, or a check that fails the first removing test clearly instead of the ones after it, would make this class of failure much easier to read.2. Two
victory-shadertests compare against RDNA2 and a GeForce disagreesBoth fail the same with #2315 stashed, so they are not from that change.
stride_tests::a_heap_buffer_read_by_element_takes_the_views_strideThe shader reads a buffer at a heap index whose slot holds no buffer view, and the view-stride table's 0 should route it to the host's null buffer view. The got values step by 3 (
101, 104, 107, ...) for the first 11 lanes and are 0 for the rest; the want is200 + lane. A 12-byte stride is in play (Root::View { data: vec![4, 12] }), so the read is landing at the wrong stride and stopping early — consistent with the null-view fallback not being taken, then reading a short buffer.If the null-buffer-path depends on anything vendor-specific in how a root SRV of a buffer is interpreted at a heap index, this is where it would show.
synthetic_tests::gathers_at_a_level_match_the_hardwareThis one the file itself flags:
image_gather4_lat a non-zero level has no DXIL form; the test compares against the host's ownimage_gather4_lzat level 0, and the comment says the hardware "rounds the exact product of coordinate and size to 1/256 of a texel, half up, which WARP does not". That assumption is RDNA2's. A GeForce rounding or clamping differently is not a bug in the translation — but it does mean the test asserts an AMD-specific result on whatever GPU is present.3.
draw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_viewFails in isolation, with #2315 stashed as well, so it is independent of the heap work:
Line 1921 is
host.device.CreateRootSignature(0, bytes).unwrap()on acs_5_1shader compiled withD3DCompile. The test builds its ownSlots::new(4)and a fixed root signature, so it does not touch heap geometry.a_depth_texture_written_through_unordered_views_reads_as_depth,root_views_reach_their_copy_and_read_zeros_past_it,structured_views_off_their_buffers_elements_get_their_own_copyandunordered_1d_and_3d_textures_keep_their_writesall pass individually after #2315.CreateRootSignaturereturningDEVICE_REMOVEDmeans the device was already gone when it was called — so the removal is upstream of that line, in whatever this test did before it, and theunwrap()is just where it surfaces.What I did not do
I could not tell you whether any of this reproduces on AMD hardware — #59 (a world-load device removal on an RX 9070 XT) is the closest thing in the tracker and looks like the same family as the fixed one. If any of this is useful I can isolate further on the NVIDIA side: each of the above is reproducible with a single
cargo test -p <crate> <name>and I can bisect where the device is removed for #3 if that helps.@Calvix2k on GitHub · 2026-11-25 10:39 UTC · original
The stride failure in #2317 is a fault in the test harness, not in the lowering: the harness bound the buffer as a structured SRV while
victory-gpubinds every title buffer as a raw byte-address SRV and carries the element size in the view-stride table, and the lowered code multiplies by that stride itself.Evidence, from the DXIL this test compiles (SM 6.6 device here):
So the shader passes a byte address,
12·lane + 4, and expects200 + lane— correct fordata[3·lane+1]. A structured descriptor (StructureByteStride = 12) gives the driver a stride to apply to that address, and your numbers are exactly that:101 + 3·laneis element3·lane + 1, i.e.(12·lane + 4) × 12/4, and the zeros from lane 11 are element 34 onwards, past the 32 elements the buffer holds. AMD and WARP take the byte address as written, which is why the test passes here.#2322 is the fix:
Stride::Structurednow yields the raw descriptor production uses, plus a test pinningStructureByteStride = 0so it cannot regress. 249 passed, 3 ignored, clippy clean on RX 7800 XT / Windows 10. It would be good if you could confirm on the 5070 Ti — that test is the only thing it changes.For the other two items:
3 (placed view). Not NVIDIA-specific and not heap geometry: on this machine (RX 7800 XT, Windows 10 19045, system D3D12 without
ID3D12Device10) it fails in isolation at the same assertion,round 0: one host texture, leftfalse/ righttrue— no castable formats, so a placement that names another format gets its own host texture and a copy. With the Agility runtime staged for the test binaries (SM 6.6 andID3D12Device10) the wholevictory-gpusuite goes 147 passed, 0 failed, 2 ignored here. So on Windows 11, whereDevice10is in-box, your failure should be a different one: the device was already gone when that test started, which is item 1.1 (the cascade). Agreed, and your read is right: the first test to remove the device should fail, not the one that happens to call
unwrap()next. That is worth a separate change; I would rather not fold it into the harness fix above.2b (
image_gather4_l). Agreed as well — the test asserts RDNA2's rounding, which is not what the translation promises. A vendor-neutral form would be to compare against the same gather fetched at level 0 with coordinates pre-multiplied, or to drop the non-zero-level case where DXIL has no form for it; that needs a decision on which behaviour the lowering should guarantee, so I have left it alone.@fuzeofficlal on GitHub · 2026-11-25 11:11 UTC · original
Two data points from an RTX 5090 (
32.0.16.1656, Windows 1126200, SDK10.0.26100.0dxil.dll) onmain940d32f:synthetic_tests::gathers_at_a_level_match_the_hardware(section 2b) is also caused byStride::Structured(16)(synthetic_tests.rs:210), not a GeForce gather rounding difference: with #2322 applied, all 32 lanes ofgathers_at_a_level_match_the_hardwarepass on RTX 5090 (and with #2315 + #2322 together, all 5 workspace failures on940d32fpass here).a_texture_written_in_one_format_reads_in_another_through_a_placed_view(section 3) passes in isolation on32.0.16.1656(default,VICTORY_D3D12_DEBUG=1, andVICTORY_D3D12_GBV=1;CreateCommittedResource3succeeds with 21 castable formats including42 <-> 67). UnderVICTORY_D3D12_DEBUG=1, the one D3D12 error emitted beforedraw.rs:1921isID 1419(SetComputeRootSignaturewithSAMPLER_HEAP_DIRECTLY_INDEXEDand no bound sampler heap) insidevictory_gpu::host::create()->Host::fuses_fmad(), which #2041 fixes — worth testing on32.0.16.2140with #2041 applied to see whether621.40faults on that unbound sampler heap or inCreateCommittedResource3/ barrier cast.@qtLkz on GitHub · 2026-11-25 12:22 UTC · original
Another data point, from an RTX 4070 Ti (Ada), since the reports so far are Blackwell (5070 Ti, 5090).
Environment: Windows 11 Pro build 26300, Intel i7-13700KF, RTX 4070 Ti, NVIDIA driver 621.01, Rust 1.98.1 (pinned), VS 2022 Build Tools,
VICTORY_DXILnot set (default lookup). No game files: everything below iscargo test.On main
940d32f:cargo test --workspace --locked --no-fail-fastgives the same 5 failures as this issue, and nothing else fails:victory-gpu:descriptor::host::tests::dynamic_slots_are_held_until_released(assertionNumDescriptors >= HEAP_VIEWS) andmemory::tests::lists_share_a_table_and_copies_keep_their_views("past the dynamic slots"); 141 passed, 2 failed, 2 ignoredvictory-shader:stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride(same[101, 104, 107, ...]vs[200, 201, ...]values as above),stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros("dispatch failed: invalid parameter") andsynthetic_tests::gathers_at_a_level_match_the_hardware(lane 0:[0.0, 1.0, 0.0, 0.0]vs[0.0, 0.0, 0.0, 0.0]); 244 passed, 3 failed, 3 ignoredI did not see the
0xc0000409stack overrun from section 1 on this card.With #2315 + #2322 merged on top of
940d32f(#2315 fast-forwards, #2322 merges cleanly),cargo test -p victory-gpu -p victory-shader --lib --locked --no-fail-fast:victory-gpu: 144 passed, 0 failed, 2 ignored (including the newthe_clamp_bound_fits_in_a_host_heap)victory-shader: 249 passed, 0 failed, 3 ignoredSo all 5 failures are fixed by those two PRs on Ada as well, which matches the RTX 5090 result above. This confirms #2322 on a GeForce, as asked.
AI-assisted (Claude).
@Marvisak on GitHub · 2026-11-25 15:57 UTC · original · edited 2026-11-26 00:50 UTC
Automated triage for the maintainers.
Confirmed on main (
63bcca4), one part at a time:Host::dispatchincrates/victory-shader/src/emit/host.rsstill bindsStride::Structured(s)as a structured SRV (StructureByteStride = s). Production binds raw views, and the lowered code multiplies by the stride itself, so a driver that applies the descriptor's stride scales the index twice. The earlier test-host fixes (#2322, #2357, #1887) were all closed without merging. New: on an RTX 4070 (842b0cb), open PRs #2885 and #2178 both pass this test. Both make structured buffer views raw on the runtime side.gathers_at_a_level_match_the_hardware(2b) passes on RTX 4070 and 4070 Ti with open PR #2323.dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsanda_heap_buffer_read_where_no_buffer_view_is_reads_zeroscome from translated shaders clamping heap indices belowHEAP_VIEWS = 1 << 21, while NVIDIA caps the host heap at 1,000,000 (HostHeap::newincrates/victory-gpu/src/descriptor/host.rs). On the RTX 4070, #2461 (merge candidate), #2121, #1777, #2177 and #1943 clear all three. #1751, #2475, #1770, #2251, #2683 and #2628 clear the twovictory-gpuones only.victory-shadercrash (0xc0000005inheap_direct_texture_reads_mark_their_heap_index) is #2571; open PRs #2596 and #2587.ID3D12Device10(#1999 on Windows 10). On Windows 11 it most likely fails only after an earlier test has removed the shared device.With #2596 + #2683 + #2633 + #2323 on
13f91ca, the RTX 4070 Ti goes from a crash plus failures to one failure (2a above). Testers combining PRs should note that #2633 no longer merges cleanly onto current main.Generated by Claude Code
@qtLkz on GitHub · 2026-11-25 21:31 UTC · original
Update on NVIDIA: the open fixes, stacked together on current main, take this card from a crash plus 5 failures down to 1 failure.
Setup: RTX 4070 Ti (Ada), driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned. Main
13f91ca+ #2596 + #2683 + #2633 + #2323, merged in that order with no conflicts (stack headd6603d1).cargo test --workspace --locked --no-fail-fast -- --test-threads=113f91caWhat each PR clears on this card:
heap_direct_texture_reads_mark_their_heap_index(#2571). #2587 does the same.dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsanda_heap_buffer_read_where_no_buffer_view_is_reads_zeros, the heap-cap ones.gathers_at_a_level_match_the_hardwareThe one failure left:
stride_tests::a_heap_buffer_read_by_element_takes_the_views_strideThe two earlier attempts at this one (#2322, #2357) are closed. I'll look into it next.
Per-PR reports with details: #2596, #2683, #2633, #2323.
AI-assisted (Claude).
@qtLkz on GitHub · 2026-11-25 22:17 UTC · original
For anyone on NVIDIA who wants the combined fixes in one place: https://github.com/qtLkz/VIctory/tree/nvidia-stack
It is
13f91ca+ #2596 + #2683 + #2633 + #2774, merged as-is with no other changes. That's the exact stack from my run above (0 workspace failures on an RTX 4070 Ti). It's a convenience branch for testing, not a replacement for merging the PRs. Note that #2633 no longer merges cleanly onto current main (f3578e3), so it will need a rebase there.AI-assisted (Claude).
@pawrenity on GitHub · 2026-11-25 23:51 UTC · original
NVIDIA GeForce RTX 4070 (Ada), Windows 11,
main842b0cb: which open PRs fix which failure on this cardcargo test --workspace --locked --no-fail-fast. Each failure below fails every time when run alone with--test-threads=1(at least twice), and passes on this machine's AMD Radeon iGPU (selected as adapter 0 through Windows' per-app GPU preference). Everything else passes: core, formats, game, hle, loader, pe, pipeline and xtask are clean. There is one load-only flake:dstorage::tests::a_page_list_filled_after_its_request_starts(E_INVALIDARG), which passes 3/3 alone and is targeted by #2738.emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index(shader)0xc0000005(3/3); passes underVICTORY_WARP=18aae7ab3, #2596577839a0, #2739f237a3cf(1 run)emit::synthetic_tests::gathers_at_a_level_match_the_hardware(shader)hardware: lane 0:[0.0, 1.0, 0.0, 0.0]vs[0.0, 0.0, 0.0, 0.0]9c6e0942emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride(shader, FIND-11)[101, 104, 107, …]vs[200, 201, …]41773eb8, #2178319749e4emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros(shader)dispatch failed: The parameter is incorrect.descriptor::host::tests::dynamic_slots_are_held_until_released(gpu, FIND-9)NumDescriptors >= HEAP_VIEWS(host.rs:2226)memory::tests::lists_share_a_table_and_copies_keep_their_views(gpu, FIND-9)past the dynamic slots(memory.rs:1030)v_med3_f32_matches_rdna2_with_nan(#726): passes on the 4070 and on the iGPU.Full PR heads: #1751
45215912b4, #2475e33b8bff82, #17701beaca67e1, #2251519a8207c2, #2683541a3203f8, #2628e2cdafe560, #24612b5f65282e, #21211503227791, #1777cbb9d78f94, #21770497f58408, #19439825382ade. No game files used.AI-assisted (Claude Code).
@qtLkz on GitHub · 2026-11-26 10:07 UTC · original
Correction to my stack report above, and a new run that doesn't touch the fixtures.
My "0 failures" stack used #2774, which carries #2357's change of the stride and gather fixtures to raw views. #2357 was closed because those fixtures are the faithful ones: switching them to raw hides the NVIDIA defect instead of fixing it. So that result overstated things. Sorry for the noise.
Re-run on current main with the runtime fix #2885 instead, with fixtures untouched. RTX 4070 Ti (Ada), driver 621.01, Windows 11 Pro 26300, Rust 1.98.1.
Main
63bcca4+ #2596 (577839a) + #2683 (541a320) + #2633 (86a16dc) + #2885 (767f228), clean merges.cargo test --workspace --locked --no-fail-fast -- --test-threads=163bcca4dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views)With the fixtures as they are on main, all of these now pass on NVIDIA:
a_heap_buffer_read_by_element_takes_the_views_stride,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros,gathers_at_a_level_match_the_hardwareandheap_direct_texture_reads_mark_their_heap_index.So #2885 is the fix for the stride/gather defect (#1835 parts 2-3), #2683 for the heap cap and #2596 for the harness crash. #2633 is on top. #2774 and #2323 aren't needed for this.
AI-assisted (Claude).