VIctory performance (RTX 5060 8 GB): submit thread, textures, and memory #2334
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2334"
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 Castyan on 2026-11-29T12:06:46Z.
Fixes #597.
Changes
Tests on RTX 5060 8 GB, Ryzen 5 9600X and 16 GB RAM
Over the first 7 min 31 s of runs H and I on v2026.11.29.01, median FPS was 12.3 with this PR and 10.3 with the stock release. Submit-thread time was 94.5 versus 120.1 ms per frame. Each configuration was played once and the routes were similar. Run J, with 4 MiB copy windows, produced 12 stale-copy warnings and one DLSS VRAM warning.
git diff --checkpassed. The repository-wide asset policy flags an existing sequence of hexadecimal literals incrates/victory-loader/src/heap_sites/frame_users.rs. That file is identical on the base.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T12:20:41Z.
Test on this branch (v2026.11.29.01 + this PR): run H, 12 min 17, closed normally. RTX 5060 8 GB, Ryzen 5 9600X, 16 GB of RAM.
--series-s --dlss quality --framegen 2, plus the switches listed indocs/test-results-2026-11-29.md(part H).What the player saw
What the log says (
docs/logs/victory-nvidia-play-20261129-115844-29880.log.gz,docs/logs/victory-mem-20261129-125843.csv)VICTORY_REFRESH_CHECK=1). The game ran stable.main's batch path, without #614. A run of plain v2026.11.29.01 with the same options is still needed to tell whether the cause is this branch or the release.main's neutral stand-in, which fits what the player saw as missing or wrong textures.VICTORY_BVH_BUILDERoff) and 5 are pipelines left out on purpose. Next to nothing is waiting for a pipeline to compile, so the missing textures do not come from shader compiles.VICTORY_WINDOW_KB=1024. Free RAM falls to 152 MB. On 16 GB, paging stays the main cause of the freezes.scripts/bench.pydoes not read v2026.11.29.01's new fps and room lines yet. The figures above come from the raw log.Next
bench.pyreading the new log format.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by FIJI1299 on 2026-11-29T12:44:34Z.
Community Test Report — RTX 5070 12 GB / 32 GB RAM (
series-s, DLSS Quality, FG x2)Tested on RTX 5070 12 GB, 32 GB RAM (
32,344 MB), Windows 11 (10.0.26300), driver621.40.0,series-s, DLSS Quality, FG x2, withC:pagefile expanded (commit_limit_mib=65112).Switches Tested
(Defaults on 12 GB / 32 GB kept:
VICTORY_TEXTURE_POOL=1,VICTORY_HELPER_PRIORITY=on,VICTORY_WINDOW_KBnot forced to1024.)Observations & Telemetry Highlights (
12:36:58Z–12:37:45Z)frame timesintervals in this window recorded7–8frames with median131.6–146.2 msand p95 / longest261.2–327.9 ms.VICTORY_REFRESH_AT_SUBMIT=2,threads=1):~277–800copies/frame (~1.3–1.5 MB), taking2.3–10.1 msfrom submission start to end (0.0–0.7reached by the line before beginning,0.0–0.1stopped midway).~717–2,193shader-written copies and~1,042–1,680windows outside buffers (VICTORY_REFRESH_WINDOWS=1off) to the submission; total refreshes across all threads still sit at1,292–1,408refreshed/frame (78.3–103.1 ms) out of7,939–9,831copies checked, with~4,386–4,407live host copies (5,768–5,940 MBPC /1,822–1,823 MBcard).process memory:26,629 MBprivate (22,448 MBresident),40,825 MBcommitted across91,325regions (646 mswalk),17,406 MBnamed /9,223 MBunnamed private,4,715 MBshared sections, and1,750 MBfree physical RAM (42,567–43,509 / 65,112 MBPC commit).9,945–10,080 MB(budget ~10,889–10,979 MB) plus7,090–7,239 MBshared GPU memory.23,486–40,569page faults/s and955–2,270 mstexture queue lock wait per 5 s window.VICTORY_REFRESH_CHECK=1) and 0 out-of-VRAM messages.12:37:45.470Z:1 host pipelines failed (1 compute 0x8007000e)(untranslated=0).Sample Log Excerpt
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Aniseto on 2026-11-29T13:37:49Z.
Ran the full victory-gpu library suite at
da37c74con an NVIDIA Blackwell desktop part.System
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5Results
VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib --locked -- --test-threads=1: 927 passed, 1 failed, 57 ignored (exit 101).host::packed_present_tests::packed_float_single_planes_are_presented:frame 0 (R8G8B8A8_UNORM) was not presented.What this adds
The same single failure was measured at PR #1988 (3 of 3 alone) and PR #2346 on this driver: https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1988#issuecomment-7255924953 https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2346#issuecomment-7256184818 I am reporting the measured outputs, not attributing the cause to any of these changes. The author's run of this PR reports a different, timing-dependent failure; this run did not reproduce that one. No title run was made.
Not tested
A retail title, a paired smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T13:44:28Z.
Update at
69fb7e65: run J, plus runs I and four new switches (all off by default)RTX 5060 8 GB, Ryzen 5 9600X, 16 GB of RAM,
--series-s --dlss quality --framegen 2, same route as H, other programs closed. The full reports are indocs/test-results-2026-11-29.md(parts I and J).Run I: is H's regression from this PR or from the release? v2026.11.29.01 alone, same options and route, compared over the same 7 min 31:
The regression comes from the release; this PR takes about a quarter off the submitting thread. Why refreshes cost about three times more than on .03 is written up in
docs/refresh-cost-h.md: real copies cost 126 µs each instead of 35 µs, 65 MB a frame instead of 40, and the copies run on paged memory. The#614/nothing_newpath is not the cause.Run J: H +
VICTORY_WINDOW_KB=4096 VICTORY_WINDOW_TAILS=0. Edited: 4096 and 0 are the layer's own defaults. The 1024/1 in H came from this PR's launcher default for PCs with 16 GB or less (038cb615, taken fromplay-foxhound.ps1). So J is H without that override. 12 min 17 against H's 12 min 17, closed normally:VICTORY_REFRESH_CHECK=1)REFRESH_CHECK=1stale line comes next; there is no fix yet.New in this push, each off by default, not measured in game yet
VICTORY_REFRESH_BESIDE=1: a flush's copies run on the kept threads while the submitting thread goes on, waited for only where order requires it (before a title write on their pages, a step whose reads are unknown, shaders being given the copy, the next flush, and the end of the steps). Tests check that no copy goes stale.VICTORY_CARD_CPU_LAZY=1(withVICTORY_CARD_CPU_HEAP=1): the CPU mirror of card copies, about 1.1 GB in H, is reserved and committed only where it is touched. The numbers behind this are indocs/ram-prive-2026-11-29.md.VICTORY_DUE_HOT_FIRST=1: texture slots that shaders sampled lately are served before re-checks.VICTORY_COLD_EVICT_S=<s>lets go of indexed textures that no shader marked for that long (10 to 110 s), since slot eviction freed 0 textures in H. The cause is written up indocs/textures-h-cause.md.scripts/bench.pyreads the v2026.11.29.01 fps and room lines, and.gzlogs.cargo test -p victory-gpu --release: 935 passed, 0 failed, 57 ignored.Thanks to FIJI1299 and Aniseto for the runs. The 32 GB report shows the same picture (refreshes around 78 ms a frame, 26.6 GB private, heavy page faults), so the submitting thread and memory limits are not specific to 16 GB. The
packed_float_single_planes_are_presentedfailure is noted.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Aniseto on 2026-11-29T13:59:42Z.
Re-ran the full victory-gpu library suite at
69fb7e65after the head moved fromda37c74c; this is a new response in the same thread, not an edit of my earlier report: https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2334#issuecomment-7256682443System
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5Results
VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib --locked -- --test-threads=1: 934 passed, 1 failed, 57 ignored (exit 101).host::packed_present_tests::packed_float_single_planes_are_presented:frame 0 (R8G8B8A8_UNORM) was not presented.What this adds
The same single failure was measured on #1988, #2346 and the previous head of this PR, all on driver 32.0.16.2140. This run adds the new head with the same result. I am reporting measured outputs, not attributing the cause to any change. No title run was made.
Not tested
A retail title, a paired smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Aniseto on 2026-11-29T14:40:07Z.
Re-ran the full victory-gpu library suite at
faa1d7cfafter the head moved from69fb7e65; this is a new response in the same thread, not an edit of my earlier report: https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2334#issuecomment-7256957579System
rust-toolchain.toml), MSVC 14.44.35207, DXC 1.9.2609.5Results
VICTORY_D3D12_ADAPTER=NVIDIA cargo test -p victory-gpu --lib --locked -- --test-threads=1: 933 passed, 2 failed, 57 ignored (exit 101).host::card_steps::tests::places_written_after_sending_are_learnedandhost::packed_present_tests::packed_float_single_planes_are_presented.What this adds
The
packed_float_single_planes_are_presentedfailure was also measured on #1988, #2346 and the two previous heads of this PR on driver 32.0.16.2140; theplaces_written_after_sending_are_learnedfailure is the one the author reports as timing-dependent. I am reporting the measured outputs, not attributing either failure to this change. The new head moves benchmarking out of this PR; no title run was made here.Not tested
A retail title, a paired smoke run, the whole workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Razen114514 on 2026-11-29T14:57:08Z.
Measured on an RTX 5060 8 GB: the two launcher defaults take the texture queue from over its line to under it
Same card as your rig (RTX 5060 8 GB, 32 GB RAM here rather than 16), Series S, DLSS Performance, frame generation 2x, image
b99f876b74d4a77f.I had
VICTORY_TEXTURE_POOLat the launcher's1andVICTORY_HELPER_PRIORITYunset. Your PR's first two defaults are what I was missing, so I tested them.Method. One fixed scene — the balcony of the safehouse, the save the title loads into, no input — started fresh each round, 90 s warm-up, three screenshots 30 s apart, then closed. On a timer the log prints the texture queue's room every 5 s:
The number below is
total − line. Positive is over.Six rounds, alternating A/B/A/B/A/B, so any drift in the scene lands on both sides:
1(launcher)01010The two groups do not overlap at all: the worst of the pool-off rounds (+459) is still 403 MB under the best of the pool-on rounds (+862). Medians +1012 → −110 MB.
Free in blocks going to 0 on the pool-off rounds is expected — there is no pool to have holes in. That is the point of the change, and it is why the same number reads as an improvement here rather than as pressure.
What it costs on this card:
preparingis 5 ms a frame higher with the two switches on. I cannot say which of them does that: I turnedTEXTURE_POOL=0andHELPER_PRIORITY=onon together, so this is the effect of both, not of either. If you want them separated I can run the four combinations, it is about 3 minutes a round.What this does not show. Six short runs of one scene; each round is one run, so the 39–40 samples per round are time points through the same loading, not independent draws. It covers standing on a balcony, not driving or cutscene cuts, which is where the queue is worst. It also cannot tell whether the pool-off rounds stay under the line for a long session — all three were still rising when I closed them.
The queue numbers are the part I think is worth having: the pool holding 1–1.7 GB of holes is exactly what
+862 … +1201looks like from the outside, and turning it off takes that away. Thanks for the write-up — the hole figure is what made me try it.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T15:56:00Z.
Run K — this PR + three opt-in fixes (RTX 5060 8 GB, Ryzen 5 9600X, 16 GB RAM)
Three branches were merged locally on top of the PR head (
40f8c3da→c670cd1f; pushed with the report in679169d1). Each adds or changes one setting, off by default, with a test:fix/texture-queued7a39cc7VICTORY_HELD_HOT=1(withVICTORY_SAMPLED_MARKS=1): while the card has no room, every 8th frame the held texture slots a shader sampled in the last 60 frames are due again instead of waiting ~4 s or for roomfix/transitions7e896f79VICTORY_REFRESH_CHECKonly counts a block as stale while its copy holds still (a copy the refresh just updated means the title wrote again, not a stale copy)fix/reflections471c81b5VICTORY_RAYMISS_SKY=<share>: runs the miss program for opaque/transparent surfaces and scales its sky bysharein a small compute pass (fixes multicoloured patches on glass/car bodies with RT off)cargo build --releaseOK,cargo test -p victory-gpu: 939 passed, 0 failed.Setup
--series-s --res 1440 --dlss quality --framegen 2, same--setas the reference run (REFRESH_CHECK=1,TEXTURE_ROOM_MARGIN_MB=768,TEXSPK_PASS_MS=8,WINDOW_KB=1024,WINDOW_TAILS=1, …). Compared with the reference, K replacesRAYMISS_KEEP=1withSAMPLED_MARKS=1 HELD_HOT=1 RAYMISS_SKY=0.25, so several settings change at once. Same save and route, game closed cleanly (end = closed), 5 min 58 s (4 min 45 s in the world).Results
World lines are the 5 s fps lines with ≥ 1000 draws/frame.
REFRESH_CHECK)Log excerpts: the two freezes (times UTC)
Logs:
victory-nvidia-play-20261129-154741-11008.log(K) andvictory-nvidia-play-20261129-152010-27184.log(reference), with themem-watch.ps1CSVs. I can share them on request (8–9 MB each).Interpretation
fix/transitionsonly changes howREFRESH_CHECKcounts). These two frames account for the lower p10 and the higher mean.HELD_HOTbringing on-screen textures back without room, and there is no out-of-VRAM event. The due count does not drop, so the queue is not shorter. The log has no counter for how many slotsHELD_HOTbrought back. That counter should be added.RAYMISS_SKYpass ran. No visual notes were taken in this run, so the fix for the coloured patches still needs to be checked on screen.Limits: a single 5-minute run, several settings changed together, no visual notes. All three settings stay off by default. Full report:
docs/test-results-2026-11-29.md, run K.🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T17:36:56Z.
Test request at
77427629:VICTORY_MEM_ATTRS=1, a count of title memory by what it was asked to beThe layer serves every title block as cacheable CPU memory. The memory type in
XMemAlloc's attributes and the write-combined/uncached bits ofXMemVirtualAllocare dropped (xmem.rs). So all of the title's memory is write-watched, refreshed and kept as a host copy alike. On 16 GB, those refreshes are what freeze the submitting thread while the PC pages (run K).This commit only measures; it does not skip anything yet. With
VICTORY_MEM_ATTRS=1(off by default), for each attribute class (memory type, page size, alignment and 32-bit forXMemAlloc; protection, page size and commit state forXMemVirtualAlloc), it logs:A class with large host copies and close to 0 written after upload (for example the GPU read-only types 2 and 4) is a class that could skip watching, refreshing and the host copy. That is the next step, behind its own switch, keeping 0 stale copies under
VICTORY_REFRESH_CHECK=1.What would help, on any card and RAM size:
77427629(cargo build --release --locked -p victory).VICTORY_MEM_ATTRS=1, at least 5 minutes in the world, and close the game by its window so the log ends normally.mem attrs (exit): ...lines from the log (one per class, largest first), or the lastmem attrs (5s)block if the exit ones are missing, along with your GPU, VRAM, RAM, and the switches you used.Overhead with the switch on is one map lookup per allocation and per host copy made, plus a counter per refresh. Nothing changes with it off.
cargo test -p victory-gpu -p victory-hle --releasehere: 939 passed. The 2texbacktests fail only when the whole suite runs in parallel and pass on their own (known shared-state flakiness). Thecargo clippyerrors invictory-loaderandvictory-shaderwere already on the base; this commit does not touch those crates.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by DrDarkDK on 2026-11-29T17:55:16Z.
I ran the requested
VICTORY_MEM_ATTRS=1test on a clean release build at77427629. Windows 11, Ryzen 9 7900X, RTX 4070 Ti 12 GB, 32 GB RAM. Series X at 2560×1440, DLSS Ultra Performance,VICTORY_TEXTURE_POOL=1,VICTORY_HELPER_PRIORITY=on, andVICTORY_WARMUP_RESTART=0. I kept the existing shader cache for both runs.Memory attributes with DLSS Frame Generation 2×
I was stuck in one place at about 0.2 FPS for just over five minutes. I closed the game normally and attached all 17
mem attrs (exit)rows.0x801, 64K placeholder0x2404, 2M committed0x2404, 64K placeholderClass 2 accounted for about 71% of the host-copy bytes at exit and recorded substantial writes after upload, even in this stationary sample.
Follow-up with Frame Generation off
I ran the same executable again. The only effective settings changes were
VICTORY_FRAMEGEN=0,VICTORY_FRAMEGEN_X=0, andVICTORY_FSR_FRAMEGEN=0.With FG on, the recurring five-second queue waits began just after DLSS FG activated. Streamline’s actual Present call took about 0.4 ms. With FG off, the longest reported queue wait in the matched window was 482 ms.
This was one run per setting, with different draw counts. Disabling FG removed the recurring five-second stall in this comparison, while private memory remained high. The underlying queue dependency is still unclear.
AI-assisted with Codex.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T18:27:41Z.
Thanks a lot @DrDarkDK for the run and the careful write-up, including the FG on/off comparison. Here is the same test on the author's PC, for a second data point.
VICTORY_MEM_ATTRS=1at77427629: RTX 5060 8 GB, Ryzen 5 9600X, 16 GB of RAM,--series-s --dlss quality --framegen 2, the switches of run K. Firefox and Discord stayed open (4.6 GB free at the start), so fps and memory are not comparable to K, but the class table is. About 9 min, closed by its window, 0 stale copies withVICTORY_REFRESH_CHECK=1.0x801(PAGE_NOACCESS | PAGE_GRAPHICS_NOACCESS), 64K placeholder, 1 call0x1, 4K reserved, 32-bit0x2404write-combined, 2M committed0x2404write-combined, 64K placeholder0x22004, 2M committedThe other 11 classes hold no host copies (class 1 is 16.7 GB live, class 12 is 4.0 GB).
What both runs say:
0x801placeholder, 71 % of host copies on yours and 79 % here. Its label is the reservation's, not what the title asks of the pages it maps there. The GDKX docs say pages mapped byXMemMapPhysicalPagestake their reservation's protection, so aNOACCESSpool must get its real protection later, throughVirtualProtect. The counter did not hook that yet; the next commit does.XALLOC_ATTRIBUTES.ObjectTypewhen the allocator id is D3D's) to tell static resources from dynamic and staging ones.On the FG stall at 0.2 fps: frame generation works on this 5060 (about 20 generated frames/s in run K), so your Series X /
VICTORY_TEXTURE_POOL=1/VICTORY_WARMUP_RESTART=0setup is the difference to look at. Noted as a separate issue.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T18:32:07Z.
Pushed
e0b7a854: the memory-attribute counter now sees what the big placeholder really holds (VICTORY_MEM_ATTRS=1, still off by default and still measurement only)Following the two runs above:
VirtualProtectis counted. The title'sVirtualProtect(already hooked astitle_virtual_protect) now repaints its range under a class of its own, shown as... set by VirtualProtectwith the protection asked. Pages thatXMemMapPhysicalPagesmaps take their reservation's protection, so this is where the 16 GB0x801pool should split into its real kinds. If it stays large after this, the title sets those pages some other way, and that is worth knowing too.XALLOC_ATTRIBUTESallocator id is Direct3D's (128), the class keeps itsObjectType, named in the log:resource,dynamic resource,staging resource,tiled resource,shader,command buffer,ring temporary, and so on. That is the line between memory written once and memory the CPU rewrites every frame, which is what a skip needs.Tests:
cargo test -p victory-gpu -p victory-hle --releasepass (4memattrstests, 2 of them new).host::menu::tests::a_change_is_saved_at_once...failed once in the full parallel run and passes on its own (known shared-state flakiness). The release build is fine.Same request as before, now on
e0b7a854: play at least 5 minutes in the world with your usual switches plusVICTORY_MEM_ATTRS=1, close by the window, and post themem attrs (exit)lines with your GPU, VRAM and RAM. The most useful lines are those markedset by VirtualProtectand those with aD3D object. Thanks in advance.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Razen114514 on 2026-11-29T19:04:41Z.
VICTORY_MEM_ATTRS=1on an 8 GB card with 32 GB of RAMThe missing cell from your two runs: same VRAM as yours, twice the system RAM.
e0b7a854, release build, the switches below, 8 min 45 s from start at thesafehouse.
These are the last
mem attrs (5s)block, not anmem attrs (exit)one. Theprocess was ended rather than closed by its window, so the log has no exit block:
0
mem attrs (exit)lines, 2,736 of the 5 s kind (14 classes over 195 windows).Your step 3 allows the last 5 s block in that case.
The figures accumulate rather than roll. The same class 7 reads 9.7 MB
refreshed in the first block, 63,379 MB at block 100 and 112,010 MB in the last,
so the last block is the whole run and every number below is a total.
Testbed. RTX 5060 8 GB, Intel Core i5-13490F, 32 GB RAM (yours is 16 GB),
Windows 11 26300, driver 32.0.16.2124, image
b99f876b74d4a77f, Series S,--dlss performance, frame generation 2×.Switches:
VICTORY_MEM_ATTRS=1plus the set I normally play with —AMBIENT_SHADE=0,0.6 AMBIENT_ONCE=1 INPLACE=1 TEXTURE_NO_WAIT=0 TEXTURE_POOL=0 HELPER_PRIORITY=on WAVE_PAIRS=1.The last
mem attrs (5s)block, largest firstWhat stands out
Three classes carry 150 GB of the 152 GB refreshed, and one of them is not
write-combined.
class 7 alone is 73% of everything refreshed on the submitting thread, on 185 MB
of memory — a 605× amplification. It is
protect 0x1with 4K pages and the 32-bitflag, so it is not one of the write-combined classes and it does not fit the shape
you were looking for: the CPU writes 112 GB into it. Something about a small
4K-page 32-bit block is costing as much refresh as everything else together. I do
not know what it holds; that is the question I would ask next.
Your "large host copies, almost nothing written" shape is class 0, not the
write-combined ones: 92 MB of host copies, 80 MB uploaded once, 24.5 MB written
after — but 104.6 MB refreshed, so it is being refreshed more than it is written.
At 92 MB it is not where the time goes.
The write-combined classes are hot. class 4 writes 24,636 MB after upload and
class 18 writes 12,695 MB, so neither can skip watching on this title. Their host
copies (216 MB and 290 MB) are also far smaller than their live bytes (1277 MB and
1632 MB) — most of what they hold is never copied at all.
The five classes that read all zeros hold 185 MB between them (9, 15, 5, 14, 13,
plus 11, 16, 6, 17 below them). All are
XMemAllocwith 2, 4, 16, 2 and 3allocations respectively — so few, and possibly late in the run, that a zero here
may mean "not touched" rather than "never needs watching". Together they are 0.3%
of the refreshed bytes.
The rest of the frame, for context
From the same log, so you can compare against your 16 GB run:
the pass over textures picked by index: 1172 ms in the last 5 seconds— afifth of the wall clock spent in the texture pass, with 20,522 of 25,708 slots due
and 0 MB free in the blocks. That matches the queue pressure you and I both see on
8 GB.
Limits
One run, one scene, my own switches. The block above is a mid-run
5 swindow andnot an exit block, so the byte figures are what moved in those five seconds, not
what moved over the whole run — the class 7 amplification in particular would be
worth confirming against an exit total. I did not run with frame generation off,
so I cannot separate its share. The frame line in the excerpt is one window's
figure, not a median.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T22:05:26Z.
I added an opt-in loading screen for the first 3D scene in 36c6eba. Enable it with
--set VICTORY_STARTUP_TEXTURE_WAIT=1and frame generation off. Texture uploads and game updates continue behind the loading screen. The scene is shown when the texture queue falls below the threshold, stops making progress, or reaches the safety limit.In a local RTX 5060 8 GB / 16 GB RAM trial on the
.02base, the queue grew from 881 to 14,774 due texture slots while uploads continued. The screen released at the 10.024-second safety limit, with the queue still above the threshold. The game later stopped with0x8007000Ewhile closing a D3D12 command list. This run confirms the loading screen and fallback paths. It does not establish an improvement to the first visible frames.The two targeted tests and the staged asset policy passed on the PR branch. The setup and results are in the test notes.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T23:04:20Z.
37bce66 uses the GDKX sampler-feedback model to prioritize indexed textures that shaders sampled recently. When the regular texture pass hits its VRAM budget, these slots move ahead of background checks. Rechecks keep their fingerprints and the existing VRAM, RAM and per-pass limits still apply. Set
VICTORY_DUE_HOT_FIRST=0to compare with the former queue order.The release built and 73 descriptor tests passed. Both local sessions reached gameplay and closed normally. In the matched 45-second opening-scene windows on RTX 5060 8 GB, warnings about textures changing after upload went from 4 to 0 and skipped prelude uploads from 1 to 0. Median rendered FPS was 5.6 vs 8.1, and median buffer-copy time was 80.4 vs 60.8 ms/frame. Both windows had eight queue samples blocked by the VRAM budget. This was one run per build with different scene timing and draw counts. It does not establish a causal FPS improvement or confirm that all visual texture problems are resolved.
The settings, method and limitations are in the test notes.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-29T23:53:10Z.
A/B of
VICTORY_DUE_HOT_FIRSTon the same binary (37bce66), runs 1 and 2 of 4: not conclusive yetRTX 5060 8 GB, Ryzen 5 9600X, 16 GB of RAM. One binary built from
37bce66exactly. Each run starts from a fresh copy of one reference cache and save (VICTORY_CACHE_DIR/VICTORY_DATA_DIRper run), uses the preset ofdocs/prompt-reprise-pr-2334.md(--series-s --res 1440 --dlss quality --framegen 2,VICTORY_LOG=info,VICTORY_MEM_ATTRS=1,VICTORY_SAMPLED_MARKS=1, …), loads the same save, and leaves the camera still in the world. The setting is checked in each log's switch line. Both runs were closed by their window.45 s window from the first 5 s line with at least 2,000 draws (
scripts/bench.pyon the cut logs):=037bce66run (23:00)4c20058(22:50)What this says, and what it does not:
VICTORY_DUE_HOT_FIRST. The one hint in its favour, 3 late texture changes with=0against 0 with the default in both default runs, rests on single counts.=0) follow, with other programs closed.Over the whole of run 1, two "HERO LEAD" lines turned out to be memory reused by another texture (a 6-face BC6H cube map at the start of a 1-face BC7, and BC1 blocks inside a BC3), not a GPU copy the view missed. Filling those views from title memory is right. The real risk is a later view with the old layout at the same address being sent back to the old copy. A fix,
VICTORY_HOST_WRITTEN_REUSE=1(off by default), is written but not pushed or measured yet.Next run on the same binary:
VICTORY_PORT_CONSTANTS=1. It turns onxmem::arrange(), which gives the 185 MB below-4 GB graphics heap its section's slices in address order (XMemMapPhysicalPagesmaps them out of order here), so the in-place port can serve it with no host copy and no refreshes. That path has been off since the GPU half of the port became default without that switch.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-30T00:10:09Z.
VICTORY_PORT_CONSTANTS=1on the same37bce66binary: the 185 MB below-4 GB graphics heap is served in place, its host copy is goneSame binary, same reference cache and save, same preset as the A/B above, plus
VICTORY_PORT_CONSTANTS=1. This run was driven unattended: Enter sent to the window from 10 s after launch, every 15 s, until the title left its waiting screen. Then 60 s with the camera still in the world, then closed by its window (end = closed). Free RAM at launch was 8,237 MiB (Edge open). 0 stale copies withVICTORY_REFRESH_CHECK=1, 0 out of VRAM, 0 ERROR lines.Why it was off.
xmem::arrange()gives the pages of the title's 32-bit graphics heap their section's slices in address order. The title makes oneXMemAllocatePhysicalPagescall and maps it out of the addresses' order (3rd, 4th, 1st, 2nd part), and a host heap cannot be opened over views out of their section's order (OpenExistingHeapFromAddress1refuses with E_INVALIDARG; WARP test in agent 2's branch). That function only ran withVICTORY_PORT_CONSTANTS=1written out, while the GPU half of the port has been on by default without it. So every run on this PC logged "not one native-import-eligible stretch of a section: Scattered", and the 174 MB title buffer in that heap stayed a host copy refreshed on the submitting thread.What the log shows with the switch:
the title's 32-bit graphics pages given their section's slices in address order ... moved=752 ... not_fresh=0(five maps, 2,944 pages): no page was used before its map.a stretch of the title's graphics memory opened as a host heap through a view of ours ... bytes=193986560, thentitle memory in place ... len=182452224 window=false.VICTORY_MEM_ATTRS): host copiesLimits. One run of 2 min 29 with 60 s in the world. The 45 s window starts at world entry, where streaming dominates, and does not show the gain yet; the steady-state lines above do. The camera was still, and the runs it is compared with were played by hand. A longer unattended pair (with and without, same start) comes next.
What to watch. The buffer now has one home, the title's memory, but our CPU steps at submit read from it (9,799 constant-buffer fills a frame, 3.3 MB, and 6 buffer copies) without waiting for submissions still in flight, and buffer views that are not on an element of the buffer's host copy still get exact copies of their own. Neither showed up as a stale copy in this run. If they do, a targeted fix is written (
VICTORY_INPLACE_VIEWS=1, off by default, not pushed). A stricter switch,VICTORY_XMEM_ORDERED=1, runs the same ordering withoutPORT_CONSTANTSand gives a section up for good on the first page used before its map. It is written and tested, not pushed yet.Edited: do not turn this on. A longer pair (next comment) shows the GPU time going from 3 to 50 ms a frame and the median frame rate halving, because the shaders then read this heap from the PC's RAM.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-30T00:21:27Z.
Correction to the comment above:
VICTORY_PORT_CONSTANTS=1moves the cost from the CPU to the GPU, and halves the frame rate here. Please do not turn it on.I ran a longer unattended pair on the same
37bce66binary: same reference cache and save, Enter sent from 10 s until the title left its waiting screen, 180 s with the camera still in the world, closed by its window (end = closedfor both). Free RAM was 9,255 and 10,356 MiB (Edge open). 0 stale copies and 0 out of VRAM in both.VICTORY_PORT_CONSTANTS=1What it does show is where the CPU cost goes: about three quarters of the steady-state copy time is this one heap. The next step is to keep the shaders reading VRAM and take only the copy work off the CPU: the in-place heap stays as a source, and the bytes the title wrote since the last submission are carried into the card copy by the GPU's copy engine (
CopyBufferRegionfrom the placed host buffer) instead of by CPU memcpy. That will be behind a switch off by default, measured the same way before anything is proposed here.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Castyan on 2026-11-30T00:35:03Z.
Pushed
504d07a9(fast-forward from37bce66): one texture fix off by default, and the write-up of tonight's measurementsVICTORY_HOST_WRITTEN_REUSE=1(off by default,texture.rs,docs/placed-view-hero-lead.md). When a placed view of another layout (another block size, another layer count, or other dimensions at its start) lands in the memory of a texture the host copied into, the copied texture's address is forgotten. Without it, a later view laid out like the old texture at the same address, as in a streaming pool, would be served from the old copy and show the wrong texture. The two "HERO LEAD" lines of the A/B runs were such reuse. Not measured in game yet.docs/due-hot-first-ab-2026-11-30.md: the protocol (one binary, a fresh copy of one reference cache and save per run, unattended runs driven by Enter, camera still), all the runs below, their limits, and the GDKX contracts behind them (XALLOC_ATTRIBUTES,XMemVirtualAlloc,XMemMapPhysicalPages, sampler feedback tier).cargo test -p victory-gpu --release: 947 passed, 0 failed. Asset policy OK. The release build is fine.VICTORY_REFRESH_BESIDE=1(already in the PR, off by default) on the same binary, unattended, 180 s still in the world, compared with the run without it from the pair above. Both closed by the window, 0 stale copies, 0 out of VRAM, 0 ERROR lines:VICTORY_REFRESH_BESIDE=1The steady-state lows rise sharply, which means far fewer long frames. World entry is no better in this single pair. The rise of late texture changes from 5 to 150 is not explained yet: it could be more frames uploading more, or uploads ordered against refreshes that now run beside. It needs checking before this switch can be recommended, so please treat it as experimental. If you try it, the
refreshes beside the submitting threadline and anychanged after its uploadlines would help.Also from tonight, all in the doc: the
VICTORY_DUE_HOT_FIRSTA/B is still not conclusive (2 of 4 runs, swamped by RAM and route).VICTORY_PORT_CONSTANTS=1halves the frame rate on this card, because the shaders then read the 185 MB heap from the PC's RAM. Carrying the written bytes into VRAM with the GPU's copy engine instead was dropped: the CPU side of a card copy is also the reference of the three-way merge that lands what shaders wrote.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Jirionde on 2026-11-30T16:55:31Z.
Tested this PR on an 8 GB card, results for the 8 GB side of the PR.
PC: RTX 4060 Ti 8 GB (PCIe 4.0 x8), i9-11900F (power limit 75 W), 32 GB DDR4-3200, Windows 11 26300.
Build: gta6port branch = v2026.11.29.05 + this PR merged (no conflicts), built from source, x86-64-v3, fat LTO.
Run: prison scene save, Series S, DLSS performance, FSR 3 frame generation 2x,
VICTORY_TEXTURE_POOL=0, 260 s, muted, stats from 120 s on.VICTORY_REFRESH_BESIDE=1 VICTORY_REFRESH_AT_SUBMIT=1 VICTORY_REFRESH_CHECK=10 device removed, 1 ERROR line. One run each so far, so treat it as a first signal; I did not get to split the three switches or run the PR build with them off. Happy to run more combinations if you tell me which ones matter.
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.