Patch (fork): GTA VI bring-up fixes (descriptors, V#, atomics, caches) and mesh-shader TDR on RTX 3080 Ti #815
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#815
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Machad3x on GitHub · 2026-11-24 11:32 UTC · original
Pull requests are limited to collaborators on this repository, so this is a fork report instead.
Fork branch: https://github.com/Machad3x/VIctory/tree/claude/gta6-shader-translation-crashes-705550 (55 commits on top of
mainatffe310e,cargo test --workspacepasses at the last full run; each commit message explains why).What the branch contains
image_gather4_l; 64-bit LDS/image atomics; WaveSize/clamp fixes; LDS subword access; lane-mask phis; use-before-def; cube clamp; empty-PSO slot 0x218; direct barycentric VGPRs read as zero.heap_handlegained anonuniformargument,Structured.otherwas dropped while the lane-mask phi join still reads it).Observations (not fixes)
diagnosticsfeature ran 14+ min without device removal; with it, WARP died in its own JIT code (a read of 0x0) in the present path.VICTORY_GPU_TIMING=1: a mesh shader takes 1375 ms for 4 groups (mesh 04b9be3756e8f41c, pixel1af4a50c7fb40c97) anda26422c01dcf5612takes 418 ms, then the ~2 s TDR (0x887A0006). WithVICTORY_SHADER_LOOP_LIMIT=64another mesh shader (89036e16fa081505) becomes the slow one, so it is not the loop count alone. Same family as #496, #619 and #791. Hypothesis, unverified: a barrier in divergent control flow in the translated mesh shader.E_INVALIDARG(0x80070057) for 2560x1440 textures (formats 86 and 115) and "host view heap capped at 1000000".Happy to split the branch into separate PRs if collaborator access is granted.
@Machad3x on GitHub · 2026-11-24 12:22 UTC · original
Update from the fork (branch
that writes each translated shader's DXIL and each untranslatable shader's container.claude/gta6-shader-translation-crashes-705550): merged the open PRs #302, #489 and #294 on top of main and fixed the tests that predate main's four-argumentresource::track(the fork is at d6021c2). Offline check on 48 untranslated containers dumped from a world run (victory translate --list --validate): 48 failed before, 41 after; the 34 'a constant address' compute shaders now pass the spill table and the root UAV step, and 7 translate and validate. #667 does not merge cleanly with #294 (registers become 16 bits, draw.rs root views), so the 12 shaders that read through an address in root constants still stop. On an RTX 3080 Ti the TDR is unchanged: mesh 04b9be3756e8f41c with pixel 1af4a50c7fb40c97 (a 22.8k-line pixel shader with 7 loops and 361 samples) takes 1.4 s for 4 groups at 2560x1440, then the device is removed. Also added: a diagnostics-only VICTORY_DUMP_SHADERS=@Machad3x on GitHub · 2026-11-24 12:47 UTC · original
Real-GPU update (RTX 3080 Ti, fork at 26e4b1a = main + #302 #489 #294 #578 #650): with wave64 mesh/compute refused (#578) the TDR is gone, and the world is black as #778 describes. Two more runs: (1) without changes the title died after under 5 min with an access violation reading a pointer that holds a float with -1 in its high dword; (2) with VICTORY_SKIP_PIPELINES=4ddd6f9702fab2a7 the run stayed up for over 12 min, no device removal, no title crash (13 GB working set). 4ddd6f9702fab2a7 is a 1x1x1 wave32 compute that only translates since the spill table and root UAV PRs: it copies 16-byte structs from one root UAV to another and, in lane 0, stores -1 at an offset computed from a header read from the first buffer. So the write-back of that root UAV corrupts title memory; cause not found yet. Next: wave64 on 32-lane hosts (#233) and that write-back.
@Machad3x on GitHub · 2026-11-24 13:02 UTC · original
Trace of the compute 4ddd6f9702fab2a7 (new diagnostics-only switch VICTORY_TRACE_DISPATCH= on the fork): both of its root UAVs are bound to the same title address (e.g. 0xc8da00100), so the kernel works in place. The header at +48 reads 0x1735c, 0x5080, 0xffff9bc0, and the code computes ((0x1735c << 3) & ~63) - 0x5080 >> 4, adds -25664, and lane 0 stores -1 at byte 20580 of the buffer; every lane otherwise copies its 16-byte struct onto itself. On the host that -1 lands in the high dword of an 8-byte slot, and one run later the title read that slot as a pointer (float in the low dword, -1 above) and faulted; a second trace run of 330 s did not crash, so it is not deterministic. Open question: is the -1 store meant for this offset (a GPU producer upstream of it, such as a refused wave64 pass, may be what the console expects to have run first), or is the in-place write-back racing the title's CPU writes?
@Machad3x on GitHub · 2026-11-24 13:27 UTC · original
Fork update (8a02a0c): integrated #233 (wave64 compute in halves / console flow) over #578, plus #709, #585 and #309 (offline translate of 48 dumped world shaders: 48 failed at first, 41 after the spill and root UAV PRs, 36 now; remaining: 12 address not from a root parameter, 9 descriptor read only as data, 8 address from a root parameter that is no address, 4 scalar memory read as data, 2 buffer_load_ushort, 1 SGPR address). Real GPU (RTX 3080 Ti): a 5-minute run with this build stays up with no device removal and no title crash; a 7 min run earlier with VICTORY_SKIP_PIPELINES=4ddd6f9702fab2a7 also did, and one run without the skip died on the same corrupted-pointer pattern, so that in-place kernel is still the suspect. The world is still black: wave64 mesh programs stay refused by #578.
@Machad3x on GitHub · 2026-11-24 14:12 UTC · original
Fork update (3800387): the root-UAV corruption lead is explained by #721: copy-back wrote whole 64 KiB pieces and undid title writes. Fixed there together with #722 (tests from those issues pass). Also merged since the last note: #550 #584 #688 #346 #581 and an integer-RT blend fix (issue #806), geometry shaders and mask joins from permadiego's fork (#877/#878), MIN_DYNAMIC 2^18 (#747). A 4-minute RTX 3080 Ti world run with wave64 mesh allowed stays up; the screen is still black at about 0.2 to 0.5 fps: per frame about 1 GB of refreshes (the 174 MB heap window 6 times) and 700 ms of write-watch queries (see #400, #776, #783, #916).
@Machad3x on GitHub · 2026-11-24 14:38 UTC · original
Captured presented frames from the RTX 3080 Ti run (fork d6021c2..e049b26 plus the diagnostics switch for wave64 mesh; VICTORY_CAPTURE with VICTORY_CAPTURE_FRAMES): the title's intro scenes (e.g. the snake sequence, frame 512) and the loading artwork (frame 1400) render correctly; frame 1300 is that artwork fading in; frame 1475 is a flat grey frame with black cinema bars, i.e. the in-game cutscene with only the background drawn. This is the same state as the integration stack in #452 (props visible in a G-buffer view; ground, buildings, sky and lighting missing). The run stays up for 4 minutes at 0.2 to 0.5 fps.
@Machad3x on GitHub · 2026-11-24 15:25 UTC · original
Offline measurement over 78 console shader containers dumped from an RTX 3080 Ti world run (fork github.com/Machad3x/VIctory branch claude/gta6-shader-translation-crashes-705550): validated programs went from 30 to 48 of 78 with: #621 (packed input padding), #563 (cube gradients, 3 hunks resolved), #683 (zero the unavailable FMA half), plus three changes of ours: (1) a resource-heap descriptor read only for its size gets a type (2D SRV for 8 dwords, raw buffer for 4; a shortcut that reads garbage if the real view is another kind), 14 'descriptor read only as data' failures mostly gone; (2) signature rows keep the module's metadata order instead of sorting by register (the validator rebuilds ISG1/OSG1 from metadata order; fixed 3 validator errors 'Container part Program Output Signature does not match', unit test added); (3) sub-dword buffer loads and stores (byte/ubyte/sbyte/short/ushort/sshort): loads read the aligned dword and shift, stores clear and set the field with two atomics (two lanes writing halves of one dword at once can lose a half). Mesh 19 of 21 emitted and validated, compute 4 of 4. Still failing: compute address groups (12 + 8; need #667/#710-style root views, which conflict with #294), 6 sampler-heap descriptor dwords read as numbers, 4 mesh descriptors computed by v_sub_f32/v_fmac_f32, 2 unknown stride, 2 other.
@Machad3x on GitHub · 2026-11-24 16:27 UTC · original
Milestone on the fork (tip 31f4a19, RTX 3080 Ti, DRED off, wave64 mesh allowed by the diagnostics switch): the title now plays into the opening cutscene. Captured presented frames (VICTORY_CAPTURE) show the loading artwork slideshow up to frame ~1820 and then the story title cards rendered by the game itself: frame 2048 is the grey card 'PROLOGUE' with the subtitle '[PROLOGO]', frame 1860 is the light card 'NINE MONTHS AGO'; text and subtitles draw correctly. Between the cards the 3D shots are black (luminance max 2). A 4-minute run reaches frame ~2160 at about 1.5 fps (670 ms/frame, preparing 230 ms, GPU 400 ms, copy-back 10 ms), 4500 draws per frame, no device removal. What still blocks the 3D shots: 16 of the 25 compute pipelines that the world dispatches do not translate (pointer chasing through GPU memory, addresses built as constant<<8|12, per-branch addresses, an LDS op).
@Machad3x on GitHub · 2026-11-24 17:09 UTC · original
Finding on an RTX 3080 Ti (fork Machad3x/VIctory, branch claude/gta6-shader-translation-crashes-705550): the ~4800 draws+dispatches per world frame that are dropped 'without a host pipeline' (about 60% of everything the title submits) are compute dispatches of pipelines created through device slot 0x218 (DeserializeComputePipelineStateX, create_compute_native), and the caller is the TITLE's own job threads, not amd_fidelityfx_* or bink2scarlett: the game creates its compute shaders as native RDNA programs. Counted per creating method over 100 s: 2048+ calls through slot 0x218, none through plain compute, graphics or stream creation. Each description (Leonida docs/fspx.md layout: +0x00 root signature, +0x08/+0x10 kind 0 dispatch state 28 B, +0x28/+0x30 kind 6 program 384 B to 13.7 KB, +0x38/+0x40 kind 7 records with the 0x43 digest) is answered with a pipeline with no shaders, so every dispatch of it is dropped; none of the digests' DXBC containers was ever seen by CreateComputePipelineState. A 200 s run dumped 2680 distinct native programs (120 MB). So these are the culling, visibility and lighting passes the 3D shots need, and translating FSPX/native programs (NativeProgram from kind 0 words 3/4/5/6, kind 6 after the 36-byte prologue, the layout from the serialized root signature) looks like the biggest remaining item; nothing in the open PRs covers it (searched FSPX, native compute, DeserializeComputePipelineStateX, 0x218). Also related: the final 3840x2160 target is the FSR output and stays black; #730 plus a bilinear fallback is on the fork.
@Mumogg on GitHub · 2026-11-24 18:09 UTC · original · edited 2026-11-24 19:09 UTC
A Linux/NVIDIA data point for this branch, in case it is useful: on my machine it does not reach the world, the driver faults while compiling graphics pipelines.
Setup: RTX 5070 Ti, driver 615.78.08, Nobara 44, Wine 11.22 Staging, vkd3d-proton and DXVK
dxgifrom GE-Proton11-14,VKD3D_DISABLE_EXTENSIONS=VK_NV_raw_access_chains. Branch atc9bd33ewith #259 and #454 merged on top (both clean), diagnostics build, 1.0.2.1, network off, Microsoftd3dcompiler_47.dllbeside the exe.What happens: 7 runs of 7 end with
err:vulkan:vkCreateGraphicsPipelines Exception 0xc0000005 in Unix callbetween 55 and 159 s, still in the menus and intro (frames 1247 to 4264). Mainffe310ewith #259 goes through the same screens on this driver and runs the world for 10 minutes, so it is something this branch hands the driver that main does not.What I could and could not narrow down: I logged which pipeline each of the six workers was in when the fault came. The sets differ from run to run and no pipeline is in all of them; withholding the three vertex shaders that recurred most (
4d4a2a8c824cceae,ed734c953c0eac78,fb9d4f23bdffa23f) from the host did not stop it. So it does not look like one bad program, more like something common to this branch's vertex+pixel pipelines (or their state) that this driver's compiler trips on now and then. I have not dumped the SPIR-V for these yet; for the compute crash earlier (#259) that was what found the cause (VKD3D_SHADER_DUMP_PATH, then a native reproducer), and I can do the same here if it helps.Because of this I have no world numbers for the copy-back and snapshot commits on Linux yet.
(AI-assisted, Claude Code; runs on my machine.)
Edit: the Wine version was 11.22 Staging, not 11.21 (the system had updated before these runs).
@WillyboPeep on GitHub · 2026-11-24 23:00 UTC · original
A Windows / RTX 4090 data point for the native compute path (
create_compute_nativeon slot0x218).Setup: RTX 4090 24 GB (Ada, 32-lane waves, driver 621.01), Ryzen 7 9800X3D, 32 GB RAM (page file grown to an 82 GB commit limit), Windows 11 build 26300. Branch tip
506d110,cargo build --release --locked -p victory, Rust 1.98.1. Title 1.0.2.1, Series X profile, empty cache (first run),VICTORY_SHADER_LOOP_LIMIT=256, nothing else set.Timeline: menus at 30 fps; the world is entered about 60 s after start (573 pipelines being made, black screen while they build); the run ends 62 s later with
a host command list did not close (Not enough memory resources ... 0x8007000E), followed by 14,468no shared buffer ... size=4194304warnings. No display-driver reset (no event 4101).The slot works: no
method not implemented ... slot=0x218line at all (onfxceless/victory-fork4e17478and on a branch built on it, the same title logs 2,048+ of them per run and goes without those pipelines). 345 compute shaders translated.What did not translate (the last
native FSPX compute pipelines are not translatedline,total=512; 610 computeshader does not translatelines by the end):v_permlanex16_b32,v_permlane16_b32In the world, before the end: 432 to 668 draws per frame, 1,590 to 2,030 dropped without a host pipeline (0 being made).
Memory: the GPU's shared (system) memory is what ran out, not VRAM. Sampled every 2 s:
Free RAM fell below 1 GB and hard page faults reached 51,000/s. Windows caps a GPU's shared memory at half of system RAM (about 15.8 GB here), which matches where it stopped. On the same machine,
fxceless/victory-fork4e17478and a build on it (no native compute) peak at 25-26 GB private and 6.4-7.2 GB shared, so the growth of about 150 MB/s in shared memory after entering the world looks specific to this branch. With 64 GB of RAM it may well get further.Run and written up with Claude Code.
@Marvisak on GitHub · 2026-11-25 03:54 UTC · original · edited 2026-11-25 12:44 UTC
Automated triage for the maintainers.
Thanks for the detailed fork report. Pull requests are open to everyone, so please split the branch into separate PRs, one per fix, so they can be reviewed and tested in CI. Several items already have their own issues or PRs:
Device slot
0x218(index 67) still has no entry in theFUNCTIONStable incrates/victory-gpu/src/device.rsonmain(940d32f), so the call falls toobject::missingand returnsE_NOTIMPL(see also #417 and #829). Update since the first triage: JurajSimicevic ported the native compute commits ontomainand measured them on an RTX 5080. With the slot implemented, the title switches to its native programs, most of which do not translate yet (distinct compute programs translated fell from 1,113 to 222, and the picture went flat grey). WithE_NOTIMPL, the title falls back to container programs that do translate. So wiring the slot only helps once the translator handles the native programs; the refusal reasons listed in that comment are the work that blocks it. The port was not opened as a PR for that reason.Generated by Claude Code
@JurajSimicevic on GitHub · 2026-11-25 11:07 UTC · original
@Machad3x, the triage above asked for the slot
0x218part of your branch alone as a PR. Unless you are already doing that, I will port your native compute commits onto currentmainwith you as the author (claimed in #1633) and post the branch here. If you'd rather open it yourself, say so and I'll stop.AI-assisted.
@JurajSimicevic on GitHub · 2026-11-25 11:26 UTC · original
Slot
0x218on today'smain: implementing it makes the picture worse for now, becauseE_NOTIMPLis what sends the title to a path that translatesI ported the native compute commits of the branch above onto
main940d32f. The port coversfspx.rswith its six synthetic tests, the record standing in for a container intranslate_with, slot 67 indevice.rs, translation on a large-stack thread, androot::blob_of; it builds, and clippy and the tests pass. I then measured it in the title before opening anything. RTX 5080, diag build, with #1762 and #1968's program A skipped in both runs so the world keeps running; one run each, about 3.5 minutes of world:main(slot0x218falls toobject::missing,E_NOTIMPL)0x218implementedMy reading: when
0x218fails, the title creates the same compute work from its container programs, and the translator handles those. When0x218succeeds, the title uses its native programs instead, and most of them do not translate yet. Every description parsed; none fell to the empty pipeline. The refusals by reason, distinct programs:s_pack_ll_b32_b16, 48:s_pack_hh_b32_b16dmaskleaves out, which would also change other programs)The "about 60% of what the title submits" measured above fits the branch's first version of the slot, which answered with a pipeline without shaders: the title then takes the native path, and its dispatches are dropped. On
mainthe slot fails, and the fallback runs.So I am not opening the PR. Wiring
0x218(here, or #1468's configurable result) is worth it only once the translator handles the native programs about as well as their container versions. The list above is what stands between. The port stays on a local branch; I can push it if someone wants it as a starting point.No game data attached: counts and the translator's own refusal messages only.
AI-assisted.