gpu, scripts: fix 5s VirtualQuery frame-pacing spikes, glass reflection specks, and 6-core thread sizing #2783
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2783"
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 wilderr24 on 2026-11-29T17:17:16Z.
Summary
Three measured runtime and launcher fixes from
v2026.11.29.01release runs on Windows 11 26200 (AMD Ryzen 5 5600 6C/12T, NVIDIA GeForce RTX 5070 12 GB, driver 621.24, 32 GB RAM, Series S + DLSS Quality Preset K + 6x Frame Generation):crates/victory-gpu/src/procmem.rs— Make the 5-secondVirtualQueryfull address-space walk diagnostics-only by default (VICTORY_PROCESS_MEMORY=1to opt in on release):VirtualQueryevery 5 seconds took 1,514–1,607 ms per sweep (n=67, 68) and contended on the Windows process address-space lock withVirtualProtect/ write-watch resets on shadow pages.13.1 <-> 18.6 fpsoscillation every ~5 seconds).cfg!(feature = "diagnostics")(withVICTORY_PROCESS_MEMORY=1still enabling it on release builds and=0disabling it on diagnostics builds) droppedLONGESTframe time to 88 ms with a flat frametime graph (16.9 native fps / 101.1 fps shown).crates/victory-gpu/src/draw.rs&scripts/play-foxhound.ps1— PreserveCS_RayMisson transparent surfaces (MISS_ALPHA) and alignVICTORY_AMBIENT_SPECULARdefault:CS_RayMissonMISS_ALPHA(layer == MISS_ALPHA) left stale/uninitialised neon-green texels on vehicle rear windows and taillights when ray tracing was off.sky_miss_left_out(should_skip_sky_miss) toMISS_OPAQUEwhen!keep && !builder_runs, preservingCS_RayMissonMISS_ALPHA(matchingMISS_WATER) as well as wheneverbuilder_runs()is active.VICTORY_AMBIENT_SPECULAR = '1'override inscripts/play-foxhound.ps1so it matchesapps/victory/src/play.rs.scripts/play-foxhound.ps1&scripts/play-gta6-framegen.ps1— 6-core / 12-thread CPU sizing and launcher robustness:>16 GiBRAM hosts, capVICTORY_PIPELINE_WORKERStomin(12, max(4, ProcessorCount - 8))so 20/24+ thread CPUs still use12, 16-thread CPUs use8, and 6C/12T CPUs use4instead of saturating 12/12 logical processors during gameplay.< 16logical processor pool sizing inplay-gta6-framegen.ps1(VICTORY_THIN_THREADS=4,VICTORY_UNDER_THREADS=3,VICTORY_LAND_THREADS=2), reducingpreparingtime from 87.8 ms (10.4 fps) when over-threaded to 56.8 ms (16.5–18.6 fps).victory.tomlgame_dirinFind-GameDirand guardGet-CimInstance Win32_VideoControllerwithtry/catchunder$ErrorActionPreference = 'Stop'.Verification
draw::tests::sky_miss_keeps_transparent_and_water_layers_and_ray_tracingprocmem::tests::address_space_walk_is_diagnostics_only_unless_asked_forcargo test --locked -p victory-gpu --libpasses.cargo xtask policy --stagedpasses (4 files ok).Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dyshay on 2026-11-29T17:49:06Z.
The
procmem.rspart of this PR is merged into our fork's integration branch for testing (dyshay/VIctory-NVIDIA, branchjanus-prs). Thedraw.rswindow part overlaps #2369, which we had already merged, so I left it out. I read the full diff first: no network access, processes, binaries, build or dependency changes. It builds, and the touched crates' CPU tests pass.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by icdmkg2 on 2026-11-29T18:20:00Z.
An in-game data point from an 8 GB laptop. It covers this PR together with four others, so it can't attribute the gain to this one alone.
Setup: RTX 5060 Laptop GPU (8 GB), Ryzen 7 H 260 (8 cores), 32 GB, Windows 11, driver 621.24.
mainat55d06914, release build, Series S, DLSS performance,VICTORY_LEVELS_ON_DEMAND=0andVICTORY_COMMIT_FLOOR_MB=1024in both builds (see #1411 for why). Same save (the prologue's cell), driven by a script: 60 s measured after a 30 s settle, warm shader cache, two alternating pairs.Combo:
main+ #2549 + #2783 + #2647 + #2665 + #2795. These merge cleanly together. #2796, #2656, #2604 and #2587 conflict with that set, so they weren't tested.mainThat's about 15–18 % shorter frames and half the slow frames, with no crash and no device removal. A frame capture of the combo (diagnostics build,
VICTORY_CAPTURE_WORLD) matchedmain's brightness (mean luma 66.4 against 66.2), with no black holes.One thing for the diagnostics build: with these merged together,
--features diagnosticsno longer compiles. A localtiminginsubmitshadowshost::timing()at three call sites, andcopystat::log_heap_elsewhereuses anmbhelper it doesn't define. Both are one-line fixes; mentioning it in case whichever lands second hits it.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DoubleD17 on 2026-11-30T04:52:18Z.
We ran a test of the
procmem.rspart only, throughVICTORY_PROCESS_MEMORY=0on current main (41adb551), which gives the same release default. We did not test thedraw.rsor script changes. We don't see the 222 to 272 ms spikes every 5 s here.On this machine the walk takes about 1.1 to 1.2 s (at most 1.5 s) over about 103,000 regions, every 5 s, on its own thread.
Runs 1 and 2 came from a session whose controls drifted by 9 ms, so they looked like a gain. We ran 3 to 5 in ABBA order with three controls that agreed within 1.4 ms: +0.4 ms and −0.5 %, so no change.
We also split the 1 s frame-time lines of five control runs (walk on) into the seconds that overlap a walk and the others. The seconds during a walk have the same median frame (+0.3 ms) and the same longest frame per second (+0.2 ms, median).
The one place it may show is the rarest hitch. The single worst frame of the run fell during a walk in 4 of the 5 control runs, while only about a third of the seconds overlap a walk. With the walk off, the worst frames were 269 to 284 ms, against 310 to 391 ms in the same session's controls. The p99 did not move (114 to 142 ms both ways). So on an 8-core CPU it does not touch the typical frame; a 6-core CPU may differ.
Picture: 0 defects in 400 frames with the walk off.
Setup:
41adb551withVICTORY_PROCESS_MEMORY=0, against41adb551without it;AI Assisted
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.