Vixen
dd8b0a81
csharp
public readonly record struct GpuScope

One timed region of a frame on the GPU.

Read the guide page for this →

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 Name

    What it is called — the render-graph pass's name, in practice.

  • public int Level

    How deeply nested it is, for drawing.

  • public ulong BeginTicks

    The GPU clock at its start.

  • public ulong EndTicks

    The GPU clock at its end.

  • public bool Measured

    Whether both readings came from the device.

  • public ulong DurationTicks

    How 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