GPU: unordered views only in formats the host stores to (NVIDIA device removal on B5G5R5A1) #1841
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1843"
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 KevinPratap on 2026-11-24T23:16:30Z.
Problem
On NVIDIA (RTX 4050 Laptop, driver 621.24), current
mainremoves the device a few seconds into the menus. The D3D12 debug layer names the call:fits()askstyped_store()only when a view is cast to another format family. An unordered view in the texture's own format skips the check. AMD supports typed stores to this format; NVIDIA does not.Fix
Every unordered view now needs typed stores in its final format (
stores()). Without them the view is null: its writes are dropped, and that's logged once.Verified
unordered_views_need_typed_storespasses.cargo clippy -p victory-gpu --all-targets -- -D warningsis clean.Only
crates/victory-gpu/src/descriptor/host.rschanges.AI-assisted.
🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:47:39Z.
Review: COMMENTED
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
Unordered views only in formats the host stores to (NVIDIA D3D12): same capability gate as #1775/#1787/#1801/#1832 — fifth leg, check consistency.
Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-24T23:16:59Z.
Overlap for the reviewers: the same
B5G5R5A1_UNORMtyped-UAV removal on NVIDIA (#1753 / #1754) has open fixes on the view side indescriptor/host.rs(#1763, #1775, #1780, #1801) and on the texture side inresource.rs(#1787, #1832). From reading the file lists; nothing built.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by 0xSAW on 2026-11-25T01:44:28Z.
Tested commit
3502e6con NVIDIA GeForce RTX 2060 6GB (Turing / TU106, Driver 566.14, Windows 11 x64).Can confirm this completely resolves the D3D12 device removal crash on Turing:
Context & Reproduction
On
mainprior to this PR, running withVICTORY_D3D12_DEBUG=1consistently produced a device removal immediately after the first command list submission:Results with PR #1843
crates/victory-gpu/src/descriptor/host.rs::tests::unordered_views_need_typed_storespassed cleanly.diagprofile (features = ["diagnostics"]) and executed withVICTORY_D3D12_DEBUG=1andVICTORY_D3D12_DRED=1:B5G5R5A1_UNORMallocation.(The execution later encountered an unrelated CPU-side
0xc0000005null-pointer write in image loading, which is expected on this branch and unrelated to D3D12/GPU views).LGTM! Thanks for the fix, @KevinPratap.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:18:11Z.
Automated triage for the maintainers.
Proposed close: duplicate of #1763. The new
storeshelper infits(crates/victory-gpu/src/descriptor/host.rs) refuses an unordered view in a format without typed stores, in all three arms. That fixes theB5G5R5A1_UNORMdevice removal in #1753. #1763 makes the same change to the same function, merges cleanly and was triaged first. Its tests make a real host texture and check the castable case.unordered_views_need_typed_storeshere only comparesstoreswithtyped_store, so it does not exercisefits.If this PR covers a case #1763 misses, say which one and this verdict can be revisited.
CI: no check runs on the head commit.
This pull request will be closed in 48 hours unless the author pushes a change or a maintainer removes the
triage: proposed closelabel.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by KainanP on 2026-11-25T19:35:59Z.
RTX 4060 Laptop (610.47), merged onto main
13f91cae(test-only conflict, kept both): B5G5R5A1 UAV half fixed (views refused), B4G4R4A4 target half still removes the device; no new failures. With #1832 too: same, and also fixes the UAV half on Intel UHD. Details and the side-by-side table with the other #1753 PRs: https://github.com/Marvisak/VIctory/issues/1753#issuecomment-7172510623. Tested with the help of an AI assistant (Claude Code).Imported from Marvisak/VIctory. Originally posted by krcenov on 2026-11-25T21:52:19Z.
Tested #1843 + #1832 together on
940d32f: RTX 3070, driver 32.0.16.1714, Windows 10 22H2 (19045), with a local Agility SDK 1.620.2 export (needed on Windows 10, see #2563). No more device removal from the B5G5R5A1 typed UAV. It ran ~5 min 40 s at a steady 30 fps until an unrelated GPU hang at world load. Debug layer on (VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1).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.