Repository navigation
GPU: on NVIDIA, structured buffer views are made raw (port of upstream #2464, FIND-11) - #15
Merged
Merged
Conversation
Port of upstream PR Marvisak#2464 (claude-GTA6, AI-assisted, design from fxceless/victory-fork's raw_window). FIND-11 / upstream Marvisak#1744: a scalar or offset-only buffer read is translated as a rawBufferLoad at a byte offset; when the slot holds the title's structured view, D3D12 leaves that read undefined and NVIDIA took the byte offset as the element, so WindNew's loop counts came from other records' data and its loops ran until the device was reset (opening-credits hang on NVIDIA). buffer_srv: on an NVIDIA host a structured SRV becomes a raw view (R32_TYPELESS + RAW) over the same bytes when they start on 16 bytes; otherwise it stays structured and logs once. VICTORY_RAW_STRUCTURED overrides the vendor check. host_vendor() reads the adapter vendor once by LUID. Shaders are unchanged: reads by element keep their structured handle, which NVIDIA and WARP read right on a raw view (AMD reads element 0, so other hosts are unchanged). No shader-cache or pipeline-library rebuild is needed. Co-authored-by: openhands <openhands@all-hands.dev>
MagiccConch
marked this pull request as ready for review
November 25, 2026 17:36
MagiccConch
pushed a commit
that referenced
this pull request
Nov 25, 2026
…tudy Co-authored-by: openhands <openhands@all-hands.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of upstream PR Marvisak#2464 (claude-GTA6, AI-assisted there; design from fxceless/victory-fork's
raw_window) into the fork. This is FIND-11 / upstream Marvisak#1744 — one of the two NVIDIA root causes in the 5-test failure family.The bug. A scalar or offset-only buffer read is translated as
rawBufferLoadat a byte offset through a raw handle. When the heap slot holds the title's structured view, that combination is undefined in D3D12, and NVIDIA takes the byte offset as the element: bytebreads elementb/4at the view's own stride. GTA VI hits this inWindNew:CS_CopyLatestWindFieldForRenderingWithSmooth, which reads its loop counts that way fromt71— the counts came out as other records' data and the loops ran until Windows reset the device (an opening-credits device hang on NVIDIA wave32 cards).The change (host side only; shaders and DXIL unchanged):
descriptor/host.rs buffer_srv: on an NVIDIA host, a structured SRV becomes a raw view (R32_TYPELESS+RAW) over the same bytes when they start on 16 bytes and whole dwords; otherwise it stays structured and logs once.VICTORY_RAW_STRUCTURED=0/1overrides the vendor check.host.rs host_vendor(): reads the host device's adapter vendor once, by LUID.Reads by element keep their structured handle, which NVIDIA and WARP read right on a raw view; AMD reads element 0 there, so other vendors are untouched. Upstream's PR verified a ~9-minute game run into the prologue with no device removal on NVIDIA, with 0 pipelines refused for compiler memory (the shader-side "both ways" variant had made 569 pipelines refuse with E_OUTOFMEMORY — which is why this is host-only).
Fork relevance: directly de-risks the RTX 5080 run-10 world/credits path. No pre-build re-run needed — the shader cache and pipeline library are untouched; a rebuild of
victorypicks it up.Local signal:
cargo check+clippy -p victory-gpu --all-features --all-targets --target x86_64-pc-windows-gnuclean. Real test signal on CI windows-latest.Attribution: upstream PR Marvisak#2464 by claude-GTA6 (Claude Code, their session), design from fxceless/victory-fork; root-cause numbers by kappalegoat and marquezinii in upstream Marvisak#1744.
🤖 This PR was ported by an AI agent (OpenHands) on behalf of the fork maintainer.