Repository navigation
Conversation
…k#2699) In the user-data loop, a dword numbered `ROOT_VIEW_OFFSET` (4) was taken for a root view's offset without asking whether the parameter was a root descriptor at all. Root constants with five or more dwords have a real dword 4; it was looked up as a root view, none was found, and the draw or dispatch was refused ("a root view's offset: no root view, or outside title buffers") with no log line. The ray-tracing builder's dispatches were among the casualties. Ask `u.root == RootType::Descriptor` too, through a helper beside `is_root_view`, so a root constant's dword 4 goes to the title's user data as the value it is. The test pins the predicate: descriptor dword 4 is an offset, constants and table dword 4 are not.
|
The same WARP shader goes through VIctory's dispatch and reads a user-data word into a buffer. A root constant at dword 4 leaves the output at 0 on main 13f91ca and writes 1.25 on 7bb3eba. The control puts a real root view 16 bytes into its buffer and reads the offset 16 on both revisions. Six paired runs across both debug settings reproduced this. The serial GPU suite had 200 passes and one ignored in each setting. Strict GPU Clippy in both configurations and asset policy passed. Test-only commit c4e53db is directly on your current head and checks the dispatch and readback in addition to the predicate. Please keep the Git author if you cherry-pick it, or add this trailer if folding it into another commit: Co-authored-by: andrewpozdnakov7-jpg andrewpozdnakov7-jpg@users.noreply.github.com |
|
Real bug, minimal fix - dword 4 is ROOT_VIEW_OFFSET only in the root-descriptor encoding; a constants param has a genuine value there. Gating on root == Descriptor matches how is_root_view already treats the namespace. The predicate test pins all three root types. |
|
Independent Windows 11 + NVIDIA GeForce RTX 5090 + WARP verification and full-repo audit of Verification (
|
|
Independent WARP/CPU verification (claim: #1633)
Commands / results (baseline =
Negative control: with the predicate loosened back to the old condition ( Code review: No bugs found. Minimal fix: the offset substitution now requires Not tested: physical GPU hardware (RX 7800 XT or any), retail game run, release build, other crates. AI use: Claude Code (Claude Sonnet 5.5) ran the commands and reviewed the diff; the results above are from the actual runs. |
|
Automated triage for the maintainers. Merge candidate (recommend a look). This is a real bug fix. In the user-data loop of CI: Generated by Claude Code |
|
From a tester working with Claude (AI-assisted, Claude Code): a second machine where this is the biggest drop class in the world. Setup: RX 9070 XT, RADV (Mesa 26.3.1) through vkd3d-proton (GE-Proton 11-14), CachyOS; diagnostics build of Drops ( Why, checked offline: all of these are compute programs from No game data here: hashes and counts only. |
|
The A/B I promised above, same machine (RX 9070 XT, RADV/Mesa 26.3.1 via vkd3d-proton, GE-Proton 11-14), same base (
So on RDNA4 under Linux this PR removes that drop class completely, and the ray-tracing builder's other programs now run; no new fault in the 30 s. Frame times aren't comparable between the two runs (different cutscene moments, and the timing mode serialises lists), so I'm not quoting them. The one 808 interval is right after the world loaded (pipelines still being made). AI-assisted (Claude Code, Claude Opus 5.5); no game data, hashes and counts only. |
In the prison cutscene the Xbox BVH builder's dispatches (about 250-400 a frame) were dropped because a root constant's dword 4 was taken for a root view's offset. With Marvisak#2703 2-3 draws and dispatches a frame are dropped in all, in three runs, at no measurable cost.
Backport Marvisak/VIctory#2703 (7bb3ebaf46081958a6546cd74bd8290cd3a3b715) to the macOS branch.
|
NVIDIA in-game A/B: RTX 3070 Ti 8 GB (Ampere), driver 621.40, Windows 11 26200, TDR delay 8 s.
So the fix does what it says on NVIDIA too: the drop class is gone, and the builder programs the thread names ( That matches the 5080/Linux report in #1968's thread of the builder list running past the timeout until #2167. So on NVIDIA this PR seems to need the builder's work cut into smaller submissions (or made cheaper) to land without turning a running world into a hang. I haven't tried #2167 or #2214 with it yet. AI-assisted (Claude Code); the runs are on my machine. |
|
AMD data point for comparison with the RTX 3070 Ti above: RX 6800 XT (RDNA2), Linux, Mesa RADV 26.2.6,
So on RDNA2 the builder's work lands at most at a small GPU cost (a few ms a frame, within run-to-run noise here), AI-assisted (Claude Code). No game data attached. |
|
Follow-up: the same card and base, with this PR and #2167 (
So #2167 takes about a quarter off, but not enough for an 8 s TDR here. With AI-assisted (Claude Code); the runs are on my machine. |
proton-ge -> eaf1aaa7: CachyOS's wineserver patch for Wine bug 60868 (memory views in an rb tree instead of a list). With the same VIctory build, two interleaved runs each: wineserver 33-39 % -> 5 % of a core in the world, load into the world 74-80 s -> 59-60 s, frame median 809/972 ms -> 776/550 ms. Docs: pipeline pre-build times with a cold and a warm driver cache; known limits: the NVIDIA device removals reported with Marvisak#2703 and the skip list that leaves the BVH builder out, where the bottom strip first goes wrong, the teeth through the lip, late detailed models.
|
Follow-up 2: the same card and base (
For comparison, the base without this PR, summarised the same way: 835 ms median (GPU 431), longest submission 0.78 s. My first comment's 815 ms picked its frames slightly differently. With #2118 the builder never starts on this card: #2841 on its own does not change that. Its thread-count path does run here ( Not tested here: the builder running whole on NVIDIA, which needs the wave64 work in #439/#2214. So whether its whole work fits the timeout on this card is still open. AI-assisted (Claude Code); the runs are on my machine. |
Dukestar69
left a comment
There was a problem hiding this comment.
Tested merged onto origin/main (63bcca4) on Windows 11 x64:
cargo test -p victory-gpu --lib draw::tests::only_a_root_descriptors_dword_four_is_a_view_offset: 1 passed, 0 failed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
fuzeofficlal
left a comment
There was a problem hiding this comment.
Verified 7bb3ebaf locally on Windows 11 (RTX 5090 and WARP, with VICTORY_D3D12_DEBUG=1):
cargo xtask policyandcargo clippy -p victory-gpu --tests -- -D warnings(default and--all-features): clean.draw::tests(12/12, includingonly_a_root_descriptors_dword_four_is_a_view_offset): passed on RTX 5090, RTX 5090 +VICTORY_D3D12_DEBUG=1, and WARP +VICTORY_D3D12_DEBUG=1.
Checked every other ROOT_VIEW_OFFSET / ROOT_SRV_VIEW / ROOT_UAV_VIEW / is_root_view site across the workspace; this branch in State::bind was the only place missing the RootType::Descriptor guard (matching is_root_view). Clean, minimal fix — ready to merge.
|
Follow-up to my comment above, now measured with a raised
So @davesousa's reading holds here too. My earlier resets with this PR (submissions of 2.9–12 s) look like the builder running without the 8 wave64 programs this card refuses. With #2118 holding the builder back, the submissions stay where they were without this PR. The rest of the drops in the right column are local diagnostics skipping programs on purpose, plus ~20 a frame for programs that don't translate here. None of it comes from this PR. One unrelated note in case it saves someone time: with AI-assisted (Claude Code); the runs were on my machine. No game data. |
In the prison cutscene the Xbox BVH builder's dispatches (about 250-400 a frame) were dropped because a root constant's dword 4 was taken for a root view's offset. With Marvisak#2703 2-3 draws and dispatches a frame are dropped in all, in three runs, at no measurable cost.
proton-ge -> eaf1aaa7: CachyOS's wineserver patch for Wine bug 60868 (memory views in an rb tree instead of a list). With the same VIctory build, two interleaved runs each: wineserver 33-39 % -> 5 % of a core in the world, load into the world 74-80 s -> 59-60 s, frame median 809/972 ms -> 776/550 ms. Docs: pipeline pre-build times with a cold and a warm driver cache; known limits: the NVIDIA device removals reported with Marvisak#2703 and the skip list that leaves the BVH builder out, where the bottom strip first goes wrong, the teeth through the lip, late detailed models.
A new game went through the intro into the prison scene (about 2,100 frames, 15 minutes) without VICTORY_NO_POOL_TRAP and without the +0x5149aec assert, as Anzymanz saw on an RX 9070 XT. One run; the hook stays for when it does stop.
|
Blackwell data point: this PR with #2118, on top of #2461 Setup:
This matches lhnizdo's RTX 2080 and davesousa's RTX 3070 Ti results above. The root-view drops are gone, and with the builder held back, no submission gets longer than before. I didn't run this PR without #2118 on this card. Local diagnostics only. No game data: log counts only. AI-assisted. |
|
A named program this restores, and the scale of the effect on the title On the retail build (RX 7900 XTX, driver 32.0.32029.2010, Windows 10 26300.10075, 300 s world runs, diagnostics build at
Those numbers are from a 300 s A/B on the same save with this PR as the only difference in the second step; the per-program line above is from a The per-program name is the part this PR's description does not have, and it is the same class as #3094's report — a root constant's dword 4 read as a view offset. Written with an AI assistant. |
|
Tried in the game: this removes every Setup: RX 7900 XTX (RDNA3), driver 32.0.32029.2010, Windows 11 26200, Ryzen 9 7900X3D; diag builds (
The release build of the stack without this PR still dropped 200–370 draws/frame in the same scene (posted on #400), and its shaders all translate, so this reason accounted for most of what remained there. No new warnings and no hang. The intro draws far more of the scene; some surfaces (skin) still look too dark, which this PR would not be expected to change. #2295 makes the same change, so it should behave the same; I only ran this one. |
|
@zed6000, thanks, that matches what I saw on NVIDIA. On an RTX 2080 in the world, root-view drops went from about 248 dispatches a frame to 0. One note for anyone trying this on a 32-lane NVIDIA card: there it needs #2118 alongside. Without it, the BVH builder's dispatches run while the card refuses some of its wave64 programs. On the RTX 2080 that gave single submissions of 12–15 s and a device reset in the world, and @davesousa saw the same on an RTX 3070 Ti. With #2118 holding the builder back, the longest submission stayed at about 2.5 s, the same as without this PR. JurajSimicevic's RTX 5080 run with both agrees. On your RX 7900 XTX the builder's programs all run, so the PR stands on its own there. AI-assisted (Claude Code). No game data. |
|
Tested on Linux + NVIDIA (Wine) — this stack now boots GTA VI v1.0.2.1 to a running game window. Setup that works today (merged all open PRs in branch
Result on RTX 5090: window appears, swapchain presents (frame 2048+ in 90 s ≈ 20 fps diag build), all 49 ttpf + packs open via dstorage, XUserAddAsync offline user, 52 shaders translated through Wine's dxil→DXBC path. No crash. The "XCL requires Windows" premise is wrong: the whole layer runs under Wine with vkd3d-proton; only the host tooling assumed Windows. |
RTX 4090, the case after the gate: every builder pipeline made, with this PRAs on the 2080 above, #2118 holds the builder on a 32-lane card as long as any stage is refused. This is the next case, which #2118's author suggested raising here: every stage exists, so the builder runs whole. Tree:
Without a loop cap (with #2118's previous head af8b9ad; the gate is open either way when nothing is dropped).
That loop can only fail to end if the parent links form a cycle. With
My reading. The hang isn't this PR. A builder stage writes a wrong structure (parent links with a cycle), and the refit is where that shows. The suspects are the stages this PR un-drops ( Until then, on a 32-lane card the safe combination stays as above: #439 with e2d3cfd's limit, so #2118 holds the builder. |
|
@latentdev, this matches what I see on an RTX 2080 (32-lane), and I have part of the per-stage answer, from running the builder's own wave64 programs against CPU references. Setup. I dumped the builder's 53 containers at run time and lowered each wave64 one the way our stack does on 32-lane hosts (the split into two host waves, close to #3147). I ran the real container on the 2080 through title memory, over random input, and compared with a CPU reference of what the program computes. It's synthetic input only, and no game data leaves the machine. Found and fixed: two split bugs. Together they made lanes 32–63 of every console wave read 0 in the builder's block-wide prefix sums (
After the fix all five match their references exactly. Checked and correct on ours: the radix sort pass Not changed by a split at all (no cross-lane operations; LDS only behind barriers): the bitonic steps But the hang stays. With all of that fixed, the whole builder still hangs in its first frame here, in a 14.9 s submission. Two wave64 stages are still unverified on my side: The harness is three local tests in AI-assisted (Claude Code). No game data. |
|
@latentdev @lhnizdo one data point from the other side of the gate, in case it helps you read the picture once the builder works. On a 32-lane card, the combination that is safe from hangs is not safe for the picture. RTX 5080 tree: What it does in the cell:
My reading (not proven): those 18 are the ray-traced lighting stages that come on in latentdev's run once that limit is lifted.
If that's right, the cell should come out right only when both are in place:
Until then, an all-or-none rule for that lighting work, like #2118's for the builder, would give a dark but clean cell instead of a green one. If you push the split fixes or the builder work to a branch, I can run the same cell measurement on the RTX 5080: the lighting buffer's green share at a fixed world frame, plus a screenshot that stays local. Local diagnostics only. No game data: counts and roles. AI-assisted. |
|
@lhnizdo thanks, that's a big step. I checked both patterns on our translation (#439's console flow plus #2214's multi-wave groups) with two hardware tests. Each runs one group of 64 on the RTX 4090 (split into 32-lane halves) and on the 7950X3D's Radeon iGPU (native wave64), and compares every lane.
So neither bug is what breaks the structure in our tree; it has to come from somewhere else. Your harness would help a lot. Running |
|
Follow-up, going further on the stages you named. I ran the builder's own code for their cross-lane parts. For each stage I took its instruction words and replaced only the memory loads and stores with a known input and the test output. I then compared every lane between the RTX 4090 (split) and the Radeon iGPU (native wave64).
So on our tree the wave-level arithmetic of these stages is right, and the wrong structure comes from somewhere else. Our whole-builder run only finished with |
Fixes #2699.
In the user-data loop, a dword numbered
ROOT_VIEW_OFFSET(4) was taken for a root view's offset without asking whether the parameter was a root descriptor at all. Root constants with five or more dwords have a real dword 4; it was looked up as a root view, none was found, and the draw or dispatch was refused (a root view's offset: no root view, or outside title buffers) with no log line. The ray-tracing builder's dispatches were among the casualties.Ask
u.root == RootType::Descriptortoo, through a helper besideis_root_view, so a root constant's dword 4 goes to the title's user data as the value it is.The test pins the predicate: a descriptor's dword 4 is an offset; constants' and tables' dword 4 are not.
Tests:
cargo test -p victory-gpu --lib --locked only_a_root_descriptors_dword_four(pass),cargo clippy -p victory-gpu --all-targetsclean.