GPU: refuse typed UAVs in unsupported formats regardless of family or castability #1763
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!1763
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1763"
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?
@n-romanovich on GitHub · 2026-11-24 22:09 UTC · original
n-romanovich:fix/typed-uav-format-support→main· +108 −0 · 1 files · 4 commits · openFixes #1753
Fixes #1754
Related: #1755, #1758
fits()incrates/victory-gpu/src/descriptor/host.rspreviously checkedtyped_store()only whencast && family(view) != family(own). When a typed UAV used the texture's own format, a default view (view == 0), or a same-family cast (such asB5G5R5A1_UNORM),CreateUnorderedAccessViewwas still called on formats withoutD3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW, triggeringDXGI_ERROR_INVALID_CALL(0x887A0001) on NVIDIA.typed_store()forunordered == trueinfits(), includingview == 0and same-family/non-castable targets.unsupported_typed_uav_format_is_refused.AI-assisted; verified with
cargo test -p victory-gpu --locked -- unsupported_typed_uav_format_is_refusedandcargo build --release --locked -p victoryon Windows 11 / RTX 5060 Ti.@DesertGamer on GitHub · 2026-11-24 22:12 UTC · original
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
@WillyboPeep on GitHub · 2026-11-24 22:23 UTC · original
Tested on an RTX 4090 (Ada, 32-lane waves, driver 621.01), Windows 11 build 26300, 32 GB RAM.
70564ae+ this PR (ca168de),cargo build --release --locked -p victory, shader cache and pipeline library warmed first withtranslate --cache --pipelines(25,669 shaders translated, 316 refused; 26,664 of 28,164 pack pipelines in the library). Title 1.0.2.1, Series X profile, scripted Enter presses.unsupported_typed_uav_format_is_refusedpasses on this card.70564aeDXGI_ERROR_INVALID_CALL(0x887A0001) after a submission of 1 list, 28 s after start, during the boot screens70564ae+ #1763an unordered view in a format the host cannot store target=86 own=86); boot, menus and loading run at 30 fps and the world is reached about 76 s after startSo on this card it fixes the #1753 / #1754 removal.
What stops it next, about 13 s into the world: 1.2 then 0.4 fps with 2,587 to 3,013 draws dropped per frame, then
slow host submission ms=3041 lists=25(all compute pipelines), then the device is removed with0x887A0006(hung) after that submission of 25 lists. The NVIDIA driver logged twoError occurred on GPUID: 100events (nvlddmkm 153) at the moment of the hang; there was no display-driver reset (no event 4101). The view heap is capped as in #1760 (host view heap capped at 1000000, title count 1,245,184,no room for the null buffer views, 310,720title slot past the host heapwarnings), so this looks like the world stall that #1760 traces to the capped heap, not something this PR adds.Run and written up with Claude Code.
@upipibi on GitHub · 2026-11-24 22:30 UTC · original
Overlap for the reviewers: #1775 (22:20) and #1780 (22:25) make the same change as this PR (22:09). In
descriptor::host::fits, checktyped_storefor every unordered view, not only one cast to another family, so theB5G5R5A1_UNORMUAV is refused on NVIDIA (#1753 / #1754). This one closes both issues; #1775 closes #1753, #1780 #1754. Only one can merge as is. From reading the three descriptions and file lists (alldescriptor/host.rs); nothing built.AI-assisted (Claude Code).
@Ryanarcx2 on GitHub · 2026-11-24 22:32 UTC · original
Tested
ca168deon an RTX 5070 Ti (driver 32.0.16.1742), Windows 11, aftertranslate --cache --pipelines. On plain70564aethis machine removes the device 16 to 17 s after start (see #1753).VICTORY_D3D12_DEBUG=1CreateCommittedResource3ALLOW_UNORDERED_ACCESS warning, non-fatal)So the startup INVALID_CALL from #1753 is gone on this card. The later failures look like the existing NVIDIA problems rather than this PR: the diag run still logs 185
CreateComputeShaderwave64 refusals and 182 UAV-state "invalid for use as a vertex buffer" messages, and the release run's late removal matches the cutscene hang seen onffe310e.One remaining debug-layer note on the same texture:
CreateCommittedResource3also warns that the D3D12_CLEAR_VALUE format is not valid as a render target when ALLOW_RENDER_TARGET is set.@n-romanovich on GitHub · 2026-11-24 22:36 UTC · original
All review feedback has been addressed in
dbd4fc2:fits()incrates/victory-gpu/src/descriptor/host.rsdoes not use a hardcoded format list —typed_store(format)queriesID3D12Device::CheckFeatureSupport(D3D12_FEATURE_FORMAT_SUPPORT)on the live host device forD3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW.ALLOW_UNORDERED_ACCESSare created typeless on the host incrates/victory-gpu/src/resource.rs, andfits()maps sRGB UAV view formats to their linear counterparts before callingtyped_store, so valid sRGB/linear UAVs are not over-refused.descriptor::host::tests::supported_typed_uav_formats_are_acceptedto pin that supported typed UAV formats (R8G8B8A8_UNORM,R8G8B8A8_UINT,R8G8B8A8_UNORM_SRGB→R8G8B8A8_UNORM, and default/explicit UAVs onR32_UINTandR16G16B16A16_FLOAT) remain accepted whileNoneon typeless is still refused.Verified on Windows (
dbd4fc2):cargo test -p victory-gpu --locked -- descriptor::host::tests::supported_typed_uav_formats_are_accepted descriptor::host::tests::unsupported_typed_uav_format_is_refused— 2 passed, 0 failed.@AgneyaK on GitHub · 2026-11-24 22:55 UTC · original
Tested in the title on an RTX 3050 6 GB Laptop (driver 32.0.16.2124, Windows 11 26300):
70564ae+ this PR (dbd4fc2, clean merge), diag build,VICTORY_D3D12_DRED=1, local NVIDIA-adapter patch.70564aeremoves the device (0x887A0001) right after frame 128 here.an unordered view in a format the host cannot store target=86 own=86once.One run. Details and the comparison with a sampler-heap change: #1754
AI use: Claude Code (Claude Opus 5.5) ran the build and wrote this; the results are from the run described.
@alexodee on GitHub · 2026-11-24 23:07 UTC · original
Another NVIDIA data point for this problem: RTX 3070 Ti Laptop 8 GB (driver 596.36, 32-lane waves), 16 GB RAM, Windows 11 26300, Series X mode,
70564ae, diag build, shader cache and pipeline library pre-built.I tested my own local equivalent, not this PR's commit: in
descriptor::host::fits, every unordered view whose final format failstyped_storeis refused, including a view in the texture's own format.70564ae0x887A0001, about 40 s after start (frame 128 to ~200), before the profile screen was passed70564ae+ that check0x887A0001; menus at 30 fps and the loading art are reachedSome of the runs also had local diagnostics (probes, per-list submission, reserved textures), so this is not a clean A/B beyond the view check itself.
Where the device goes. The debug layer is not installed here, so I checked
GetDeviceRemovedReasonafter every descriptor call. The first failing call is theCreateUnorderedAccessViewinmake(),View::Unordered:So it is the view in the texture's own family that gets past
fits(): the existingtyped_storecheck only covers castable views of another family. With the check, the log has one line,an unordered view in a format the host cannot store view=86 own=86, and the run goes on.What this does not fix: later, as the world loads, this machine still loses the device with
0x887A0006(one compute list run alone) or0x887A0007/0x8007000Ewith memory nearly full. Those look like separate problems.AI use: Claude Code (Claude Opus 5.5) did the diagnosis and wrote this; posted at the request of the person whose machine ran the tests.
@dragoso on GitHub · 2026-11-25 00:01 UTC · original
I tested this on a Blackwell card, and it clears the boot-time removal reported in #1754 and #1753.
Setup
diagbuild withVICTORY_D3D12_DRED=1.translate --cache --pipelineson70564ae.main
70564ae0x887A0001(INVALID_CALL).This PR (
dbd4fc2) on70564ae0x887A0006(HUNG), after 16 lists.f607780aa8e502d0.The
host view heap capped at 1000000warning (#1760, #1808) appears in both runs.No retail data, logs or screenshots are attached.
AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 01:35 UTC · original · edited 2026-11-26 01:23 UTC
Automated triage for the maintainers.
Needs work. Thanks for rebasing; it merges cleanly now. After the rebase, though, the fix itself is no longer in this diff:
mainalready checkstyped_storefor every typed unordered view infits()(crates/victory-gpu/src/descriptor/host.rs), merged in #2462 (ea488a9). What this branch still adds are the two tests,unsupported_typed_uav_format_is_refusedandsupported_typed_uav_formats_are_accepted.mainhas no test forfits(), so they have value, in particular the sRGB-to-linear mapping and the typeless-without-format refusal.To make it mergeable as what it now is: retitle it and rewrite the description as tests for
fits()(drop "Fixes #1753/#1754", since #2462 fixed those). Otherwise it can be closed as already inmain.CI: passing (
check).Generated by Claude Code
@n-romanovich on GitHub · 2026-11-25 01:44 UTC · original
@Marvisak, rebased onto the current main and resolved the conflict in crates/victory-gpu/src/descriptor/host.rs.
@Ryanarcx2 on GitHub · 2026-11-25 05:38 UTC · original
Retested the rebased head
50d91b1(onmain940d32f) on an RTX 5070 Ti (driver 32.0.16.1742), Windows 11 26200, Ryzen 7 9800X3D. Same shader cache and pipeline library as my earlier run; TdrDelay at the default (not set).main940d32f, release0x887A0001after a submission of 1 list, right afterno host texture ... format: 115(same as #1753)50d91b1, release0x887A0006(hung) after 30 lists50d91b1, release (2nd run)0x887A0006after 26 lists50d91b1,diag --features diagnostics,VICTORY_D3D12_DEBUG=1,VICTORY_D3D12_DRED=1DXGI_ERROR_DEVICE_HUNGafter 27 listsSo the boot-time removal is still fixed on top of current
main. The format is refused once (an unordered view in a format the host cannot store target=86 own=86) and the run reaches world loading (story000_restofworld). With the debug layer on, noB5G5R5A1_UNORMtyped-UAV error is logged.What stops it next looks unrelated to this PR. Frame rate drops to 0.2-0.3 fps, submissions take about 2.8 s each (max 3.3 s), up to ~1,500 draws/frame are dropped, then the device hangs. The NVIDIA driver logs
nvlddmkmevent 153 three times at the moment of each hang, but there's no display-driver reset.host view heap capped at 1000000with 310,720title slot past the host heapwarnings in every run (#1760).The diag run's DRED breadcrumbs show exactly one list in progress: stopped at command 156 of 158, between barriers, a single
dispatch 16x16x16of compute00167d58cc5a78d7. The 15 lists after it had not started. That shader had already been bound and run in several earlier, completed submissions (first bind about 40 s before the hang), so it does not hang every time.Debug-layer messages in that run (692 total, none naming the hang):
CreateComputeShader: wants wave lane count 64, device max is 32 (#578 / #223); the hung shader is not among the ones I can match to thesedepth twinsCreateDescriptorHeap: NumDescriptors 2,097,152, limit for shader-visible view heaps is 1,000,000SetComputeRootSignature: SetDescriptorHeaps must be called to bind a sampler descriptor before setting a root signature withSAMPLER_HEAP_DIRECTLY_INDEXEDCreateCommittedResource3: theD3D12_CLEAR_VALUEformat (B4G4R4A4_UNORM) is not valid as a render target withALLOW_RENDER_TARGETset (the 2560x1440 format-115 texture that still getsno host texture)The last point is a separate issue this PR doesn't try to fix, but it is still on the same texture. Logs available if anyone wants specific lines.
AI-assisted (Claude Code); the runs are mine.
@nathanbzrr on GitHub · 2026-11-25 06:40 UTC · original
AMD RDNA3 + D3D12 Debug Layer + WARP test report for
50d91b19(rebased ontomain940d32f):Environment
10.0.26340x64,rustc 1.98.1(x86_64-pc-windows-msvc)32.0.32029.2010) + D3D12 WARPdxil.dll 1.8.2502.11victory-gputests only (no game files / title not run)Results on
50d91b19cargo test -p victory-gpu --locked typed_uav -- --nocapture: 2 passed, 0 failed (unsupported_typed_uav_format_is_refused,supported_typed_uav_formats_are_accepted)cargo test -p victory-gpu --locked -- --test-threads=1: 145 passed, 0 failed, 2 ignoredcargo test -p victory-gpu --all-features --locked -- --test-threads=1: 148 passed, 0 failed, 2 ignoredVICTORY_D3D12_DEBUG=1 cargo test -p victory-gpu --locked -- --test-threads=1: 145 passed, 0 failed, 2 ignored (0 D3D12 Debug Layer errors/warnings)VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --locked -- --test-threads=1: 145 passed, 0 failed, 2 ignoredcargo clippy -p victory-gpu --all-targets --locked -- -D warnings(default and--all-features): 0 warningsAI-assisted review/testing; all builds and GPU runs executed locally on my own machine. No game files used.
@walterwallaceson on GitHub · 2026-11-25 07:23 UTC · original
Windows 10, RTX 3070, rebased head
50d91b1: works, and does what #1775 does on the same stack.Setup: RTX 3070 8 GB, driver 621.14, Windows 10 22H2 (19045).
main940d32f+ #463 (Agility SDK runtime, needed on Windows 10) + #1751 + #1906 + #385 + #688 + #189 (wave32). Diag build, a scripted Enter at the start screen, nothing skipped. The three rows differ only in which of the two fixes is in.DXGI_ERROR_INVALID_CALLafter a submission of one list, no breadcrumbs, the #1753 symptomb079909)50d91b1) insteadWith this PR the two 15-minute runs match within run-to-run noise (122 vs 121 submissions over 250 ms, 0.85 vs 0.9 fps at the end).
cargo test --workspacegives the same results as with #1775 plus one more passing test.Since #1775 is proposed for close as a duplicate of this PR: on this card and Windows 10 I see no case #1775 covers that this one doesn't.
Not checked: the removal with the debug layer on (so not shown that it is the same
B5G5R5A1_UNORMview here); more than one run per row.No game data attached. I'm testing with Claude's help, and Claude drafted this comment.
@ShyVortex on GitHub · 2026-11-25 07:41 UTC · original · edited 2026-11-25 07:45 UTC
RTX 3080 Ti Laptop 16 GB (Ampere, 32-lane waves, driver 621.40), i7-12700H, 32 GB RAM, hybrid graphics (Iris Xe), Windows 11 26300. Diag build,
VICTORY_D3D12_DRED=1, TDR at defaults (loggedlevel=default delay=default ddi_delay=default).main940d32f: device removed (0x887A0004/0x887A0001) in the menus, ~6 s afterno host texturefor the 2560x1440 format 115 target. 2 of 2 runs.940d32f+ this PR (50d91b1, clean): no removal at boot. Menus and loading art at 21-28 fps, through to world loading (the title's own state: "Game Running", prologue leadout cutscene prestreaming).So it does what it says on this machine too.
What came next is the world-entry problem (#71), not this change, but one detail may be useful: about 3 s into world loading Windows reset the GPU (
nvlddmkm153) with TDR at defaults, the runtime logged no device removal at all, ~30 s later the title faulted (0xc0000005, write to 0x0 atvictory-image+0x23cf683), and then the whole PC froze hard and needed the power button (Kernel-Power 41, bugcheck 0). The title's own crash report at that moment shows 0.9 GB of a 50 GB page file free, so commit was nearly exhausted; my sampler died with the PC, so I can't say how much of that was VIctory's. #1054 /42961e8warn only for TdrLevel 0/1; here it froze with the defaults.AI-assisted (Claude Code).
@r4tedx on GitHub · 2026-11-25 08:10 UTC · original
One more NVIDIA data point for
50d91b1, with the debug layer's reason for the removal on plainmain.RTX 5070 (non-Ti), driver 616.92, Windows 11, diagnostics build (
--profile diag --features diagnostics), Series X mode:main940d32f, D3D12 debug layer + DRED: device removed 11 s in, at boot. The debug layer logs id 342,CreateUnorderedAccessView: typed UAV ofB5G5R5A1_UNORMnot supported, then id 232,RemoveDevice/INVALID_CALL. Without the debug layer: removed at 9.5 s,0x887A0001, DRED breadcrumbs empty.main+ this PR (50d91b1), DRED on: 10 minutes (the time limit I set) with no device removal, menus, then the world after the opening credits. No Kernel-Power or display-driver events in the System log during either run.Not fixed by this PR, and not expected to be: the host view heap is still capped at 1,000,000 of the 1,245,184 descriptors asked for, and the frame is still unlit on
main.These were runs of the title with my own local copy of its data on my PC; only the logged messages and counts are quoted.
AI-assisted
@StExpeditus on GitHub · 2026-11-25 09:03 UTC · original
Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at
50d91b1.cargo test --workspace --locked --no-fail-fast-> 697 passed, 6 failed, 10 ignored. Failed: descriptor::host::tests::dynamic_slots_are_held_until_released ... FAILED | draw::tests::root_views_reach_their_copy_and_read_zeros_past_it ... FAILED | memory::tests::lists_share_a_table_and_copies_keep_their_views ... FAILED | emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride ... FAILED | emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros ... FAILED | emit::synthetic_tests::gathers_at_a_level_match_the_hardware ... FAILED@R34P3RGit on GitHub · 2026-11-25 18:57 UTC · original
Confirmed startup fix on an RTX 5080 (NVIDIA driver 621.40). On unmodified main
13f91ca, the device was removed about 16 seconds after launch, after one submitted list, withDXGI_ERROR_INVALID_CALL(0x887A0001). The D3D12 debug layer reported an unsupportedB5G5R5A1_UNORMtyped UAV (ID 342), then device removal (ID 232).With PR #1763 at
73a602b, the process passed the former failure point and stayed alive for a 35-second smoke test, which I ended intentionally. An interactive follow-up also worked past startup. This confirms the immediate NVIDIA startup fix on this setup; later rendering is not yet confirmed. A separateB4G4R4A4_UNORMrender-target allocation refusal remains.@KainanP on GitHub · 2026-11-25 19:36 UTC · original
RTX 4060 Laptop (610.47), merged onto main
13f91cae: B5G5R5A1 UAV half fixed (views refused, both with and without a description), B4G4R4A4 target half still removes the device; no new failures. Also tested together with #2626 (small conflict infits, resolution in the linked comment): both halves pass. Details and the side-by-side table with the other #1753 PRs: #1753. Tested with the help of an AI assistant (Claude Code).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.