public interface IGpuScopeSinkSomething that turns a named region of a command list into a timed scope.
Remarks
The seam that lets the render graph time its passes without knowing what a profiler is. A graph holds one of these or holds nothing; when it holds nothing the emission is a null check per pass and no GPU work at all, which is the only way a per-pass timestamp pair can be the default-off feature it has to be.
⚠ Off by default is not caution, it is correctness on a tiler. MoltenVK is the development target here, and on tile-based hardware a query write can force the tile to be resolved — so an always-on timestamp pair around every pass changes the very timings it reports. A frame profiled and a frame shipped have to be the same frame, and that is only true when the instrument can be taken out.
An interface rather than the concrete GpuProfiler because a timestamp pool is one way to answer this and not the only one: a Tracy or PIX sink emits markers a host tool timestamps for it, and would implement this without a QueryPoolHandle anywhere in sight.
Methods (2)
int? Begin(ICommandList commands, string name)Opens a named region.
void Close(ICommandList commands, int? token)Closes a region.
Used by (3)
- GpuProfilerVixen.Graphics
- RecordingSinkVixen.Graphics.RenderGraph.Tests
- RenderGraphVixen.Graphics.RenderGraph