GPU: create a texture without a host UAV format without the flag #2319
No reviewers
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!2319
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2319"
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?
@Calvix2k on GitHub · 2026-11-25 10:33 UTC · original
Calvix2k:codex/gpu-uav-format-fallback-2307→main· +63 −1 · 2 files · 2 commits · openA texture the title creates with
D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESSin a format the host has no typed UAV for, and with no typeless family to stand in (B5G5R5A1_UNORM, and the console's two-byte formats that pass through as DXGI numbers), removes the device: on a strict driverGetResourceAllocationInfofails withas reported in #2307 on an RTX 3070 / Windows 10. The title then runs at 30 fps with a black screen.
What the fix does
host_descdropsALLOW_UNORDERED_ACCESSfor exactly those textures — no family to map to, andtyped_storesays the device cannot make a typed unordered view of the format — and logs a one-time warning naming the format. The texture is created, the title keeps running, and its unordered views are refused later byfits(the view half, #1763). Formats with a family are untouched: the sRGB mapping and the case where the device does store to the type keep the flag.Verification
cargo test -p victory-gpu --features diagnostics --libon Windows 10 19045 / RX 7800 XT: 146 passed, 1 failed — the known placed-view test on a runtime withoutID3D12Device10(#1999), identical onmain; clippy-D warningsclean.a_format_without_unordered_access_loses_the_flagcovers the drop and the "keeps the flag" arm. On the AMD driver heretyped_storereports true for 85/86/115, so the drop arm skips; that is why the device removal is NVIDIA-only in the report. It needs an NVIDIA or WARP run to be exercised for real.@qtLkz on GitHub · 2026-11-25 12:40 UTC · original
Ran the drop arm on NVIDIA, with the output visible: RTX 4070 Ti (Ada), driver 621.01, Windows 11 Pro build 26300, Rust 1.98.1 pinned, this PR on top of main
940d32f.No
this device stores to 86 as a typed UAV; skippedline was printed, so on this cardtyped_store(86)is false and the test really took the drop arm: format 86 withALLOW_UNORDERED_ACCESScomes back fromhost_descwithout the flag and still as 86. The "28 keeps the flag" arm ran as well (no assertion failed).This matters because the test returns early as a pass when the device does report a typed UAV for 86 (as on the RX 7800 XT above), so a bare "1/1 passed" does not by itself show the new arm ran. With
--nocapture, the missing skip line does show it.Same nit as above: the test sits just outside
mod tests(its path isresource::a_format_without_unordered_access_loses_the_flag), harmless.AI-assisted (Claude).
@Marvisak on GitHub · 2026-11-25 15:17 UTC · original · edited 2026-11-25 16:45 UTC
Automated triage for the maintainers.
Merge candidate (worth a look; small).
resource.rshost_descnow dropsALLOW_UNORDERED_ACCESSonly for a format with no family at all (family(f) == f && family(f + 1) != f, the same testdescriptor::host::fitsuses) that the host cannot use for typed unordered views (typed_store). This stops the device removal from #2307 for formats such as B5G5R5A1. Typeless heads (sRGB UAV textures turned typeless, R32_TYPELESS) keep the flag, so the gap from the previous review is closed. Their unordered views behave as onmain. A refused view on a dropped format is then refused infits, as the comment says. The test is insidemod testsnow, and its sRGB assertion (29 keeps the flag and becomes 27) runs before the device-dependent early return, so it runs on every host. An RTX 4070 Ti run in this thread shows the drop arm executing. CIcheck: passing. Nit:resource.rsnow ends with an extra blank line.On your reply: confirmed. The condition and the test match what was asked.
Generated by Claude Code
@Calvix2k on GitHub · 2026-11-25 16:15 UTC · original
The gap is fixed in
3558858(rebased ontomain 67e8ae1): the drop now needsfamily(f) == f && family(f + 1) != f, the same "no family at all" testfitsuses, so typeless formats (sRGB UAVs turned typeless, R32_TYPELESS) keepALLOW_UNORDERED_ACCESSand their unordered views stay as onmain.The test also covers that: an sRGB UAV texture (29) keeps the flag and comes out as its typeless family 27. I put that assertion before the device-dependent
typed_store(86)early return so it runs on AMD too (here 86 answers true and the B5G5R5A1 half skips). The test is now insidemod tests.Local:
cargo test -p victory-gpu --features diagnostics --lib146 passed / 2 ignored, plus the known placed-view failure (#1999); clippy-D warningsclean.@davesousa on GitHub · 2026-11-25 19:18 UTC · original
In-game result on NVIDIA: RTX 3070 Ti (Ampere, 8 GB), driver 621.40, Windows 11 26200, 32 GB RAM. Title Series 1.0.2.1.
diagbuild (--features diagnostics), aftertranslate --cache --pipelines. This PR (3558858) merged ontomain13f91ca. On this card,a_format_without_unordered_access_loses_the_flagpasses without its skip line, so the drop arm runs.main13f91caVICTORY_D3D12_DEBUG=1, the last messages beforeRemoveDevice(DXGI_ERROR_INVALID_CALL) are id=599 atGetResourceAllocationInfo(B5G5R5A1_UNORM withALLOW_UNORDERED_ACCESS) and id=342 (typed UAV of B5G5R5A1_UNORM). This is the same as #2563 on an RTX 3070.main+ #2319 (3558858)format=86). First-boot, legal and start screens run at 30 fps (33.3 ms/frame) for 6 minutes.After the start screen, while loading into the world, the + #2319 run ended with a GPU hang:
0x887A0006, after a 10.5 s submission of 34 lists (TDR delay 8 s). The log shows 42 compute pipelines refused by the host before it. That looks like the known NVIDIA world hang (#1968, #2220), not this PR.Also seen on both builds, unchanged by this PR: view heap capped at 1,000,000 (the title asks for 1,245,184; #1760), and the 2560x1440 format 115 render target refused (#797).
AI-assisted (Claude Code); the runs are on my machine.
@KainanP on GitHub · 2026-11-25 19:36 UTC · original
RTX 4060 Laptop (610.47), merged onto main
13f91cae: B5G5R5A1 UAV half fixed (flag dropped, UAVs null), B4G4R4A4 target half still removes the device; no new failures incargo test -p victory-gpu. Details and the side-by-side table with the other #1753 PRs: #1753. Tested with the help of an AI assistant (Claude Code).@qtLkz on GitHub · 2026-11-25 20:30 UTC · original
Re-ran the updated head (
3558858) on the same NVIDIA setup: RTX 4070 Ti, driver 621.01, Windows 11 Pro build 26300, merged onto main13f91ca(clean merge).Again no "skipped" line, so the drop arm for 86 ran. The new sRGB case (29 keeps the flag as typeless 27) passes too, and the test now sits inside
mod tests(pathresource::tests::...). Thanks for moving it.AI-assisted (Claude).
@krcenov on GitHub · 2026-11-25 22:06 UTC · original
Tested this PR at
3558858on an RTX 3070 (driver 32.0.16.1714), Windows 10 22H2 (19045). The only local change is an Agility SDK 1.620.2 export (D3D12SDKVersion/D3D12SDKPath), which Windows 10 needs; see #2563. It was adiagbuild withVICTORY_D3D12_DEBUG=1 VICTORY_D3D12_DRED=1.940d32fwithout a fix, the device was removed at 40–66 s. It held a steady 30 fps on menus and loading screens.view the host does not allow unordered=true format=86 flags=1.NumDescriptors 2097152(id=645).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.