csharp
public readonly record struct GpuScopeOne timed region of a frame on the GPU.
Remarks
⚠ exists because a zero duration is legitimate. WriteTimestamp records bottom-of-pipe, so a pair around one small draw on a deeply pipelined GPU genuinely reads as zero — which means "both readings were the same" and "neither reading was ever written" are the same two numbers. Asking the ticks cannot tell them apart, and the difference is the whole of whether a timeline is showing a fast pass or nothing at all.
Fields and properties (6)
public string NameWhat it is called — the render-graph pass's name, in practice.
public int LevelHow deeply nested it is, for drawing.
public ulong BeginTicksThe GPU clock at its start.
public ulong EndTicksThe GPU clock at its end.
public bool MeasuredWhether both readings came from the device.
public ulong DurationTicksHow many ticks it took, or zero when it was never measured.
Methods (1)
public GpuScope(string Name, int Level, ulong BeginTicks, ulong EndTicks, bool Measured = true)One timed region of a frame on the GPU.
Used by (7)
- ArenaThirdPersonShooter
- GpuFrameVixen.Graphics
- GpuOverlayVixen.Engine.Renderer
- GpuOverlayTestsVixen.Engine.Renderer.Tests
- GpuProfilerVixen.Graphics
- GpuProfilerTestsVixen.Graphics.Tests
- GpuTimelineViewVixen.Editor.Profiler