GPU: writing unbound UAVs removes the device on an RDNA3 iGPU #508
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#508
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@YorangSama on GitHub · 2026-11-24 04:18 UTC · original
Summary
Attempting the world on a Radeon integrated GPU (RDNA3, 64-lane waves) gets further than on the discrete
NVIDIA card in the same machine, and DRED names the fault exactly: a compute dispatch writes two UAVs that
resolve to
None, whose descriptor heap is null, and the GPU page-faults.Same machine, same title, same build, two adapters (per-app GPU preference switches between them):
wave lane count of 64 … maximum … is 32)and their dispatches are dropped; the world submission then removes the device.
With
VICTORY_SHADER_LOOP_LIMIT=1000the iGPU run's slow submissions drop from 20,518 ms to 444–498 msand it reaches 787 draws/frame, capturing loading frames correctly — so the loop limit works as the README
describes. What remains is not slowness: after that, a submission still removes the device, with DRED
pointing at an unbound UAV write.
Setup
VICTORY_DXIL= DXC 1.9.2609.5dxil.dlld2a4bae,cargo build --profile diag -p victory --features diagnosticsvictory.exe run <exe> --execute, Series X profile unless notedData
RDNA3 iGPU,
VICTORY_SHADER_LOOP_LIMIT=1000 VICTORY_D3D12_DRED=1— the failure:So
s1+8ands1+16are unbound while the program writes them;u5points at a null heap.VICTORY_SKIP_PIPELINES=2dc602192abf6288gets past this one, but the next 26-list compute submission thenremoves the device too (
0x887A0006), so it looks like a family rather than a single program.Same run before the fault:
1 fps 1600.7 ms/frame 787 draws/frame, andframe-1024.pngis the loadingkey art rendered correctly at 1920×1080.
RTX 4070,
VICTORY_D3D12_DEBUG=1— 22× in one 7-minute run:and with
VICTORY_D3D12_GBV=1:The title itself is fine. Its own crash report (frame 1396) says
Current SRL fbk_stry000_FBK_STRY000_INTRO (Prestream),PED 87/600,VEHICLE 242/700,BUILDING 8595/22500, player health 130/130 — the intro mission runs; only rendering is missing.What I would like to know
Nonebe dropped instead of submitted? This one is submitted andpage-faults, which takes the whole device with it.
(
crates/victory-shader/src/emit/lower.rs:382bakes it into the DXIL), or is a 64-lane device a hardrequirement for the world?
TEXTURE1DwhereTEXTURE2Dis expected,TEXTURE2DwhereTEXTURE3Dis expected) be worth asserting on in a diagnostics build?Logs available on request (stderr per run, full DRED line, captured loading frames, the title's crash.log).
No game data attached.
@BastienRodz on GitHub · 2026-11-24 04:43 UTC · original
I'm working on this. Reading the code: a descriptor slot the title never wrote a known view into is a null Texture2D SRV on the host (
HostHeap::fill_null, andmake_nullfor fresh tables). The translated shaders index the heap directly (SM 6.6), with the kind they expect in each handle's annotation. So the dispatch in your DRED (Uav s1+8: uav None,Uav s1+16: uav None) writes through SRV descriptors, which a GPU does not have to survive.Plan: the translator records the resource kind it annotates for each table descriptor it reads (UAV or SRV; buffer, raw, structured or texture dimension). Where the title has no view, the host makes a null descriptor of that kind, so writes are dropped and reads return zero. I'll open a PR when it's tested. No game data used.
AI-assisted (Claude Code, Gemini).
@wwwwwwww3333333 on GitHub · 2026-11-24 04:43 UTC · original
Source-level analysis; not runtime-tested with game files.
Q1 (drop dispatches with
NoneUAVs): I think #135 already covers most of this. It writes a null view of the kind the shader expects into fresh tables (make_null_kind(index, u.kind, u.dwords)), and it drops the dispatch when a table can't be made. #336 also drops it.One path it doesn't change: in
State::table_entry, which handles tables that are not rebuilt,mirror()returnsNonefor a slot with no view. The slot then keeps the null Texture2D SRV fromfill_null/make_null. A shader that writes that index as a UAV throughResourceDescriptorHeap[]hits an SRV, which is a descriptor-type mismatch. That fits the RDNA3 page fault. #413 keepsmake_nullthere as well. On top of #135, this could be a one-line follow-up: whenu.kind == ResourceType::Uavandindex < host.count(), callmake_null_kind(index, u.kind, u.dwords).I can't tell from the report whether
s1+8/s1+16came from a fresh table or a mirrored one. If you can test #135 on the iGPU with GBV enabled, that would show whether the second path matters.Q2 (wave64 on 32-lane hosts): this is in progress in open PRs: #189, #233 and #223 (plus #54, #192 and #439 for small groups and LDS). The RTX refusals look like #71, #264 and #468.
Q3 (GBV in diagnostics): a diagnostics build already enables it with
VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1(host.rs), and the first debug-layer error goes into the device-removed report. #205 fixes the Texture2D-vs-3D null UAV mismatch that GBV reports.@LAKSHYA-cmd-tech on GitHub · 2026-11-24 04:49 UTC · original
PR #552 addresses this crash:
ull_view\ SRVs, ensuring hardware properly drops UAV writes per D3D12 spec instead of faulting on invalid descriptor types.
ull_for\ now matches exact UAV dimensions (\Texture3D, \Texture1D, \Texture2DArray, \Buffer) from descriptor words rather than hardcoding \Texture2D, eliminating the GBV dimension mismatch error.
@BastienRodz on GitHub · 2026-11-24 05:02 UTC · original
PR: #568. Empty table slots the shaders annotate now get a null descriptor of that kind (UAV or SRV; buffer, raw, structured, or the texture dimension) instead of the null 2D SRV. It is tested only with synthetic programs and descriptors, on vkd3d-proton over lavapipe. If you can, a
diagrun of #568 on the RDNA3 iGPU withVICTORY_D3D12_DRED=1would show whether the fault in2dc602192abf6288goes away or moves.AI-assisted (Claude Code).
@SAitken91 on GitHub · 2026-11-24 06:38 UTC · original
Same failure on an RX 6950 XT (RDNA2): page faults at
0x4808000/0x481f000withuav Noneentries in the DRED report, 3–4 s into the world. With #568 applied it lasted ~78 s before a fault in the same range; details and numbers in #568.@YorangSama on GitHub · 2026-11-24 17:51 UTC · original
Ran #568 (
cd6d559) on the RDNA3 iGPU as you asked, and the fault moved — the unbound-UAV write is gone.Setup
run via the per-app adapter preference.
diagprofile ofcd6d559,VICTORY_DXIL= DXC 1.9.2609.5,VICTORY_SHADER_LOOP_LIMIT=1000,VICTORY_D3D12_DRED=1, 240 s cap, Series X profile.What changed
uav Nonein the reports1+8,s1+16)heap 720829: null0x49940000x59f8da000(different)2dc602192abf6288as the faulting dispatchSo the typed null descriptors did what they should: the write that used to land on an SRV no longer faults.
The new failure — inside a freed texture
Two things stand out:
descriptor-kind question — it looks like the same shape #1348 describes ("DRED hides it", i.e. likely a
fence/barrier or early-free rather than a bad shader).
(
617927936× 32 B ≈ 19.7 GB against a 48 MB heap;1232841216likewise). If that index comes from adescriptor that was never written, it would explain both the freed-texture fault and the earlier
heap: nullcases: a slot read as a descriptor index before the title wrote it.Frame before the fault:
0.6 fps, 1600.1 ms/frame (709.4 preparing: copies 521.6 ms 269.6 MB, textures 31.4 ms 150.8 MB; 667.4 on the GPU; 200.3 copying back 13.0 MB), 3790 draws/frame— so it now runs a real worldworkload, at these speeds.
Happy to run another revision, the same environment, on request.
@icdmkg2 on GitHub · 2026-11-24 18:37 UTC · original
Ran #568 (
cd6d559) merged with #1409 (de109f1) on an RX 6750 XT (RDNA2). Hardware details are in #1348. I usedVICTORY_D3D12_DRED=1and a 360 s cap, on a release build with--features diagnostics.ffe310e+ #1409)It ends the same way as in @YorangSama's run above, inside a freed texture:
Without #568, my second crash (#1348) was also inside a freed
texture 1024x1024 ... (type 34). So the same freed-texture shape now shows up on RDNA2 and RDNA3, with and without #568. It looks like a texture-lifetime problem, separate from the typed nulls that #568 fixes.One correction to the reading above: the
view heap ...: 0x... past its end (slot N)lines are not an index the shader read.near_heaps()indescriptor/host.rstakes the fault address and places it against each heap's GPU range, and it prints that for every fault. A fault address gigabytes past a 48 MB heap just means the fault wasn't in a heap. It isn't evidence of a garbage descriptor index.@Marvisak on GitHub · 2026-11-25 01:47 UTC · original
Automated triage for the maintainers.
Confirmed on current
main(940d32f). A host view-heap slot with no title view is still a null Texture2D SRV.HostHeap::fill_nullfills new heaps with it, andHostHeap::make_nullwrites it whenHostHeap::mirrorfinds no view; both usenull_view, incrates/victory-gpu/src/descriptor/host.rs. Translated shaders index the heap directly, so a UAV write to such a slot uses an SRV descriptor. That is theUav s1+8: uav None/[heap 720829: null]dispatch in the report. Since the report,d71c388sends buffer reads at heap indices without a buffer view to the host's null buffer views. Texture UAVs in those slots are unchanged.#568 (typed nulls) moved the fault in the reporter's A/B and in the RX 6750 XT run, but it was closed without merging. No open PR carries that change that I can point to.
The failure that remains with #568 (
inside freed ["texture 1024x1024 ..."]) is a separate one, tracked in #557.On the other questions: wave64 on 32-lane hosts has open PRs (#1929, #1890, and #1922 to refuse cleanly). GBV is already available in diagnostics builds via
VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1(README, diagnostics table).Generated by Claude Code