NVIDIA RTX 4070 SUPER: D3D12 resource state validation failure when binding title buffer as vertex buffer #199
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#199
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?
@javijmgdev on GitHub · 2026-11-24 01:22 UTC · original
NVIDIA RTX 4070 SUPER: D3D12 resource state validation failure when binding title buffer as vertex buffer
Environment
9aef3d9c062387c126f1c8ebacc5b95937c1ab9dcargo build --profile diag -p victory --features diagnostics32.0.16.212410.0.26300, build26300Summary
VIctory successfully executes the title on an NVIDIA RTX 4070 SUPER.
The game passes the initial profile selection, accessibility settings and legal screens. The opening cinematic subsequently plays, including audio and subtitles, for several minutes.
The process eventually hangs and the host D3D12 device is removed with
DXGI_ERROR_DEVICE_HUNG (0x887A0006).Unlike a generic TDR, the D3D12 debug layer identifies a specific resource state validation error: a title buffer is still in
UNORDERED_ACCESSstate when VIctory binds it as a vertex buffer.Steps to reproduce
Build the diagnostics executable:
Set the environment variables:
Run the title without WARP:
The same resource state validation error was reproduced both with and without
VICTORY_GPU_TIMING=1.Observed result
The game reaches the opening cinematic and plays audio/subtitles. After several minutes, rendering slows down and the GPU device is removed.
The final diagnostic reports:
Affected resource:
The buffer range is approximately 174 MiB.
Possible area to investigate
The current implementation appears to handle title buffer barriers differently from texture barriers.
In
crates/victory-gpu/src/list.rs,host_barrier()cannot translate barriers for title buffers because their host copies are represented byShadowobjects. The current buffer barrier handling adds a global UAV barrier.In
crates/victory-gpu/src/draw.rs,State::prepare_for()callsshadow.refresh()and then binds the shadow buffer usingIASetVertexBuffers().Could the host shadow buffer be missing an explicit state transition from
D3D12_RESOURCE_STATE_UNORDERED_ACCESStoD3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFERbefore the draw?Index buffers may require equivalent handling for
D3D12_RESOURCE_STATE_INDEX_BUFFER.This is a suspected implementation issue, not a confirmed patch.
Additional observations
VICTORY_GPU_TIMINGenabled and disabled.Full diagnostic output and
crashes.logcan be supplied for further investigation.run-nvidia-normal.txt
crashes.log
@miniongk on GitHub · 2026-11-24 01:27 UTC · original
I’m investigating this on an RTX 5080 (driver 621.24), Windows 11 26300, with a local 1.0.2.1 copy. I’ll first check the current
mainand reproduce through the diagnostics path, then narrow the shadow-buffer state handoff for vertex/index binding. No game data or raw game logs will be posted. AI-assisted (Kimi Code).@miniongk on GitHub · 2026-11-24 01:59 UTC · original
Update from my RTX 5080 / 621.24 run on current
main(d2a4bae): the title reached the world and the host device was removed, but the diagnostic named a compute dispatch. I did not observe theIASetVertexBuffers/VERTEX_AND_CONSTANT_BUFFERvalidation failure reported here.So this is not an exact reproduction of #199, and I will not change the vertex/index state path on that evidence. The observed failure looks closer to #97, so I’m moving the investigation there. Only counts and error classes are shared; no game data or raw game logs.
@EduAzevedo on GitHub · 2026-11-24 02:17 UTC · original
I'll take this one: on an RTX 2070 SUPER (Turing, driver 610.88) current main (
d2a4bae) reproduces it every run with VICTORY_D3D12_DEBUG=1 (about 70 IASetVertexBuffers on a title buffer still in UNORDERED_ACCESS, plus about 140 barriers whose before state does not match). I'll look for where the vertex/index binding loses the transition and open a PR with before/after counts.@ghost on GitHub · 2026-11-24 02:27 UTC · original
RTX 3070 Ti (Ampere), driver 32.0.16.1742, Windows 11, Ryzen 7 7800X3D, current
main(d2a4bae). Reproduces.With
VICTORY_D3D12_DEBUG=1:IASetVertexBuffersontitle buffer 0xa3c0000+0xae00000while it is inUNORDERED_ACCESS, plus aResourceBarrierwhose before-state does not match the preceding state.Without the debug layer, the world loads black (minimap only) at ~1 fps, then the device is removed (0x887A0006) after a ~7 s submission of 32 lists.
Separately, with the debug layer on, the run ended with
memory allocation of 7372800 bytes failed(2560x1440x2) and 313 shaders were dropped (GFX10 ... a hardware SGPR input is not supported).No game data or raw game logs included.
@colehammond65 on GitHub · 2026-11-24 06:58 UTC · original
PR #334 runtime check on RTX 4080. The synthetic buffer-state unit test passed, but the debug-layer child test skipped because this Windows build has no usable D3D12 debug layer. I therefore cannot confirm whether error 538 disappeared. Independently, the world device removal remained in both baseline and #334 runs. Full report: #334
AI-assisted test report.
@Marvisak on GitHub · 2026-11-25 01:48 UTC · original
Automated triage for the maintainers.
This is the oldest complete report of the debug layer's error 538: a "title buffer" bound with
IASetVertexBufferswhile it is inUNORDERED_ACCESS. This issue is where it is tracked. The same failure is reported in #264 (RTX 5070 Ti Laptop), #548 (RTX 3070 Ti) and #1442 (RX 6600, so it is not NVIDIA-only), and in the RTX 2070 SUPER and RTX 3070 Ti comments above.mainhas not changed this. Shadow buffers are created inCOMMONbyHost::shared_buffer(crates/victory-gpu/src/host.rs), andcrates/victory-gpu/src/shadow.rsdoes not track their state.State::prepare_forincrates/victory-gpu/src/draw.rsbindsshadow.gpu(..)for vertex and index buffers without a transition, and nothing invictory-gpuever namesVERTEX_AND_CONSTANT_BUFFERorINDEX_BUFFER. One path that leaves a shadow explicitly inUNORDERED_ACCESSisindirect::done, which moves the argument buffer back there after each indirect execution. The merged #681 (vertex-buffer null unbind) only clears slots for a null view array and does not touch states. #588, which added these transitions, was closed without being merged. The open PRs for this are #1691 (tracks shadow-buffer states and transitions them for vertex/index buffers, views and indirect arguments) and #334. Whether fixing the state also removes the worldDEVICE_HUNGis not established yet; the #334 test above could not check it.Generated by Claude Code