Test: views_are_made_beside_the_heap_and_copied_in fails on AMD (RX 6600): descriptor bytes are the driver's own #298

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

@⁠lerapeurdu62280-debug on GitHub · 2026-11-26 14:50 UTC · original
lerapeurdu62280-debug:fix/view-copy-test-amd → main · +26 −3 · 1 files · 1 commits · open

What and why

descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in fails on main on 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:

  • AMD (RX 6600, Adrenalin 32.0.21045): a CopyDescriptors into 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 old assert_ne! ("another view since") cannot hold there either.
  • WARP: they point to an object allocated at each 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

RX 6600 WARP (--features diagnostics, VICTORY_D3D12_WARP=1)
main fails (copied as it was made) passes
this PR passes 3/3 (+5/5 without diagnostics) passes 3/3
this PR, VICTORY_VIEW_COPY=0 (made in place) passes —
this PR with HostHeap::put made a no-op (sanity check that it still catches a missing copy) fails fails

Clippy -D warnings (default and --all-features) is clean once #241's one-line fix is applied.

Not tested on NVIDIA.

AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

**@⁠lerapeurdu62280-debug** on GitHub · 2026-11-26 14:50 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/298) `lerapeurdu62280-debug:fix/view-copy-test-amd` → `main` · +26 −3 · 1 files · 1 commits · open ### What and why `descriptor::host::tests::views_are_made_beside_the_heap_and_copied_in` fails on `main` on 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: - **AMD (RX 6600, Adrenalin 32.0.21045):** a `CopyDescriptors` into 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 old `assert_ne!` ("another view since") cannot hold there either. - **WARP:** they point to an object allocated at each `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 | | RX 6600 | WARP (`--features diagnostics`, `VICTORY_D3D12_WARP=1`) | |---|---|---| | `main` | fails (`copied as it was made`) | passes | | this PR | passes 3/3 (+5/5 without diagnostics) | passes 3/3 | | this PR, `VICTORY_VIEW_COPY=0` (made in place) | passes | — | | this PR with `HostHeap::put` made a no-op (sanity check that it still catches a missing copy) | **fails** | **fails** | Clippy `-D warnings` (default and `--all-features`) is clean once #241's one-line fix is applied. Not tested on NVIDIA. AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
views_are_made_beside_the_heap_and_copied_in failed on every AMD card:
it took the bytes of a slot in the heap shaders see to be those made
beside it. Descriptors are the driver's own. On AMD (RX 7900 XTX) a copy
into that heap changes them (they name the slot they are in), and the
first 32 bytes of the slot do not change for another view at all. On WARP
they point to an object made anew each time, so a view made again in
place has other bytes.

A copy now passes if it holds the bytes made beside the heap (WARP,
NVIDIA) or those of the same view made in place (AMD), for the raw view
and for the null one after it. With put() made to do nothing, the test
still fails on both the RX 7900 XTX and WARP.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 14:52:25 +00:00
github-bot changed title from Test: views_are_made_beside_the_heap_and_copied_in fails on every AMD card (descriptor bytes are the driver's own) to Test: views_are_made_beside_the_heap_and_copied_in fails on AMD (RX 6600): descriptor bytes are the driver's own 2026-11-26 15:31:58 +00:00
github-bot force-pushed github-bot/gh-298 from f2c635c269 to a477ca9a7e 2026-11-26 15:32:01 +00:00 Compare
Author
Owner

@⁠compaccount1-coder on GitHub · 2026-11-26 15:44 UTC · original

Confirmed on a second RDNA 2 card: RX 6700 XT (Windows 11, Adrenalin 32.0.21045, the same driver), with this PR merged onto main (c9c932c). cargo test -p victory-gpu --lib --tests passes in full (381 passed, 0 failed), including views_are_made_beside_the_heap_and_copied_in, which fails on main on this card every run. The Ryzen 7000 integrated graphics (RDNA 2, VICTORY_D3D12_ADAPTER=1) shows the same slot-tied descriptor bytes.

I had opened #299 for the same failure a little later. This PR does it better (on AMD it still checks the copy against the view made in place at the slot, where mine only skipped the bytes), so I'm closing #299 in favour of it.

AI-assisted: yes (Claude Code)

**@⁠compaccount1-coder** on GitHub · 2026-11-26 15:44 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/298#issuecomment-7196696436) Confirmed on a second RDNA 2 card: **RX 6700 XT** (Windows 11, Adrenalin 32.0.21045, the same driver), with this PR merged onto `main` (`c9c932c`). `cargo test -p victory-gpu --lib --tests` passes in full (381 passed, 0 failed), including `views_are_made_beside_the_heap_and_copied_in`, which fails on `main` on this card every run. The Ryzen 7000 integrated graphics (RDNA 2, `VICTORY_D3D12_ADAPTER=1`) shows the same slot-tied descriptor bytes. I had opened #299 for the same failure a little later. This PR does it better (on AMD it still checks the copy against the view made in place at the slot, where mine only skipped the bytes), so I'm closing #299 in favour of it. AI-assisted: yes (Claude Code)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/298/head:github-bot/gh-298'
git switch 'github-bot/gh-298'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-298'
git switch 'github-bot/gh-298'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-298'
git switch 'github-bot/gh-298'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-298'
git switch 'main'
git merge --squash 'github-bot/gh-298'
git switch 'main'
git merge --ff-only 'github-bot/gh-298'
git switch 'main'
git merge 'github-bot/gh-298'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.