GraphicsAPI reference
Struct GraphicsCounters
Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device
Deterministic counts of the work a device received (Counters): the same calls give the same counts on every backend and every run, so tests can assert draw calls, passes and uploads exactly as a performance budget. Every count is cumulative since the device was created; subtract two readings to measure a span.
public readonly struct GraphicsCounters : IEquatable<GraphicsCounters>Implements
Constructors
GraphicsCounters(long, long, long, long, long, long, long, long, long, long, int)
Deterministic counts of the work a device received (Counters): the same calls give the same counts on every backend and every run, so tests can assert draw calls, passes and uploads exactly as a performance budget. Every count is cumulative since the device was created; subtract two readings to measure a span.
public GraphicsCounters(long Submissions = 0, long Passes = 0, long DrawCalls = 0, long PipelineChanges = 0, long TextureBindings = 0, long BufferUpdates = 0, long TextureUpdates = 0, long BytesUploaded = 0, long Presents = 0, long ResourcesCreated = 0, int LiveResources = 0)Parameters
Submissions long
Command lists submitted.
Passes long
Render passes in the submitted lists.
DrawCalls long
Draw and DrawIndexed commands in the submitted lists.
PipelineChanges long
SetPipeline commands in the submitted lists.
TextureBindings long
SetTexture commands in the submitted lists.
BufferUpdates long
UpdateBuffer commands in the submitted lists.
TextureUpdates long
UpdateTexture commands in the submitted lists.
BytesUploaded long
Bytes carried by the buffer and texture updates.
Presents long
Frames presented (a Present with an acquired surface target).
ResourcesCreated long
Resources the device created (device-owned ones included).
LiveResources int
Resources alive now (created and not disposed or expired).
Properties
BufferUpdates
UpdateBuffer commands in the submitted lists.
public long BufferUpdates { get; init; }Property Value
BytesUploaded
Bytes carried by the buffer and texture updates.
public long BytesUploaded { get; init; }Property Value
DrawCalls
Draw and DrawIndexed commands in the submitted lists.
public long DrawCalls { get; init; }Property Value
LiveResources
Resources alive now (created and not disposed or expired).
public int LiveResources { get; init; }Property Value
Passes
Render passes in the submitted lists.
public long Passes { get; init; }Property Value
PipelineChanges
SetPipeline commands in the submitted lists.
public long PipelineChanges { get; init; }Property Value
Presents
Frames presented (a Present with an acquired surface target).
public long Presents { get; init; }Property Value
ResourcesCreated
Resources the device created (device-owned ones included).
public long ResourcesCreated { get; init; }Property Value
Submissions
Command lists submitted.
public long Submissions { get; init; }Property Value
TextureBindings
SetTexture commands in the submitted lists.
public long TextureBindings { get; init; }Property Value
TextureUpdates
UpdateTexture commands in the submitted lists.
public long TextureUpdates { get; init; }Property Value
Methods
Deconstruct(out long, out long, out long, out long, out long, out long, out long, out long, out long, out long, out int)
public void Deconstruct(out long Submissions, out long Passes, out long DrawCalls, out long PipelineChanges, out long TextureBindings, out long BufferUpdates, out long TextureUpdates, out long BytesUploaded, out long Presents, out long ResourcesCreated, out int LiveResources)Parameters
Submissions long
Passes long
DrawCalls long
PipelineChanges long
TextureBindings long
BufferUpdates long
TextureUpdates long
BytesUploaded long
Presents long
ResourcesCreated long
LiveResources int
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(GraphicsCounters)
public bool Equals(GraphicsCounters other)Parameters
other GraphicsCounters
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(GraphicsCounters, GraphicsCounters)
public static bool operator ==(GraphicsCounters left, GraphicsCounters right)Parameters
left GraphicsCounters
right GraphicsCounters
Returns
operator !=(GraphicsCounters, GraphicsCounters)
public static bool operator !=(GraphicsCounters left, GraphicsCounters right)Parameters
left GraphicsCounters
right GraphicsCounters
Returns
operator -(GraphicsCounters, GraphicsCounters)
The counts accumulated between two readings (LiveResources is the later reading’s).
public static GraphicsCounters operator -(GraphicsCounters later, GraphicsCounters earlier)Parameters
later GraphicsCounters
earlier GraphicsCounters