Help wanted: per-pass GPU timings to rank what's slow #40

Closed
opened 2026-11-27 03:14:46 +00:00 by github-bot · 2 comments
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 16:23 UTC · original

on the GPU side we know a few things are expensive (wave64 mesh shaders in the superstep form, #35) but we don't have per-pass GPU timings yet, so we can't rank what to fix.

what would help:

  • timestamp queries around each game pass (we already name passes for the census and the breadcrumbs), summed per frame and logged with the sample line, e.g. "gpu: TL_PS 3.1 ms, meshlet_culling 2.4 ms, ..."
  • with that, the top offenders: heavy translated programs (size of the DXIL, register pressure), redundant barriers or splits we add, stand-in fills, depth-twin copies
  • comparing against PIX captures on a world frame is great too, if you have a setup for it

background: docs/dxil-backend.md, docs/shader-translation.md, docs/d3d12x-pipelines.md.

**@⁠ThatRecompDev** on GitHub · 2026-11-25 16:23 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/40) on the GPU side we know a few things are expensive (wave64 mesh shaders in the superstep form, #35) but we don't have per-pass GPU timings yet, so we can't rank what to fix. what would help: - timestamp queries around each game pass (we already name passes for the census and the breadcrumbs), summed per frame and logged with the sample line, e.g. "gpu: TL_PS 3.1 ms, meshlet_culling 2.4 ms, ..." - with that, the top offenders: heavy translated programs (size of the DXIL, register pressure), redundant barriers or splits we add, stand-in fills, depth-twin copies - comparing against PIX captures on a world frame is great too, if you have a setup for it background: `docs/dxil-backend.md`, `docs/shader-translation.md`, `docs/d3d12x-pipelines.md`.
github-bot 2026-11-27 03:14:46 +00:00
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:14:46 +00:00
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-25 16:52 UTC · original

started on this. there's now a --gpu-timings flag (on a branch, lands on main soon): it puts a timestamp query at the start of each pass (a run of work between render target changes, or where draws switch to dispatches), named after the pass's first shader, and reads them back a bit later so nothing waits on the GPU. the sample line then gets something like "gpu over N frames: queue #1 busy X ms/frame (meshlet_culling~... 2.4 ms, PS_... 1.1 ms, ...)", top 10 per queue.

we'll turn it on in the next world boot and post the ranking here. PIX comparisons still very welcome if anyone has a setup

**@⁠ThatRecompDev** on GitHub · 2026-11-25 16:52 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/40#issuecomment-7168662522) started on this. there's now a `--gpu-timings` flag (on a branch, lands on main soon): it puts a timestamp query at the start of each pass (a run of work between render target changes, or where draws switch to dispatches), named after the pass's first shader, and reads them back a bit later so nothing waits on the GPU. the sample line then gets something like "gpu over N frames: queue #1 busy X ms/frame (meshlet_culling~... 2.4 ms, PS_... 1.1 ms, ...)", top 10 per queue. we'll turn it on in the next world boot and post the ranking here. PIX comparisons still very welcome if anyone has a setup
Author
Owner

@⁠ThatRecompDev on GitHub · 2026-11-26 11:38 UTC · original

--gpu-timings does this now: timestamps around each pass, summed per frame per queue, plus queue overlap and idle time and the work shape of each dispatch, all in the sample line

it's been driving the perf work for a few days (DefragHeap stuck at its loop cap, the indirect clamp, the depth pre-pass), so closing this

**@⁠ThatRecompDev** on GitHub · 2026-11-26 11:38 UTC · [original](https://github.com/ThatRecompDev/five-star-recomp/issues/40#issuecomment-7190974997) `--gpu-timings` does this now: timestamps around each pass, summed per frame per queue, plus queue overlap and idle time and the work shape of each dispatch, all in the sample line it's been driving the perf work for a few days (DefragHeap stuck at its loop cap, the indirect clamp, the depth pre-pass), so closing this
This discussion has been locked. Commenting is limited to contributors.
No description provided.