Repository navigation
Fix GPU hangs, memory leak, and mesh shader exports; render intro cre… - #458
techselect wants to merge 1 commit into
Conversation
…dit text This change stabilizes world loading and enables rendering intro credit text in GTA VI: 1. Mesh Shader Output Clamping: - Added bounds guards in emit_indices and export against max_primitives and max_vertices. - Prevents WARP 0xC0000005 access violations and discrete GPU hardware traps/hangs on DispatchMesh. 2. Command List Slicing & TDR Watchdog Reset: - Split monolithic multi-list command submissions into per-list ExecuteCommandLists calls with intermediate fence synchronization. - Resets Windows WDDM 2.0s TDR watchdog between lists, preventing driver resets. 3. 60GB Memory Leak Resolution: - Added LRU cache eviction (capped at 384 entries) for PLACED_TEXTURES in resource.rs. - Hooked title_memory_remapped and XMemFreeDefault to evict freed textures and loose 4MB shadow buffers. 4. Shared Buffer State Collision Resolution: - Unified buffer read states under BUFFER_GENERIC_READ (0xAC3) in host.rs. 5. Indirect Draw Barrier Desynchronization Fix: - Routed indirect argument buffer barriers through transition_buffer; eliminated rogue UNORDERED_ACCESS state forcing in indirect::done. 6. Discrete GPU Selection & DRED in Release: - Prioritized discrete high-performance GPUs over integrated/WARP. - Enabled DRED crash diagnostics in release builds via VICTORY_D3D12_DRED=1.
|
Built
So the tree compiles and the synthetic suites do not regress. The claims that need the title — WARP Coordination: this is a 14-file PR mixing independent fixes.
|
|
Booted into prologue but lacking models |
|
Tested
The guard change may have moved the fault off the mesh exports (this death is a compute indirect, not a DispatchMesh) without removing the underlying bad read. Happy to run anything on this box — the near-constant fault VA may be the sharpest lead in this whole thing. |
|
Tested
So this does not resolve #97 on my hardware as a standalone change. A combination test would be needed to separate the mesh guard from the other fixes. Only aggregate counts and error classes shared. AI-assisted (Kimi Code). |
|
Combination follow-up on the RTX 5080 / 621.24 setup: The resource/watch overlaps were resolved locally so LRU eviction also advances the bindless invalidation epoch. This is not a world-stability fix on my setup. Only aggregate counts and error classes shared. AI-assisted (Kimi Code). |
|
Local validation on Windows 11 with an AMD Radeon RX 6750 XT (driver 32.0.21045.29003), against PR head 360f382:
These are unit, D3D12-device, build, and loader-preparation checks; they do not test title execution or world rendering. Full logs as downloadable files are in a public diagnostics branch, separate from the PR diff: log index · workspace tests · D3D12 hardware check · original preflight · latest shader tests · latest Clippy · merged-source preflight · launch blocker checks. Sync update (2026-11-24): Marvisak/VIctory On the merged source, the shader suite passed (120 passed, 1 ignored), Clippy passed, and the diagnostic build/preflight resolved all imports. The title entry point was not executed: Defender history reports the supplied EXE as |
|
From a tester working with Claude (AI-assisted); measured on my own machine. Combined with the buffer-state tracker this PR adds, Seen: RTX 5090 (621.24), diag build with Why:
A buffer can't be in the indirect-argument and UAV states at the same time, so no barrier ordering fixes this. Fix: Branch on top of this PR: https://github.com/claude-GTA6/VIctory/tree/indirect-copy-on-458 (one commit, 49e15fe; was aaacaf3 before an author-metadata rewrite).
|
The rewrite pass already writes records at or past the title's count as empty draws, so ExecuteIndirect does not need the count: it now runs all records from the list's own arguments buffer, with no count buffer. The rectangle path then changes the state of no title buffer: the count's host copy was moved to INDIRECT_ARGUMENT and back around the draw, which a buffer-state tracker such as Marvisak#458 or Marvisak#334 may have moved elsewhere, and which the draw's own shaders may need in another state (reported by claude-GTA6 on Marvisak#346: a device removal with Marvisak#458 stacked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rewrite pass already writes records at or past the title's count as empty draws, so ExecuteIndirect does not need the count: it now runs all records from the list's own arguments buffer, with no count buffer. The rectangle path then changes the state of no title buffer: the count's host copy was moved to INDIRECT_ARGUMENT and back around the draw, which a buffer-state tracker such as Marvisak#458 or Marvisak#334 may have moved elsewhere, and which the draw's own shaders may need in another state (reported by claude-GTA6 on Marvisak#346: a device removal with Marvisak#458 stacked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rewrite pass already writes records at or past the title's count as empty draws, so ExecuteIndirect does not need the count: it now runs all records from the list's own arguments buffer, with no count buffer. The rectangle path then changes the state of no title buffer: the count's host copy was moved to INDIRECT_ARGUMENT and back around the draw, which a buffer-state tracker such as Marvisak#458 or Marvisak#334 may have moved elsewhere, and which the draw's own shaders may need in another state (reported by claude-GTA6 on Marvisak#346: a device removal with Marvisak#458 stacked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rewrite pass already writes records at or past the title's count as empty draws, so ExecuteIndirect does not need the count: it now runs all records from the list's own arguments buffer, with no count buffer. The rectangle path then changes the state of no title buffer: the count's host copy was moved to INDIRECT_ARGUMENT and back around the draw, which a buffer-state tracker such as Marvisak#458 or Marvisak#334 may have moved elsewhere, and which the draw's own shaders may need in another state (reported by claude-GTA6 on Marvisak#346: a device removal with Marvisak#458 stacked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit b43e8a7)
The backstop cap on placed textures (from Marvisak#458) was 384, while the prologue's world views thousands of streamed textures. Memory the title remaps or frees still releases them. Diagnostics builds also log, every ten seconds, how many heap textures the uploader knows, has copied and found empty, the formats of the views it sees, and the outcome of each texture view made in a host heap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The rewrite pass already writes records at or past the title's count as empty draws, so ExecuteIndirect does not need the count: it now runs all records from the list's own arguments buffer, with no count buffer. The rectangle path then changes the state of no title buffer: the count's host copy was moved to INDIRECT_ARGUMENT and back around the draw, which a buffer-state tracker such as Marvisak#458 or Marvisak#334 may have moved elsewhere, and which the draw's own shaders may need in another state (reported by claude-GTA6 on Marvisak#346: a device removal with Marvisak#458 stacked). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. Needs rebase. This PR does not merge cleanly into current The content has not been reviewed yet; it will be once the branch is rebased onto Generated by Claude Code |
The rewrite pass already writes records at or past the title's count as empty draws, so ExecuteIndirect does not need the count: it now runs all records from the list's own arguments buffer, with no count buffer. The rectangle path then changes the state of no title buffer: the count's host copy was moved to INDIRECT_ARGUMENT and back around the draw, which a buffer-state tracker such as Marvisak#458 or Marvisak#334 may have moved elsewhere, and which the draw's own shaders may need in another state (reported by

…dit text
This change stabilizes world loading and enables rendering intro credit text in GTA VI:
Mesh Shader Output Clamping:
Command List Slicing & TDR Watchdog Reset:
60GB Memory Leak Resolution:
Shared Buffer State Collision Resolution:
Indirect Draw Barrier Desynchronization Fix:
Discrete GPU Selection & DRED in Release: