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#2661
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?
@cblfkrckst on GitHub · 2026-11-25 17:43 UTC · original
Summary
Running a D3D12 game (translated from Xbox) under VIctory with
VICTORY_D3D12_DEBUG=1andVICTORY_D3D12_DRED=1on an AMD Ryzen 5 5500X3D (iGPU, FL 12_2), Windows 10.0.26300, the game consistently hitsDXGI_ERROR_DEVICE_HUNG(TDR) during the loading cinematic and never reaches the actual world render.This is present in both
67e8ae1(current) andffe310e(previous). It is therefore not the same regression as #2653. #2653 reports an immediate crash (0x887A0004/0x887A0001) on an RTX 4060 that does not occur onffe310e; on my setup,ffe310eand67e8ae1both reach the cinematic and both hang onDXGI_ERROR_DEVICE_HUNG.I also applied local patches for the
B4G4R4A4render-target andB5G5R5A1typed-UAV validation failures. After that, no more format validation errors appear, but the TDRs continue. The format issue is resolved; the remaining hangs are the subject of this report.Behavior
In both commits (
ffe310eand67e8ae1), withVICTORY_D3D12_DEBUG=1andVICTORY_D3D12_DRED=1:DXGI_ERROR_DEVICE_HUNG(TDR,0x887A0006).The behavior is identical in both commits. There is no regression between
ffe310eand67e8ae1on this setup.Primary finding: TDR in compute ExecuteIndirect, independent of
00167d58cc5a78d7Two runs with the README workarounds, each in a separate configuration:
unix 1795627685, process 708067e8ae1VICTORY_SHADER_LOOP_LIMIT=1000indirect kind 2 max 1 [compute f607780aa8e502d0]0x887A0006(HUNG)unix 1795627360, process 1073667e8ae1VICTORY_SKIP_PIPELINES=00167d58cc5a78d7indirect kind 2 max 1 [compute f607780aa8e502d0]0x887A0006(HUNG)unix 1795628336, process 12084ffe310edispatch 16x16x16 [compute 00167d58cc5a78d7]0x887A0006(HUNG)Both workarounds end in
DXGI_ERROR_DEVICE_HUNG. Neither workaround changes the hang point on67e8ae1: the same shader (f607780aa8e502d0) is dispatched through the same command type (indirect kind 2), and the device is removed at the same logical location. The only difference is the exact command index (92 vs 97), which is expected because the loop-limit changes shader cache/compilation and slightly reorders emission.On
ffe310e, the hang is atdispatch 16x16x16 [compute 00167d58cc5a78d7], which is the original hang, not a regression.This rules out two hypotheses:
67e8ae1on this setup.67e8ae1, and the hang exists onffe310eas well.Other hangs observed in the same session (possibly the same underlying bug)
Three additional TDRs occurred in earlier runs on
67e8ae1. They may share a root cause with the primary hang.Hang A —
unix 1795612305, process 7736 (commit67e8ae1)dispatch 16x16x16 [compute 00167d58cc5a78d7].f10,f61) that are recycled between lists with stale initial content (words [...]is garbage).DXGI_ERROR_DEVICE_HUNG.Hang B —
unix 1795626521, process 7536 (commit67e8ae1)barrier groups [(2, 12)].indirect kind 0 max 1draws consumingSrv s0+584: buffer None(a null descriptor slot) from the pixel shader.Srv s0+168: buffer Some((57477562192, 16)) = [1.0, 1.0, 8.0, 0.125], a 16-byte buffer read asfloat4.DXGI_ERROR_DEVICE_HUNG.Hang C —
unix 1795627360, process 10736 (commit67e8ae1, skip run)indexed 36x1 [vertex 861bd1a467a31f9b, pixel e63bdd53a9b47da8]draws.targets ["0x1544334ffa0 mem 0xd5a3d0000"],depth 0x15443350bd0 mem 0xfa2400000.0xfa2400000is used as depth in list 23 and as an SRV (Srv s0+432: 2560x1440 f19 ... mem 0xfa2400000) in list 21. This looks like a missing state-transition barrier between incompatible uses of the same resource.Hypotheses
ExecuteIndirectis mistranslated, or the argument buffer is read before the compute that fills it has completed. The hang inindirect kind 2 [compute f607780aa8e502d0]happens regardless of whether the individual shader is skipped, which points at the indirect path rather than at the shader itself.0xfa2400000is a depth target in one list and an SRV in another, with no visible barrier between the two.Srv s0+584: buffer Nonebeing used by a pixel shader. If the translated shader dereferences it unconditionally, that alone can cause a hang or a GPU fault.Environment
cargo build --profile diag -p victory --features diagnostics --lockedVICTORY_D3D12_DEBUG=1,VICTORY_D3D12_DRED=1Attached logs
Four
crashes.logfiles, each containing the full DRED breadcrumbs for the corresponding run:hang1-compute-00167d.log—unix 1795612305, process 7736 (list 17,dispatch 00167d58cc5a78d7)hang-lista25.log—unix 1795626521, process 7536 (list 25, barrier(2,12), nulls0+584)hang3-skip-00167d.log—unix 1795627360, process 10736 (list 21,indirect kind 2,f607780aa8e502d0)hang4-looplimit.log—unix 1795627685, process 7080 (list 21,indirect kind 2,f607780aa8e502d0)hang5-ffe310e.log—unix 1795628336, process 12084 (commitffe310e, list 17,dispatch 00167d58cc5a78d7)What I have already ruled out
B4G4R4A4as render target,B5G5R5A1as typed UAV); no longer appears in logs.VICTORY_SKIP_PIPELINES=00167d58cc5a78d7: moves the hang fromdispatchtoindirect kind 2, but does not remove it.VICTORY_SHADER_LOOP_LIMIT=1000: no effect on the hang point.67e8ae1: the hang exists inffe310eas well.Cross-reference
0x887A0004/0x887A0001) on an RTX 4060 that does not occur onffe310e. The issues may share a root cause inExecuteIndirecttranslation or barrier insertion, but the symptoms and the commits are different.Request
Given the evidence above, the most useful next step would be a fix (or a debug knob) for the
ExecuteIndirecttranslation and/or for state-transition barriers between incompatible resource uses. If there's an existing flag to force serialization of indirect dispatches, or to insert conservative barriers between lists, I'd be happy to test it and report back.@pes7 on GitHub · 2026-11-25 18:08 UTC · original
Same removal on an NVIDIA machine, and the debug layer names the reason:
DXGI_ERROR_DEVICE_HUNG(TDR),0x887A0006- exactly what you see, and not the0x887A0004the queue reports afterwards. So your report and mine are the same failure.Two measurements from this side that narrow it, in case they help you:
It is one command, not a long submission. On this machine it happens in the menu, at 30 fps, three frames of 33 ms (2.8 ms on the GPU) in a row, and then the device goes. So the frames around the hang are cheap and the submission that dies contains a single command that never finishes. That also explains why
TdrDelay=60changed nothing for you: the removal is not the frame being long, it is one dispatch.The last two lines before it are two compute pipelines first bound in the same frame, and it is the same frame and the same pipeline hash every run:
Neither of your workarounds can fix it, and one of the reasons is a real bug: translated shaders clamped heap indices below
HEAP_VIEWS = 1 << 21, but no D3D12 host can make a heap larger than 1 000 000 descriptors, so an index at a computed heap slot could land past the heap - and a descriptor read 32 MB out of bounds is a plausible "the GPU hung" on both vendors. #2683 makes the clamp the largest heap a host may make, and makes the two null buffer views fit inside the capped heap (before,no room for the null buffer viewsmeant they were never made). Worth a try before bisecting shaders: it removes one candidate rather than working around it.For the other candidate - one heavy compute launch -
VICTORY_SHADER_LOOP_LIMITshould have caught a runaway loop, and it did not, which points at a shader that loops a bounded number of times per thread but over a huge count read from memory (yourdispatch 16x16x16with 4 096 groups is not that by itself). Victory has no per-dispatch GPU timing, so that guess cannot be confirmed from the log yet; if a diagnostics-build timer around compute dispatches is acceptable, it would name the launch in one run.Also worth having in your report: the depth twins in
crate::twinare not the cause - an A/B with them switched off removed the threeunordered view of a depth texture ... twinlines and the removal was identical.@Marvisak on GitHub · 2026-11-25 18:47 UTC · original · edited 2026-11-26 00:51 UTC
Automated triage for the maintainers.
Run report: NVIDIA GeForce RTX 4060 8 GB, driver 32.0.16.2124, Windows 11 build 26300, 16 GB RAM plus a 32 GB paging file.
The hang. Earlier runs ended in
DXGI_ERROR_DEVICE_HUNG(0x887A0006) at one of two places:dispatch 16x16x16 [compute 00167d58cc5a78d7]("W"), on plainffe310e;indirect kind 2 max 1 [compute f607780aa8e502d0]("A"), on67e8ae1.These are the two programs narrowed down in #1968, the oldest complete report of this hang, and the hang as a whole is tracked in #71. The fix for A, #1906, has since landed on main as
2bba792:HostHeap::view_addressesincrates/victory-gpu/src/descriptor/host.rsnow has an entry for every dynamic slot too. Your latest run on main (22:43 UTC) with nothing skipped had no hang, which fits that fix. W's slowness on NVIDIA (structured views read raw) is still open in #2178 / #2885.The new failure. The title now stops on its own before the cinematic, while Windows reports 95 % memory in use. The log doesn't show the cause, so the claim that the console memory pool is mapped wrongly isn't established yet. The README says a run in the world takes about 33 GB of Windows commit and about 10 GB of video memory, so a 16 GB machine with an 8 GB card is below what was tested. To place it, please add:
crashes.logor the log mentions Windows error 1455 orE_OUTOFMEMORY;Generated by Claude Code
@cblfkrckst on GitHub · 2026-11-25 19:10 UTC · original
Hi Marvisak, thanks for the triage. Here is the missing information:
1. GPU and driver version:
2. Inline breadcrumbs from the crashes.log:
Hang 1 (
ffe310e, vanilla, no local patches, dispatch):unix time 1795628336, process 12084a list stopped at command 127 of 130 (op 6)command 127 (op 6): dispatch 16x16x16 [compute 00167d58cc5a78d7]device removed: 0x887A0006Hang 2 (
67e8ae1+ format patches, indirect kind 2):unix time 1795627360, process 10736a list stopped at command 97 of 127 (op 5)command 97 (op 5): indirect kind 2 max 1 [compute f607780aa8e502d0]device removed: 0x887A0006Hang 3 (main + format patches, list 17):
unix time 1795629112, process 5148a list stopped at command 127 of 130 (op 6)command 127 (op 6): dispatch 16x16x16 [compute 00167d58cc5a78d7]device removed: 0x887A00063. Regarding the local patches:
Yes, the runs on
67e8ae1and main had local patches applied forB4G4R4A4andB5G5R5A1to bypass the format validation errors. However, the run onffe310e(Hang 1) was vanilla, without those patches.4. Regarding PR #2683:
I have not tested #2683 yet.
@cblfkrckst on GitHub · 2026-11-25 22:50 UTC · original
Last update 11/25/2026 (22:43 UTC, latest
main):Hardware context:
I ran one last clean test with
VICTORY_SKIP_PIPELINESremoved. The results are consistent:BacktraceBreakpad) right before the cinematic.system.memory.free: ~690 MB).This confirms that the emulated Xbox's memory pool is not being mapped/allocated correctly by VIctory, and the title runs out of the memory it expects. The
crashes.logis empty (no GPU removal), so this is purely a memory allocation issue in the host VM.