GraphicsTimerSlot

Package: Libraries.Game.Graphics.Timing · Inherits from: Libraries.Language.Object

A GraphicsTimerSlot is a GraphicsTimer's record of one frame in flight: its pool of timestamps and, for each stamp written, the phase it belongs to and whether it starts or ends it. The timer has one slot per frame the GPU may be working on, so reading a frame's times never waits for another. Programs don't use it directly.

Example Code

use Libraries.Game.Graphics.Timing.GraphicsTimerSlot

GraphicsTimerSlot slot
output slot:GetStampCount()

Actions

AddStamp(text name, boolean isStart)

This action notes the next stamp: the phase it belongs to and whether it starts it. It returns the query the stamp is written to, or -1 if the pool is full.

Parameters

  • name text: The phase's name ("" for the frame's start and end)
  • isStart boolean: True if it starts the phase

Returns

integer: The query, from 0, or -1

GetFrameNumber()

Returns

integer

GetPool()

Returns

Libraries.Game.Graphics.Vulkan.VulkanQueryPool

GetRoomLeft()

This action returns how many stamps are left in the pool.

Returns

integer: The count

GetStampCount()

This action returns how many stamps are left in the pool.

Returns

integer: The count

GetStampName(integer index)

This action notes the next stamp: the phase it belongs to and whether it starts it. It returns the query the stamp is written to, or -1 if the pool is full.

Parameters

  • index integer

Returns

text: The query, from 0, or -1

IsStampStart(integer index)

This action starts a new frame in the slot, forgetting the last one's stamps.

Parameters

  • index integer

Returns

boolean

IsWaiting()

Returns

boolean

SetPool(Libraries.Game.Graphics.Vulkan.VulkanQueryPool value)

Parameters

SetWaiting(boolean value)

Parameters

  • value boolean

Start(integer frame)

This action starts a new frame in the slot, forgetting the last one's stamps.

Parameters

  • frame integer: The frame's number

Inherited Actions

3 actions from Libraries.Language.Object