Test: views_are_made_beside_the_heap_and_copied_in fails on AMD (RDNA 2): descriptor bytes are the driver's own (port of avatarmanz#298) #288
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!288
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-288"
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?
@lerapeurdu62280-debug on GitHub · 2026-11-26 19:12 UTC · original
lerapeurdu62280-debug:fix/view-copy-test-amd→a-publier· +26 −3 · 1 files · 1 commits · merged 2026-11-26 22:30 UTCPort of avatarmanz/VIctory-7900XTX#298 onto
a-publier, which has the same test. It also fails on the RX 6700 XT (RDNA 2) according to the hardware run in avatarmanz/VIctory-7900XTX#280.What and why
descriptor::host::tests::views_are_made_beside_the_heap_and_copied_infails onmainon an RX 6600 (RDNA 2), every run, on both test jobs' feature sets. It passes on the CI because the CI runs on WARP.The test compares the 32 bytes of a slot in the shader-visible heap with the bytes
staged()made beside it. Descriptor bytes are the driver's own:CopyDescriptorsinto the shader-visible heap changes them. They hold addresses that name the slot they are in: the same view made in place in the next slot differs by exactly the 32-byte increment. The first 32 bytes also do not change when the slot gets another view, so the oldassert_ne!("another view since") cannot hold there either.Create*View, so a copy keeps the bytes made beside the heap, but the same view made again in place has new ones.So no single byte comparison holds on both. The test now accepts either legitimate form: a copy must hold the bytes made beside the heap (WARP, presumably NVIDIA, which is what the test checked so far), or those of the same view made in place at that slot (AMD). This is checked for the raw view and for the null view after it. Test-only change; the runtime is untouched.
Tested
--features diagnostics,VICTORY_D3D12_WARP=1)maincopied as it was made)VICTORY_VIEW_COPY=0(made in place)HostHeap::putmade a no-op (sanity check that it still catches a missing copy)Clippy
-D warnings(default and--all-features) is clean once avatarmanz/VIctory-7900XTXavatarmanz/VIctory-7900XTX#241's one-line fix is applied.Not tested on NVIDIA.
AI-assisted: yes (Claude Code)
🤖 Generated with Claude Code
Also fixes the one failure reported in #304, on an RX 580 (Polaris, AMD's legacy driver): verified there by @WellyngtonSantos, 3/3 with this PR, 5/5 failing without it.
On
a-publier(cd8dfc0)Cherry-picked without conflict. On the RX 6600 the test passes with this PR and fails without it. Clippy reports the same warnings with and without it (none in
descriptor/host.rs).@WellyngtonSantos on GitHub · 2026-11-26 19:54 UTC · original
Tested on a third driver family: RX 580 (Polaris / GCN4), AMD legacy driver 31.0.21925.1001, Windows 11 26200, at head
67ff5f33. Cross-compiled with the pinned 1.98.1 toolchain (cargo xwin test -p victory-gpu --release --target x86_64-pc-windows-msvc).descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in: passes, 3 runs of 3. Without this PR it fails 5 runs of 5 on this card, see #304. The bytes there show the same thing you describe: the copied descriptor differs from the staged one in its first 16 bytes.victory_gpulib,--test-threads=1: 387 passed, 0 failed, 34 ignored.So the "same view made in place" comparison holds on Polaris too, not only on RDNA 2.
@lerapeurdu62280-debug on GitHub · 2026-11-26 20:05 UTC · original
Thanks @WellyngtonSantos. A third driver family (Polaris on the legacy branch, besides RDNA 2 here and on the RX 6700 XT) is good to have. I've linked #304 from the description, since its one failure is this test.
@MamaLeVrai on GitHub · 2026-11-26 20:45 UTC · original
Also on an RX 6950 XT 16 GB (RDNA 2), driver 32.0.21045.29003, Windows 11 build 26300, Rust 1.98.1, release, at
67ff5f3(onrx9070xt/a-publiercd8dfc0):cargo test --release -p victory-gpu --lib387 passed, 0 failed, 34 ignored. Without this PR,views_are_made_beside_the_heap_and_copied_infails every run here: 3 of 3 oncd8dfc0, and on 4 other PR branches based on it. The bytes are as you describe: a raw view made in two slots of the card's heap differs in its first 16 bytes (addresses next to the slot), and a null view made over it leaves those bytes unchanged.AI-assisted (Claude Code); no game data.