Skip to content

feat(core) Calculate GPU timings using luma.gl QuerySet API#10279

Draft
ibgreen-openai wants to merge 1 commit into
masterfrom
ib/gpu-timer
Draft

feat(core) Calculate GPU timings using luma.gl QuerySet API#10279
ibgreen-openai wants to merge 1 commit into
masterfrom
ib/gpu-timer

Conversation

@ibgreen-openai
Copy link
Copy Markdown
Collaborator

GPUTimer Flow

1. Screen Pass
opts.pass === 'screen'
➡️ 2. Start Timestamp
writeTimestamp(querySet, 0)
➡️ 3. Render
renderLayers(opts)
➡️ 4. End Timestamp
writeTimestamp(querySet, 1)
⬇️
Async Readback
readTimestampDuration(0, 1)
➡️ Deck Metrics
gpuTime + gpuTimePerFrame

Guardrails

Guardrail Behavior
Screen pass only Picking/offscreen passes are not timed
Timestamp support required No-op when the device lacks timestamp-query
writeTimestamp required No-op when the command encoder does not expose timestamp writes
One readback in flight Avoids reusing the query set before results are consumed
Best-effort telemetry Query failures are ignored instead of breaking render

Lifecycle

Event Cleanup
Deck.finalize() Destroys the GPU timer QuerySet and clears pending readback state

@ibgreen-openai ibgreen-openai changed the title feat(core) GPUTimer feat(core) Calculate GPU timings using luma.gl QuerySet API May 8, 2026
@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 83.759% (+0.01%) from 83.746% — ib/gpu-timer into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants