In-game tools · function
createGpuPassTimings
A PassTimings labelled with the engine's own GPU brackets.
Explained in In-game tools.
function createGpuPassTimings(): PassTimingsimport { createGpuPassTimings } from '@driftengine/tools';In depth
The engine fills no timings for anybody. PassTimings is a container and
RendererApi.gpuTimer is a source, and joining the two is the same twenty lines wherever it is
written — the slots are GPU_SLOTS and never the game's, because a second backend measuring the
same frame owes the same three numbers. So it is written here once rather than in every consumer
that wants a frame readout, which is the argument that put the overlay in this package.
Labelled and unsampled, so every row shows — until a frame resolves. That is the distinction
profilerRows exists to keep: a bracket nothing has measured yet is not a bracket that ran in no
time.