D3D12 Shadows - 4060 ti #751

Open
opened 2026-11-26 04:13:55 +00:00 by github-bot · 3 comments
Owner

@⁠Alz97 on GitHub · 2026-11-24 09:29 UTC · original

  1. Identify each Shadow using its resource identity.
  2. Record the requested uses: vertex, index, SRV, UAV, indirect, and root descriptors.
  3. Coordinate states across all command lists in the same submission.
  4. Insert transitions when a subsequent use requires an incompatible state.
  5. Treat COMMON as the initial state of Shadows for each new submission, thanks to buffer decay.
  6. Also handle the ExecuteIndirect count buffer.
  7. Keep UAV barriers for write synchronization: they shouldn't be confused with state transitions.
    There's an additional constraint: the command lists are recorded before being submitted. So tracking can't just read the current GPU state during recording, ignoring the order in which the lists will actually run.
    The solution must respect the run order and any prelude lists.

State Conclusion
Initialized shadows in COMMON Demonstrated
Buffers can promote implicitly Documented
Buffers decay to COMMON at the end of submission Documented
Command lists of the same submission share state Documented
Shadows lack general state tracking Demonstrated
indirect::bound() assumes UAV Demonstrated
Possible vertex → UAV conflict Demonstrated as a possible path
This conflict causes the observed TDR Not yet demonstrated
Wave64 and shader incompatibility are separate issues Confirmed by logs

My conclusion: we’ve identified a possible structural cause of ResourceBarrier mismatches, concrete enough to justify an architectural fix. We shouldn’t yet blame it for the entire GPU crash.

The next step should be to examine the HostList code that creates, closes, gathers, and submits the lists, to precisely define where to insert tracking without violating execution order. Only then write.

**@⁠Alz97** on GitHub · 2026-11-24 09:29 UTC · [original](https://github.com/Marvisak/VIctory/issues/751) 1. Identify each Shadow using its resource identity. 2. Record the requested uses: vertex, index, SRV, UAV, indirect, and root descriptors. 3. Coordinate states across all command lists in the same submission. 4. Insert transitions when a subsequent use requires an incompatible state. 5. Treat COMMON as the initial state of Shadows for each new submission, thanks to buffer decay. 6. Also handle the ExecuteIndirect count buffer. 7. Keep UAV barriers for write synchronization: they shouldn't be confused with state transitions. There's an additional constraint: the command lists are recorded before being submitted. So tracking can't just read the current GPU state during recording, ignoring the order in which the lists will actually run. The solution must respect the run order and any prelude lists. State Conclusion Initialized shadows in COMMON Demonstrated Buffers can promote implicitly Documented Buffers decay to COMMON at the end of submission Documented Command lists of the same submission share state Documented Shadows lack general state tracking Demonstrated indirect::bound() assumes UAV Demonstrated Possible vertex → UAV conflict Demonstrated as a possible path This conflict causes the observed TDR Not yet demonstrated Wave64 and shader incompatibility are separate issues Confirmed by logs My conclusion: we’ve identified a possible structural cause of ResourceBarrier mismatches, concrete enough to justify an architectural fix. We shouldn’t yet blame it for the entire GPU crash. The next step should be to examine the HostList code that creates, closes, gathers, and submits the lists, to precisely define where to insert tracking without violating execution order. Only then write.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:13:55 +00:00
Author
Owner

@⁠Alz97 on GitHub · 2026-11-24 09:31 UTC · original

I've added $env:VICTORY_D3D12_DEBUG="1" and $env:VICTORY_D3D12_DRED="1" .

Command:

.\target\diag\victory.exe run "D:\GTA6-xbox\GTA6.Xbox.v1.0.2.1-CYBERLEEK\game_scarlett_master.exe" --execute 2>&1 |
Tee-Object -FilePath "E:\VIctory\log_debug_completo.txt" on latest commit.

**@⁠Alz97** on GitHub · 2026-11-24 09:31 UTC · [original](https://github.com/Marvisak/VIctory/issues/751#issuecomment-7127542319) I've added $env:VICTORY_D3D12_DEBUG="1" and $env:VICTORY_D3D12_DRED="1" . Command: .\target\diag\victory.exe run "D:\GTA6-xbox\GTA6.Xbox.v1.0.2.1-CYBERLEEK\game_scarlett_master.exe" --execute 2>&1 | Tee-Object -FilePath "E:\VIctory\log_debug_completo.txt" on latest commit.
Author
Owner

@⁠Alz97 on GitHub · 2026-11-24 09:37 UTC · original

log_debug_completo.txt

**@⁠Alz97** on GitHub · 2026-11-24 09:37 UTC · [original](https://github.com/Marvisak/VIctory/issues/751#issuecomment-7127661108) [log_debug_completo.txt](https://github.com/user-attachments/files/35323494/log_debug_completo.txt)
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 03:50 UTC · original

Automated triage for the maintainers.

The analysis is right about main. Shadow buffers (crates/victory-gpu/src/shadow.rs, created in COMMON by Host::shared_buffer) have no per-use state tracking. indirect::done in crates/victory-gpu/src/indirect.rs moves the argument buffer back to UNORDERED_ACCESS after each indirect execution. This resource-state mismatch is tracked in #199. Open PRs for it: #1691 (tracks shadow-buffer states) and #334. As you say, it hasn't been shown to cause the device removal.

@⁠Alz97, to place the run itself, please add:

  • the GPU driver version and Windows build;
  • the VIctory commit (git rev-parse --short HEAD; "latest" changes several times a day);
  • how far the title got, and the host GPU device removed ... / crashes.log lines from the attached log.

Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 03:50 UTC · [original](https://github.com/Marvisak/VIctory/issues/751#issuecomment-7152288839) <!-- victory-issue-triage v1 verdict=needs-info seen=2026-11-24T09:37:11Z at=2026-11-25T03:50:23Z --> Automated triage for the maintainers. The analysis is right about `main`. Shadow buffers (`crates/victory-gpu/src/shadow.rs`, created in `COMMON` by `Host::shared_buffer`) have no per-use state tracking. `indirect::done` in `crates/victory-gpu/src/indirect.rs` moves the argument buffer back to `UNORDERED_ACCESS` after each indirect execution. This resource-state mismatch is tracked in **#199**. Open PRs for it: #1691 (tracks shadow-buffer states) and #334. As you say, it hasn't been shown to cause the device removal. @⁠Alz97, to place the run itself, please add: - the GPU driver version and Windows build; - the VIctory commit (`git rev-parse --short HEAD`; "latest" changes several times a day); - how far the title got, and the `host GPU device removed ...` / `crashes.log` lines from the attached log. --- _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#751
No description provided.