batch 64 KiB block queries in texture mapped_bytes #177
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/177"
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 fxceless/victory-fork. Originally posted by matheusfrta on 2026-11-24T22:13:18Z.
mapped_bytes previously called readable one 64 KiB block at a time, issuing a separate K32QueryWorkingSetEx call per block on streamed textures. Batch up to 256 block probes per query like readable already does, and add a sparse reservation test across batch boundaries.
Imported from fxceless/victory-fork. Originally posted by rostaddotcc on 2026-11-24T22:36:06Z.
Supporting measurement from Linux/Proton, where this is now the largest item left in the texture lane.
With #175 (
8e0e7b6, range-scoped mapping locks) the wait-for-remap counter is 0.0 ms in all 113 sampled windows, and what remains oftexture refreshes per frame, all threadsis the asking: 62.9 ms median, 936 ms in the worst window, out of a lane that runs 0.2–0.3 fps with 3 478–4 223 ms frames (RX 7900 XT, RADV, vkd3d-proton 3.2.0, 430-second run).On the same box before that PR the split was the other way round — asking 7.3 ms median against 20.2 ms of waiting — so batching the block queries is what the lane needs next, not a micro-optimisation. It also matters on Wine specifically:
K32QueryWorkingSetExis emulated there, and the per-block call is a syscall round trip, so the wall-clock gain should be larger than on Windows for the same block count. If you have a way to count the calls per refresh, that number from a run here would make the case for the batch size.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.