Host GPU device removed on RTX 4070 (diag build, DRED) - many shaders fail to translate #97
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#97
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?
@TheLad808 on GitHub · 2026-11-24 00:27 UTC · original
I tried VIctory and hit the host GPU failure described in the README. Here are my details in case they help, since the README says it has only been tested on an AMD RX 6700 XT.
System
git rev-parse --short HEADin the repo folder]What I ran
cargo build --profile diag -p victory --features diagnosticsVICTORY_D3D12_DEBUG=1andVICTORY_D3D12_DRED=1target\diag\victory.exe run <title exe> --execute, output saved to a fileWhat happened
Uav s0+288: uav None, and one SRV buffer is at address 31960662016 (about 30 GB in), which may fall outside the 4 GB window mentioned in the README. I'm not sure whether either is the cause.Warnings before the crash
Here's the error txt file
out2.docx
@engme66 on GitHub · 2026-11-24 01:34 UTC · original
Same 0x887A0004 + 0x887A0006 pair on an RTX 2070 Super, after the world title card:
Setup
d2a4bae(82 commits), built from source with Rust 1.98.1What happened
After rebuilding with PR #58 (v_swap_b32 lowering,
4a8a058), the earlier crashes are gone: the device-removed from the null-descriptor bug (fixed by8c26061) and thev_swap_b32/ null-write crash at+0x23cf683no longer occur.This run got through the menus and the Americas loading screen, into the world intro — the "VICE CITY, TWO YEARS AGO" title card rendered at 1 fps, 1017 draws/frame, with game audio working.
Right after the title card, the run died with a host GPU device removal:
Why this is still worth reporting
8c26061null-descriptor device removal — that one had no0x887A0004, and this run got past the point where it used to fail.v_swap_b32crash — that shader now translates (PR #58), and there is no0xc0000005/+0x23cf683in this run.0x887A0004: "The specified device interface or feature level is not supported on this system", on a 17-list submission in the world, on an NVIDIA Turing card. The README only lists testing on an RX 6700 XT.I have not yet run a diagnostics build with
VICTORY_D3D12_DEBUG=1crashes.log
@miniongk on GitHub · 2026-11-24 02:03 UTC · original
I can reproduce this failure class on current
main(d2a4bae), RTX 5080, driver 621.24, Windows 11 26300, using a local 1.0.2.1 copy. The title reaches the world, then the host device is removed withDXGI_ERROR_DEVICE_HUNGafter a compute dispatch. I will investigate the current failing path and check it against the existing shader PRs before changing code. Only counts and error classes will be shared, not game data or raw game logs. AI-assisted (Kimi Code).@ChruutvoLuzi on GitHub · 2026-11-24 02:09 UTC · original
These programs also bring down the software adapter, already in the menus, which may make this easier to test without hanging a GPU.
mainatd2a4bae, diag build,VICTORY_D3D12_WARP=1, Xbox Series 1.0.2.1. Three runs ended 85 to 108 s after start, before the world. Each time 25 to 32 first-chance access violations read address 0 at the same address in WARP's compiled shader code (frames below it ind3d10warp.dll), and the device was removed with0x887A0005.With
VICTORY_D3D12_DRED=1, the commands the list last noted were dispatches of25c5ee5063e1a41f(three of them),2a3522dae6b66c17and269b802f878c24e1. With those three inVICTORY_SKIP_PIPELINES, the next run died the same way at1547305c505a7559. All of them bind alike:u4=0xa67100points at heap slot 340872, which was never made, andu8(oru5) is one of the title's low slots, 0 to 11. Those hold views without a resource, such asShader(0, [42, 8, 5768, …])at slot 3 andUnordered(0, 0, [42, 4, …])at slot 6, or nothing at all. ka1qux found the same pattern on WARP in the world ford3e44e754b3eb6aa(sameUnordered(0, 0, [42, 4, …])at slot 6) andda1656ad2910e4c7, see #135, where1547305c505a7559also appears right after them.On an RTX 4090 the same
mainbuild runs these menus at 30 fps without trouble, so real GPUs seem to tolerate what WARP does not.AI-assisted (Claude Code).
@miniongk on GitHub · 2026-11-24 02:15 UTC · original
Additional isolation on RTX 5080 / 621.24:
VICTORY_SKIP_PIPELINES=8c8f0165ddd5199d: the first mesh pipeline is skipped, but the device is still removed in a later mesh draw (b68376181e9c8b2f/867e520305f703b2).VICTORY_SHADER_LOOP_LIMIT=1000: no improvement; the device is removed at the same stage.d0fd9bfselectsWave32, removes the host-pipeline refusals seen onmain, and passes its workspace tests, but the device is still removed in a mesh submission.This no longer looks specific to one pipeline or a long shader loop. I am not changing code on guesswork; next would be isolating host descriptor/resource lifetime or mesh-draw state with a synthetic reproduction. AI-assisted (Kimi Code).
@miniongk on GitHub · 2026-11-24 02:20 UTC · original
WARP comparison on #189 head
d0fd9bf, same local copy and diagnostics: it reaches the world withoutDXGI_ERROR_DEVICE_HUNG, then after about 1,180 host pipelines the process takes an access violation ind3d10warp.dllon a write, with no D3D12 debug-layer error before it.The hardware and software paths therefore both fail after substantial mesh/compute submission, but differently. That points more toward invalid descriptor/resource data reaching the host than a pure NVIDIA TDR. I am not changing code until this can be reduced to a minimal synthetic case. AI-assisted (Kimi Code).
@miniongk on GitHub · 2026-11-24 03:33 UTC · original
Two more existing-PR comparisons on the RTX 5080 / driver 621.24 setup, using the local 1.0.2.1 copy:
bffaefd): workspace tests passed, but both WARP and native hardware still hit host device failures. Its null/unmapped root-view fallback warnings did not occur in these runs.a5ba4a4): workspace tests passed (281 passed, 0 failed). Host pipeline refusals and the divergent cross-lane translation errors from #189 were removed, but the native run still ended inDXGI_ERROR_DEVICE_HUNG; DRED implicated mesh dispatch and indirect execution.I am testing these existing PRs rather than writing duplicate implementations. The device-removal investigation in this issue remains open. Only aggregate results and error classes shared. AI-assisted (Kimi Code).
@miniongk on GitHub · 2026-11-24 05:52 UTC · original
Current status after testing the existing PRs rather than duplicating them: a local combination of #413, #320, #483, #89, #137, #458 and #566 passes its serial workspace suite (310 passed, 0 failed). On the native RTX 5080 path, this run had no host-device removal, no host-pipeline refusals, and no packed-texture/readback warnings, but still reached the same explicit null-write fatal path in title code seen with the #413 combination.
So the original device hang is not shown to be resolved, and there is a separate title-side fatal path to investigate before a meaningful world-stability claim. Detailed per-PR comparisons are posted on #294, #320, #307, #483, #89, #413, #137 and #458. No game data or raw game logs shared. AI-assisted (Kimi Code).
@iurysf on GitHub · 2026-11-24 06:05 UTC · original
For the RTX 4070 removal specifically: #493 (bounded root SRVs, it includes #336) together with #483 stopped it on our RTX 4070. No removal in 300 s runs on main
d2a4bae, where it happened every run. Disabling only the bounded root SRVs (VICTORY_ROOT_SRV_DIRECT=1) brings it back. The combination in the comment above doesn't include #493, which may be why the original hang isn't shown as resolved there. Measurements: #493@rocobalt1 on GitHub · 2026-11-24 06:53 UTC · original
RTX 4060 Ti: with TdrDelay raised, the world hang becomes a deterministic title crash at +0x23cf683
Machine data for the "host GPU device removed" report. One package, one build, five GPU
runs. Nothing here is game data: only hashes, HRESULTs, a crash address and frame counters
that VIctory already logs.
Environment
cargo build --release -p victory, HEADd2a4bae(Rust 1.98.1), and thediagprofile for the validation runvictory.exe run <game>\game_scarlett_master.exe --executeWithout a TDR delay: device hung
Four runs reported a device removal with the default
TdrDelay(2 s), all withVICTORY_D3D12_DRED=1:0x887A0004reported first,crashes.logadds0x887A0006 The GPU will not respond to more commandsDRED reports no breadcrumbs. Submission size does not decide it: 8 lists failed as
readily as 32.
With TdrDelay=60: no device removal, the title crashes instead
HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDriversset toTdrDelay=60andTdrDdiDelay=60, rebooted, five runs since:peak dropped 1380draws in one frame,lowest fps 0.6Same address, same frame
+0x2215c35, same null write, on the hardware adapter and onWARP. That is consistent with the hang having been a timeout: with a long enough budget the
submission completes, and what remains is a title-side null write during the world load.
Note the cost: with
TdrDelay=60a real hang freezes the desktop for up to a minute.Three host textures fail to create, and the format is not the reason
VICTORY_D3D12_DEBUG=1on the diag profile:Format 86 is
B5G5R5A1_UNORM, 115 isB4G4R4A4_UNORM. Two local variants were tried:R8G8B8A8_UNORM(28) and keep the flagsA plain
R8G8B8A8_UNORMrender target at 2560x1440 cannot be rejected for its format, sowhat
CreateCommittedResourcerefuses is elsewhere in the description. The first suspectsare the initial state (
legal_for(d.flags, texture_state(state))inhost_texture) and theclear value passed through.
Reproduce
@colehammond65 on GitHub · 2026-11-24 06:58 UTC · original
RTX 4080 reproduces the same failure class. Four DRED-enabled runs reached the world, then exited with
0x887A0005; the removed reason was0x887A0006. The stopped command wasEXECUTE_INDIRECT(op 5) orDISPATCH_MESH(op 42), with no page fault. PR #334 did not prevent the removal. Full report: #334AI-assisted test report.
@iurysf on GitHub · 2026-11-24 09:08 UTC · original
Same
+0x23cf683fault on an RTX 4070: 7 of 7 of our runs with GPU-based validation on (which slows the GPU without a TDR) ended there before the world. That matches @rocobalt1's TdrDelay=60 runs. It is the title's own watchdog, analysed in #454 and in #71, which adds an opt-inVICTORY_NO_WATCHDOG=1. Details on #454. AI-assisted.@Callimann8 on GitHub · 2026-11-24 10:46 UTC · original
Another RTX 4070 data point (Laptop GPU, driver 32.0.16.2114, Ryzen 9 7945HX, Win 11 26300, diag build, dGPU forced via Windows GPU preference).
Result on main
ffe310e: boot, first-boot screens, intro, menus and the world load all work. The world's title card renders at 0.5-1.2 fps, then the device is removed (DXGI_ERROR_DEVICE_HUNG) about 25-45 s into the world. 22 runs, every one hung.Real hang, not slow work: with
TdrDelayraised to 60 s, the last frame is presented, nvlddmkm logs Event 153 (engine reset) 8 s later, well inside the 60 s, and the host logs nothing for 30 s. Then the title's own crash handler (Breakpad) fires and the process exits.Tested on top of main, none of them fix it:
victory-gpu/src/draw.rs)Other things ruled out (diag switches):
VICTORY_SHADER_LOOP_LIMIT=1024: still hangs.VICTORY_SKIP_PIPELINESwith the 5 mesh pipelines in the stalled list (4adfa13bea1c556a,fa746ce8f67dac96,4616c1b5011f1d90,f811432cfa6a15b3,3a93976a475b8bdb): the stall moves tomesh a26422c01dcf5612 + pixel 6a3a8d3fe52b4eab.WaveSize(32)(115 pipelines otherwise refused with "wants wave lane count of 64"): 0 refused, still hangs.Debug layer (
VICTORY_D3D12_DEBUG=1): no errors at the hang. Warnings: atitle bufferused as a vertex buffer while inUNORDERED_ACCESS(37x), plus barrier before-state mismatches (70x), as in #548.DRED and full logs are available if useful (no game data).
@Marvisak on GitHub · 2026-11-25 01:47 UTC · original · edited 2026-11-25 18:44 UTC
Automated triage for the maintainers.
Thank you for the report and the DRED data. This is the NVIDIA device removal in mesh/compute work, which is tracked in #71 (other reports: #99, #264, #468, #496, #619, #1107). The
host pipeline refused ... 0x80070057warnings for compute programs match whatmaindoes:Lower::newincrates/victory-shader/src/emit/lower.rsdeclaresWaveSize(64)for wave64 programs that depend on the lane layout, and a 32-lane NVIDIA GPU refuses them (README: "some compute programs need a GPU with 64-lane waves").New (18:10Z,
13f91ca, RTX 2070 Super): the debug layer now names an invalid call (0x887A0001) instead of a hang.CreateCommittedResource3rejects a texture flagged as a render target whose clear value isB4G4R4A4_UNORM, a format that PC D3D12 on this card does not accept as a render target. This is confirmed inmain.host_descincrates/victory-gpu/src/resource.rskeeps the console's render-target flag whatever the format is.make_texturepasses the title's clear value through with onlypc_formatapplied, and neither of them asks the host whether the format can be used that way. This is the render-target counterpart of #1753 (B5G5R5A1_UNORMflagged for unordered access, the same packed formats 86/115). The open PRs for #1753 (#2459, #1787 and #1763) only drop or refuse the unordered-access side, so they would not clear this one.Generated by Claude Code
@engme66 on GitHub · 2026-11-25 18:10 UTC · original
Same crash on
13f91ca, RTX 2070 Super — diag build names the command:Setup
13f91ca, diag build (VICTORY_D3D12_DEBUG=1+VICTORY_D3D12_DRED=1)What happened
0x887A0004+0x887A0001(invalid call). Same on a second run after 5 lists.ID3D12Device::CreateCommittedResource3: When D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET is set in D3D12_RESOURCE_DESC::Flags, D3D12_CLEAR_VALUE::Format must be valid to be used as a render target. FeatureLevel is D3D_FEATURE_LEVEL_12_2. D3D12_CLEAR_VALUE::Format is B4G4R4A4_UNORM.