Loading...
Searching...
No Matches
score::gfx::ScopedGpuTimer Class Reference

RAII helper that brackets a named pass region for GPU frame-debug. More...

Detailed Description

RAII helper that brackets a named pass region for GPU frame-debug.

Emits debugMarkBegin / debugMarkEnd around the enclosed code so RenderDoc, Nsight, and Metal Frame Debugger show pass boundaries in captures. Does NOT record timing data — QRhiCommandBuffer::lastCompletedGpuTime() returns a CB-wide delta with no per-pass resolution, so attributing it to individual passes would print the same full-frame cost against every named region.

The whole-CB frame time is recorded once per frame in RenderList::renderInternal under the "frame" bucket. Per-pass sub-range timestamps require explicit QRhi timestamp queries, which are not yet exposed by the RHI abstraction layer.

Public Member Functions

 ScopedGpuTimer (QRhiCommandBuffer &cb, GpuTimings &timings, std::string_view name)
 
 ScopedGpuTimer (const ScopedGpuTimer &)=delete
 
ScopedGpuTimeroperator= (const ScopedGpuTimer &)=delete
 

The documentation for this class was generated from the following files: