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

Open
lerapeurdu62280-debug wants to merge 1 commit from upstream-pr/298 into main
lerapeurdu62280-debug commented 2026-11-26 14:50:18 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by lerapeurdu62280-debug on 2026-11-26T14:50:18Z.


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

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6629204204 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/298). Originally posted by [lerapeurdu62280-debug](https://github.com/lerapeurdu62280-debug) on 2026-11-26T14:50:18Z. --- ### 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)
compaccount1-coder commented 2026-11-26 15:44:57 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by compaccount1-coder on 2026-11-26T15:44:57Z.


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)

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:comment:7196696436 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/298#issuecomment-7196696436). Originally posted by [compaccount1-coder](https://github.com/compaccount1-coder) on 2026-11-26T15:44:57Z. --- 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 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/298:upstream-pr/298'
git switch 'upstream-pr/298'

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/298'
git switch 'upstream-pr/298'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/298'
git switch 'upstream-pr/298'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/298'
git switch 'main'
git merge --squash 'upstream-pr/298'
git switch 'main'
git merge --ff-only 'upstream-pr/298'
git switch 'main'
git merge 'upstream-pr/298'
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
avatarmanz/VIctory-7900XTX!298
No description provided.