NVIDIA RTX 4070 SUPER: D3D12 resource state validation failure when binding title buffer as vertex buffer #199

Open
opened 2026-11-26 03:54:23 +00:00 by github-bot · 6 comments
Owner

@⁠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

  • VIctory commit: 9aef3d9c062387c126f1c8ebacc5b95937c1ab9d
  • Build: cargo build --profile diag -p victory --features diagnostics
  • CPU: AMD Ryzen 7 5800X
  • RAM: 32 GB
  • GPU: NVIDIA GeForce RTX 4070 SUPER (12 GB)
  • NVIDIA driver: 32.0.16.2124
  • OS: Windows 11 Home, version 10.0.26300, build 26300
  • Title: Xbox Series X build 1.0.2.1

Summary

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_ACCESS state when VIctory binds it as a vertex buffer.

Steps to reproduce

Build the diagnostics executable:

cargo build --profile diag -p victory --features diagnostics

Set the environment variables:

$env:VICTORY_D3D12_DRED = "1"
$env:VICTORY_D3D12_DEBUG = "1"
$env:VICTORY_LOG = "info"

Run the title without WARP:

.\target\diag\victory.exe run "<game directory>\game_scarlett_master.exe" --execute

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:

DXGI_ERROR_DEVICE_HUNG (0x887A0006)

ID3D12CommandList::DrawIndexedInstanced:
Using IASetVertexBuffers

Resource state:
D3D12_RESOURCE_STATE_UNORDERED_ACCESS

Expected:
D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER

Actual:
D3D12_RESOURCE_STATE_UNORDERED_ACCESS

Missing State:
D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER

Affected resource:

title buffer 0x19b10000+0xae00000

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 by Shadow objects. The current buffer barrier handling adds a global UAV barrier.

In crates/victory-gpu/src/draw.rs, State::prepare_for() calls shadow.refresh() and then binds the shadow buffer using IASetVertexBuffers().

Could the host shadow buffer be missing an explicit state transition from D3D12_RESOURCE_STATE_UNORDERED_ACCESS to D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER before 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

  • The same state validation error occurs with VICTORY_GPU_TIMING enabled and disabled.
  • A separate WARP run fails earlier with a Wave64 compatibility limitation; it does not reproduce this exact NVIDIA validation error.
  • The failure happens after the title has executed substantial real game code, including its opening cinematic.
  • No game binaries, archives or proprietary assets are attached.

Full diagnostic output and crashes.log can be supplied for further investigation.

run-nvidia-normal.txt

crashes.log

