Repository navigation
Renderer port 1: on in both halves by default (the 174 MB heap was "Scattered" and stayed a copy in every default run) - #3399
Conversation
…d" and stayed a copy in every default run) The port has two halves. This side (`victory-gpu`'s `port`) opens the title's 32-bit graphics heap as a host heap and uses it in place; xmem's `arrange` gives that heap's pages their section's slices in address order first, because the title maps its five pieces in another order than their addresses and a heap can only be opened on one stretch of a section. Since e4860eb (trustno1-coder#1223) this side is on by default except on Ampere cards. xmem went on reading the switch itself and was on only for `VICTORY_PORT_CONSTANTS=1`, which no launcher sets. So in a default run the pages stayed as the title maps them, this side found the heap "not one native-import-eligible stretch of a section: Scattered" and left it a copy, with one warning and nothing else to show for it. xmem now asks this side (`victory_gpu::title_graphics_heap_in_place`), so the two cannot differ. RTX 4070 Ti SUPER, Series X profile, 2560x1440 with DLSS performance and frame generation 2x, the same save, standing in the world, 2026-11-29: - before: "0 regions of the title's graphics memory in place"; the submitting thread 33.8 ms in its submissions, the card idle 10.9 ms behind it (76 % busy), 45 ms a frame - after (the switch set by hand, which is what the default now does): "1 regions ... in place (185 MB)"; 25.7 ms in its submissions, the card idle 2.7 ms (93 % busy), 43 ms a frame. The card is the limit there now. The refusal's line also says how the views lie ("3 views of 1 sections in 2 runs, the longest 150528 KiB: [...]"): that is what named the cause.
|
Closing this myself: a controlled comparison shows the change would be a loss on this card, and the gain in the description came from one favourable moment, not from a like-for-like run. Same build, same save, standing still by day, RTX 4070 Ti SUPER 16 GB, Series X, 2560x1440, DLSS performance, frame generation 2x, 25 one-second windows each:
So with the heap in place the submitting thread saves a few ms and the card loses about 20: the heap is the PC's memory then, and the shaders' reads of it cross the bus (what What still stands from the description, and may be worth a look on its own:
If the two halves should agree, the numbers above argue for agreeing on off for discrete cards with their own memory, or for deciding it from a measurement per host, not for this change. The |
…lves by default (the 174 MB heap was "Scattered" and stayed a copy in every default run) trustno1-coder#3399 by Revono, head f922674.
With both halves asking one answer, an unset switch would have turned the port on in every run on any card but an RTX 30 one, where before nothing was placed (xmem left the heap scattered). It was measured faster only on AMD: on an RX 7900 XTX a frame of 45 ms became 37. On NVIDIA it was measured slower: an RTX 4070 Ti SUPER 61 ms a frame against 42 with it off (trustno1-coder#3399, closed by its author for that), an RTX 5080 Laptop GPU 136 to 178 ms of card time a frame against 18 to 27 (trustno1-coder#2923). Intel was not measured. So unset is on where the host device's card is AMD's (vendor 0x1002) and off on any other, which is what default runs there did; 1 and 0 still say. The card's vendor is in the line that says whether the port is on. The F1 menu's AUTO says ON AMD CARDS. The Ampere name list goes: off is the default for every card that is not AMD's. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
No issue filed for this; found while asking why the submitting thread still refreshed the title's 174 MB buffer 17 times a frame.
What it changes
Renderer port 1 has two halves.
victory-gpu'sportopens the title's 32-bit graphics heap as a host heap and uses it in place.victory-hle'sxmem::arrangefirst gives that heap's pages their section's slices in address order, because the title maps its five pieces in another order than their addresses and a heap can only be opened on one stretch of a section.Since e4860eb (#1223) the GPU half is on by default except on Ampere cards.
xmemwent on reading the switch itself and was on only forVICTORY_PORT_CONSTANTS=1, which no launcher sets. So in a default run on any card but an RTX 30 the pages stayed as the title maps them, the GPU half found the heapnot one native-import-eligible stretch of a section: Scatteredand left it a copy, with one warning and nothing else to show for it.victory_gpu::title_graphics_heap_in_place(): the port's one answer, public.xmem::port_onasks it, and its own parsing of the switch is gone, so the two halves cannot differ.VICTORY_PORT_CONSTANTS=0and=1and the Ampere default behave as the GPU half already had them.inplace::scatter):3 views of 1 sections in 2 runs, the longest 150528 KiB: [0x10e20000+0x1b00000 section 0x13c4@0x9e00000, 0x12920000+0x9300000 section 0x13c4@0x0]. That line is what named the cause.How it was tested
renderer port 1: title memory not in place, a copy as before ... Scatteredand0 regions of the title's graphics memory in place (0 MB). Submitting thread 33.8 ms in its submissions, the card idle 10.9 ms behind it (76 % busy), 45 ms a frame. A diagnostics run of the same build shows the buffercopied from 0x165d0000+0xae00000: 17.4x/frame, 3173.91 MB/frame.VICTORY_PORT_CONSTANTS=1set by hand on the same build, which is the state the default now has):the title's 32-bit graphics pages given their section's slices in address orderfor all five pieces (not_fresh=0),a stretch of the title's graphics memory opened as a host heap through a view of ours ... bytes=193986560,1 regions ... in place (185 MB). Submitting thread 25.7 ms in its submissions, the card idle 2.7 ms (93 % busy), 43 ms a frame. The card is the limit there now, so the frame gains 2 ms on this PC; a PC whose card has room should gain more.cargo testpassed for the crates it touches:cargo test -p victory-gpu --locked --lib port::(4 passed) andinplace::(9 passed).cargo test -p victory-hle --locked --lib xmem: 45 passed, 1 failed, and it is the same one that fails onmainwithout this change when the module's tests run together (a_read_by_range_waits_only_for_a_remapping_that_meets_it; it passes alone).cargo xtask policy --staged:asset policy: 4 files ok.cargo clippy ... -D warningsstops invictory-shaderonmainas it is; without-D warningsthis change adds no warning.Checked for overlap
VICTORY_PORT_HOME) and perf(gpu): scope title write invalidations, trim submit steps, and speed up texture refresh #3109 (15 lines inport.rsfor the submit steps) touch the port without changing which half is on; fix(gpu,shader): support VICTORY_PORT_CBV=1 on capped 1M-descriptor GPUs (raw_views == 0) and fix subword raw CBV load #3396 is the other port (VICTORY_PORT_CBV). No open pull request namesVICTORY_PORT_CONSTANTSorarrange.