At ~22 fps the renderer thread needs ~37 ms a frame: a second limit next to the GPU, a third of it the index-slot reads at Execute #44
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/vktory6--VKtory#44
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?
@Mhyster on GitHub · 2026-12-01 03:59 UTC · original
One window of vk.log's profile lines (60 presents, standing in the world, unprofiled, default build):
The thread itself: 75.2 % of a core (per-thread sampling over the same run), fps ~21.8, GPU busy ~85 %. So the renderer alone would hold the frame near 27 fps with an infinitely fast GPU; scenes with more draws (2.4x in the drops to 10-15 fps seen earlier) add to exactly this work.
The GPU side does not move fps on its own either. A play-only measurement switch that skips the structure builder's dispatches (as
VKB_NO_RTBUILDdid before 2026-11-29; rays then find nothing) took the RT/GI class from ~12 to 8.4 ms and the builder classes (~2.2 ms) out of the serialised frame, and fps went from ~21.8 to 22.4 at the same spot.Slot reads in numbers (5 s windows, the house spot of the same save, same build): ~23M slot reads, 66 % slot-cache hits, ~2.2M that resolve to no view, all of them inside the view heaps and missing although cached. The per-read cost in vkback is already small (
slot_reads9.8 % andPaged::holds7.8 % of the thread in a flat perf profile: ~30 ns a read for those two, ~60 ns with all the label holds); the volume is what costs, which points at fewer reads rather than faster ones (TASKS.md "the descriptor heap as one array"). A cross-list dedupe on the PE side would need vkback's uncaches (forget_slots) fed back, since the PE side cannot see them.Seen on: 1da3463:
2dd59dawith the open PRs #22 and #29 merged, just-another-dude84/VKtory@324542c cherry-picked, a local translator version bump, and #47 and #48; the not-a-view counts and the builder-off run on local builds of the same tree with a counter or the switch added. Not rechecked on73ee0ab. RX 9070 XT 16 GB, Ryzen 5 9600X, Mesa 26.3.1. (Corrected 2026-12-01: this line first named only #47's and #48's changes.)🤖 Generated with Claude Code
@Mhyster on GitHub · 2026-12-01 04:39 UTC · original
More numbers for this, from a run of the same build with
VKB_LAT(standing at the same spot, unprofiled; 3,974 frames over 188 world s;frames.py, with autopress's "in the world" line given to it asautorun.txt):remap in queue order: present waits for the remapper.The title's side of the same slots (
freclines over the last 3,900 frames, and victory-gpu's sync line):tframeusmean 47.4 ms (p50 45.6, p90 58.1);hsyncusmean 13.9 ms (p50 13.7, p90 17.2).sync_heapsper frame: 328.7 changed heap pages, 673,080 slots looked at, 170,382 mirrored; 13.12 ms = 1.50 asking, 1.90 reading and comparing, 9.70 making. The records pool has 3 threads here (cores::scaled(6, 1)on 12 logical processors).So the ~170k slots the title rewrites each frame cost ~13 ms on its submitting thread before they reach vkback, then ~12.5 ms at Execute on the renderer: ~25 ms of CPU a frame across two threads. "The descriptor heap as one array" would take out both halves.
Seen on: 1da3463:
2dd59dawith the open PRs #22 and #29 merged, just-another-dude84/VKtory@324542c cherry-picked, a local translator version bump, and #47 and #48. Not rechecked on73ee0ab. RX 9070 XT 16 GB, Ryzen 5 9600X, Mesa 26.3.1.🤖 Generated with Claude Code
@vktory6 on GitHub · 2026-12-01 07:34 UTC · original
Thanks for the numbers. They make the case for "Descriptor heap as one array, not seven typed ones" on both threads, so I added them to that task in
github.com/vktory6/VKtory@5169307(renderer ~12 ms at Execute, plus ~13 ms ofsync_heapson the title's thread).@TheRifai on GitHub · 2026-12-02 10:38 UTC · original
A local A/B/B/A on current main (
d59b4f8) adds a data point for the two-thread descriptor cost in this issue. The repo already contains "renderer port #2" (VICTORY_PORT_DESCRIPTORS): it patches the title's descriptor-record stores sosync_heapslearns which slots changed instead of reading whole changed heap pages. It was off by default; I A/B'd it on the house savert3, 110 s per run, GE-Proton11-16, warm store, RT on, no validation:hsyncusmean in slow framesThat is ~+1.6 fps, −2.1 ms/frame, renderer −1.6 ms, and ~2 ms less title-side heap-sync time. No new loud kinds or fallback/fault lines; a validation run with the port on had only the four known VUIDs. So narrowing "which slots changed" is worth ~2 ms on each side here, before the larger one-array design lands. I proposed enabling the existing path by default in PR #201; no code is copied from other forks.
Evidence:
/home/shlong/Documents/VKtory-capture/port-ab-{A1,B1,B2,A2}/andport-val/. Validation runs were not used for the timings.@TheRifai on GitHub · 2026-12-02 17:56 UTC · original
Data point after main
88d66aeremoved the port-2 descriptor-store patches (TASKS "Slim victory-gpu"): A/B/B/A againstbc86e65on the reference card, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X 3840x2160, housert3, warm store, 75 s per run, keys W/I at 20/45 s,VKB_LAT=1.slot_reads at Executeper slow framebc86e6588d66ae88d66aebc86e65fps is unchanged within spread; the one valid patched arm has ~1.5 ms more
slot_readsper slow frame, so removing the title-store patches did not buy back the renderer time their +1.6 fps A/B had measured. That matches the maintainer's note in TASKS: the win came from not reading whole changed heap pages, and the fix belongs in heap sync without patching title code. No new VUIDs or loud kinds in any arm. Evidence:/home/shlong/Documents/VKtory-capture/regress88-{A1,B1,B2,A2}/.@vktory6 on GitHub · 2026-12-02 18:38 UTC · original
Thanks for both runs. The first A/B is the measurement behind "fix it in the heap sync" in "Slim victory-gpu". The second one went into the same item:
github.com/vktory6/VKtory@a58cd901ddA note on reading the second one: port 2 was off by default on
bc86e65too, so the A/B compares two default paths, and "no change" is what we'd expect. It confirms the deletion cost nothing. The +1.5 ms ofslot_readscomes from a single valid arm, too thin to judge. The renderer and heap-sync numbers from this issue are in "Descriptor heap as one array, not seven typed ones", which is where the fix will land, so I'm closing this. Thanks.