**@⁠javijmgdev** on GitHub · 2026-11-24 01:22 UTC · [original](https://github.com/Marvisak/VIctory/issues/199) # NVIDIA RTX 4070 SUPER: D3D12 resource state validation failure when binding title buffer as vertex buffer ## Environment - VIctory commit: `9aef3d9c062387c126f1c8ebacc5b95937c1ab9d` - Build: `cargo build --profile diag -p victory --features diagnostics` - CPU: AMD Ryzen 7 5800X - RAM: 32 GB - GPU: NVIDIA GeForce RTX 4070 SUPER (12 GB) - NVIDIA driver: `32.0.16.2124` - OS: Windows 11 Home, version `10.0.26300`, build `26300` - Title: Xbox Series X build 1.0.2.1 ## Summary 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_ACCESS` state when VIctory binds it as a vertex buffer. ## Steps to reproduce Build the diagnostics executable: ```powershell cargo build --profile diag -p victory --features diagnostics ``` Set the environment variables: ```powershell $env:VICTORY_D3D12_DRED = "1" $env:VICTORY_D3D12_DEBUG = "1" $env:VICTORY_LOG = "info" ``` Run the title without WARP: ```powershell .\target\diag\victory.exe run "<game directory>\game_scarlett_master.exe" --execute ``` 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: ```text DXGI_ERROR_DEVICE_HUNG (0x887A0006) ID3D12CommandList::DrawIndexedInstanced: Using IASetVertexBuffers Resource state: D3D12_RESOURCE_STATE_UNORDERED_ACCESS Expected: D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER Actual: D3D12_RESOURCE_STATE_UNORDERED_ACCESS Missing State: D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER ``` Affected resource: ```text title buffer 0x19b10000+0xae00000 ``` 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 by `Shadow` objects. The current buffer barrier handling adds a global UAV barrier. In `crates/victory-gpu/src/draw.rs`, `State::prepare_for()` calls `shadow.refresh()` and then binds the shadow buffer using `IASetVertexBuffers()`. Could the host shadow buffer be missing an explicit state transition from `D3D12_RESOURCE_STATE_UNORDERED_ACCESS` to `D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER` before 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 - The same state validation error occurs with `VICTORY_GPU_TIMING` enabled and disabled. - A separate WARP run fails earlier with a Wave64 compatibility limitation; it does not reproduce this exact NVIDIA validation error. - The failure happens after the title has executed substantial real game code, including its opening cinematic. - No game binaries, archives or proprietary assets are attached. Full diagnostic output and `crashes.log` can be supplied for further investigation. [run-nvidia-normal.txt](https://github.com/user-attachments/files/35306206/run-nvidia-normal.txt) [crashes.log](https://github.com/user-attachments/files/35306220/crashes.log)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:54:23 +00:00
Author
Owner

@⁠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 main and 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:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/199#issuecomment-7119124752) 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 `main` and 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).
Author
Owner

@⁠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 the IASetVertexBuffers / VERTEX_AND_CONSTANT_BUFFER validation 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.

**@⁠miniongk** on GitHub · 2026-11-24 01:59 UTC · [original](https://github.com/Marvisak/VIctory/issues/199#issuecomment-7119641064) 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 the `IASetVertexBuffers` / `VERTEX_AND_CONSTANT_BUFFER` validation 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.
Author
Owner

@⁠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.

**@⁠EduAzevedo** on GitHub · 2026-11-24 02:17 UTC · [original](https://github.com/Marvisak/VIctory/issues/199#issuecomment-7119974749) 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.
Author
Owner

@⁠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: IASetVertexBuffers on title buffer 0xa3c0000+0xae00000 while it is in UNORDERED_ACCESS, plus a ResourceBarrier whose 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.

**@⁠ghost** on GitHub · 2026-11-24 02:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/199#issuecomment-7120168803) RTX 3070 Ti (Ampere), driver 32.0.16.1742, Windows 11, Ryzen 7 7800X3D, current `main` (`d2a4bae`). Reproduces. With `VICTORY_D3D12_DEBUG=1`: `IASetVertexBuffers` on `title buffer 0xa3c0000+0xae00000` while it is in `UNORDERED_ACCESS`, plus a `ResourceBarrier` whose 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.
Author
Owner

@⁠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.

**@⁠colehammond65** on GitHub · 2026-11-24 06:58 UTC · [original](https://github.com/Marvisak/VIctory/issues/199#issuecomment-7124481651) **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: https://git.gtahub.st/github/Marvisak--VIctory/pulls/334 AI-assisted test report.
Author
Owner

@⁠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 IASetVertexBuffers while it is in UNORDERED_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.

main has not changed this. Shadow buffers are created in COMMON by Host::shared_buffer (crates/victory-gpu/src/host.rs), and crates/victory-gpu/src/shadow.rs does not track their state. State::prepare_for in crates/victory-gpu/src/draw.rs binds shadow.gpu(..) for vertex and index buffers without a transition, and nothing in victory-gpu ever names VERTEX_AND_CONSTANT_BUFFER or INDEX_BUFFER. One path that leaves a shadow explicitly in UNORDERED_ACCESS is indirect::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 world DEVICE_HUNG is not established yet; the #334 test above could not check it.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:48 UTC · [original](https://github.com/Marvisak/VIctory/issues/199#issuecomment-7149989230) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T06:58:27Z at=2026-11-25T01:48:47Z --> Automated triage for the maintainers. This is the oldest complete report of the debug layer's error 538: a "title buffer" bound with `IASetVertexBuffers` while it is in `UNORDERED_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. `main` has not changed this. Shadow buffers are created in `COMMON` by `Host::shared_buffer` (`crates/victory-gpu/src/host.rs`), and `crates/victory-gpu/src/shadow.rs` does not track their state. `State::prepare_for` in `crates/victory-gpu/src/draw.rs` binds `shadow.gpu(..)` for vertex and index buffers without a transition, and nothing in `victory-gpu` ever names `VERTEX_AND_CONSTANT_BUFFER` or `INDEX_BUFFER`. One path that leaves a shadow explicitly in `UNORDERED_ACCESS` is `indirect::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 world `DEVICE_HUNG` is not established yet; the #334 test above could not check it. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#199
No description provided.