Wave64 programs on 32-lane hosts again, the shader cache key's missing switches, a relay remap wait, list-thread sampling #1575
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1575"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by misaka-20002 on 2026-11-28T21:52:37Z.
What it changes
Six commits, independent of each other: each builds on its own, so any can be taken without the others.
Shaders: the LDS write-only shortcut on by default again on 32-lane hosts (
VICTORY_LDS_WRITE_ONLY_OK=0turns it off).075785e(#43) made the legacy shortcut for write-only lane-branch regions opt-in. Since then, on a 32-lane host (NVIDIA), 19 wave64 compute programs no longer translate and their dispatches are dropped:InstanceCulling:CS_Tree_*, six);CS_VarianceFilterAlpha,CS_TraceShadowRays_Fullres,CS_ProjDecalReduceClassification_ScalarizedandCS_Classification_Water;XboxBvhBuilder.dll.The strict analysis itself is unchanged. It still decides on 64-lane hosts and with
=0. Its four tests turn the shortcut off for themselves.Shader cache: the translator's switches that were not in its key. Six switches change what the translator makes but are not in the key, so a warm cache serves translations made without them:
VICTORY_HDR_CLAMP,VICTORY_LDS_FIRST_INIT,VICTORY_LDS_INIT_HOIST,VICTORY_LOOPS_WAVE,VICTORY_SAMPLED_MARKSandVICTORY_DEFRAG. For example,VICTORY_HDR_CLAMP=0on a warmed cache still clamps.VICTORY_BVH_MISSis now keyed by whether it is on, asVICTORY_BVH_NO_HITalready is.VICTORY_BVH_BUILDER=1(the F1 menu's ray tracing) turns it off, and before this both runs shared one key.build.rs's list, nowemit::SWITCHES), so a new switch fails the test until someone decides whether it is keyed.LOOPS_WAVE,LDS_FIRST_INIT) together with unrelated F7/F8 changes.Relay: a remap waits only for the landings that touch its range (follow-up to #631). In relay mode
land_before_remapalso waited while any landing was in hand. In relay modeline.writtenkeeps the ranges of the flights being landed untilrelay_landis done, so waiting until no written range touches the remapped one is enough. Without relay it waits as before. Found in review; not measured on its own.Timeline:
VICTORY_TIMELINE_LISTS=1samples the list threads too (diagnostics builds only).Timeline: real call stacks for the list threads (diagnostics builds only). The sampler pauses a list thread only long enough to copy its registers and up to 64 KB of its stack. Once the thread runs on, it walks the copy with
RtlLookupFunctionEntryandRtlVirtualUnwind, because Windows' unwinding takes locks the paused thread may hold. With this, time in the driver is charged to the call of ours that led there. On an RTX 5080 it showed that about 22–30% of the list threads' driver time isCreateShaderResourceViewfor buffer views.Shaders: two more 64-thread LDS programs taken wave-wide on 32-lane hosts.
GpuParticleEmit:CS_Emit_Dynamic_Model(18d957e62926ed3e) andCS_Emit_Dynamic_Model_AttachMesh(407eca669212d400) join thescene_kerneldigests (#101's shape). Widened, they translate.How it was tested
GPU and profile: RTX 5080 (32-lane), Ryzen 7 9800X3D, GTA VI 1.0.2.1, Series X/S profiles at 1440p, DLSS. Items 1 and 6 were played on a local branch before
075785ereached it; those programs translated and drew right in play.Before/after,
victory translate --list <game>withVICTORY_HOST_WAVE=32 VICTORY_VIEW_LIMIT=737855(every shader of the game, about 52,000 lines):77df871)VICTORY_LDS_WRITE_ONLY_OK=1on main)Items 1 and 6 were measured separately; together they should give 16.
For shader changes, wave sizes tested: 32 lanes (census above); the 64-lane path is unchanged (the shortcut is off unless the host's widest wave is 32).
cargo test: thevictory-gpushader_cachetests pass locally, including the new one. The workspace's clippy and tests are left to this PR's CI run. Main's clippy currently stops at two errors inlower.rs, before the tests; #1517 fixes them, so this PR's CI will be red there until #1517 (or #1527) is in.Checked for overlap
🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by kibagami-nc on 2026-11-28T21:59:31Z.
A note on commit 2 (the shader cache key), so only one of the two goes in: it overlaps #807. #807 has been open since 2026-11-28 morning, and was rebuilt on
923e38ctoday. It keys the same six switches (HDR_CLAMP,LDS_FIRST_INIT,LDS_INIT_HOIST,LOOPS_WAVE,SAMPLED_MARKS,DEFRAG), the list is a constant there too, and it has the same test againstemit::SWITCHES.Your
VICTORY_BVH_MISSpart (keyed by whether it's on, withVICTORY_BVH_BUILDER=1turning it off) isn't in #807. If the maintainer takes #807, that piece could stay here as its own commit.On commit 1: #1590 takes the write-only shortcut as a last try instead of turning it on for every program. Your 19-program measurement is the confirmation #1435 needed, thanks.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by unueberlegt on 2026-11-28T22:37:49Z.
Tested — it works, with an independent bisect data point and one finding from the first cold start.
Setup: GeForce RTX 5070 12 GB, 31 GB RAM, Windows 11 26300, dump of the title v1.0.2.1, Series X profile.
Bisect, independent of #1435's: from #1516's own two logs (the broken run refuses 13 wave64 compute programs, the release 3) I took the new hashes and used
victory translate --listover the named containers as a bisect criterion (goodv2026.11.28.03, bad HEAD). It lands on075785e— the same commit your first commit flips the default of. The seven containers I checked are exactly the fourCS_Tree_BatchCull_*,CS_VarianceFilterAlpha,CS_ProjDecalReduceClassification_ScalarizedandCS_Classification_Water; the sweep over the whole dump also finds the twoXboxBvhBuilder.dllkernels refusing, so your 19-program list matches what I see.In the game: since your commit 1 is semantically identical to the change I had built and tested independently (the same default flip,
VICTORY_LDS_WRITE_ONLY_OK=0as the strict mode), the numbers below are from that build. Aftervictory preload(all shaders + 2,614 pipelines), the game loads into the world. Trees and bushes along the road stand from a distance — walking past them, nothing pops in where the broken build showed nothing until touched. The log reads 1 wave64 refusal for the whole session (6b82bc7d22016cb5, theCS_CollectTriangles_Meshletsbaseline failer that also refuses on the release), down from 13; frame lines in the world readdropped 172–190 without a host pipelineat 1,500–2,400 draws/frame, 20–22 fps.First cold start, separate finding (not about this change): without any warming, the title killed itself ~60 s into the first load with its own watchdog (
0xc0000005at+0x23cf683— the signature #1484 reports on Proton) while commit headroom read 452 MiB on this 31 GB machine and the card sat 1–2 % busy with "nothing of ours queued". The same start aftervictory preloadloads and plays. With every translator change invalidating the cache, a first start without warming may keep hitting this on mid-RAM machines — maybe worth automating the preload there.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.