Map 3D: GPU frame time by part in the tick lines #343

Manually merged
github merged 2 commits from gh-pr/343/head into gh-pr/343/base 2026-11-26 20:29:02 +00:00
Owner

@⁠holdmysocks on GitHub · 2026-11-26 02:48 UTC · original
holdmysocks:six-map3d-gputime → master · +160 −3 · 4 files · 2 commits · merged 2026-11-26 05:14 UTC

Measures where the 3D map's frame time goes on the GPU, so the city's frame rate can be fixed where the time is actually spent.

  • Where the adapter supports timestamps inside command encoders, the 3D view writes five timestamps per frame: start, after the sky tables, after the shadow cascades, after the main pass, and after post. They are read back a few frames later, so the CPU never waits for them.
  • The automation tick lines gain gpu ms/frame sky|shadows|main|post, the mean over the frames since the last tick (- when the adapter has no timestamps).
  • SIXNG_MAP_TICKS=1 keeps the tick lines going after a screenshot run's shot, so a view can be measured once streaming has settled.

Nothing changes in what is drawn.

Checked

  • cargo check and cargo clippy clean.
  • Test PC (RTX 3090, Vulkan): the timestamps work, and the measurements in #351 were taken with them. Downtown, the GPU needs 12-17 ms of a 45-49 ms frame, so the frame was CPU-bound in draw encoding.
**@⁠holdmysocks** on GitHub · 2026-11-26 02:48 UTC · [original](https://github.com/holdmysocks/SixNG/pull/343) `holdmysocks:six-map3d-gputime` → `master` · +160 −3 · 4 files · 2 commits · merged 2026-11-26 05:14 UTC Measures where the 3D map's frame time goes on the GPU, so the city's frame rate can be fixed where the time is actually spent. - Where the adapter supports timestamps inside command encoders, the 3D view writes five timestamps per frame: start, after the sky tables, after the shadow cascades, after the main pass, and after post. They are read back a few frames later, so the CPU never waits for them. - The automation tick lines gain `gpu ms/frame sky|shadows|main|post`, the mean over the frames since the last tick (`-` when the adapter has no timestamps). - `SIXNG_MAP_TICKS=1` keeps the tick lines going after a screenshot run's shot, so a view can be measured once streaming has settled. Nothing changes in what is drawn. ## Checked - `cargo check` and `cargo clippy` clean. - Test PC (RTX 3090, Vulkan): the timestamps work, and the measurements in #351 were taken with them. Downtown, the GPU needs 12-17 ms of a 45-49 ms frame, so the frame was CPU-bound in draw encoding.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 20:29:01 +00:00
github manually merged commit 2719f326c0 into gh-pr/343/base 2026-11-26 20:29:02 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.