WriteTimestampCommand
Package: Libraries.Game.Graphics.Vulkan.Commands · Inherits from: Libraries.Game.Graphics.Vulkan.Commands.VulkanCommand, Libraries.Language.Object
The WriteTimestampCommand has the GPU write its clock into a query of a TIMESTAMP pool when it reaches a stage of the work recorded before it (vkCmdWriteTimestamp). BOTTOM_OF_PIPE, the default, marks that all earlier work has finished; TOP_OF_PIPE marks when the GPU started on what follows. On Apple GPUs, stamps are taken only at render pass boundaries.
Example Code
use Libraries.Game.Graphics.Vulkan.Commands.WriteTimestampCommand
WriteTimestampCommand stamp
stamp:SetIndex(3)
stamp:SetStage(stamp:BOTTOM_OF_PIPE)
Variables
integer BOTTOM_OF_PIPEinteger TOP_OF_PIPE: The stages (VkPipelineStageFlagBits).
Actions
GetIndex()
This action sets which query the time is written to.
Returns
integer
GetQueryPool()
Returns
GetStage()
This action sets the stage the time is taken at: TOP_OF_PIPE or BOTTOM_OF_PIPE, or another VkPipelineStageFlagBits value.
Returns
integer
Record(Libraries.Game.Graphics.Vulkan.VulkanCommandBuffer buffer)
Parameters
SetIndex(integer index)
This action sets which query the time is written to.
Parameters
indexinteger: The query, from 0
SetQueryPool(Libraries.Game.Graphics.Vulkan.VulkanQueryPool pool)
Parameters
SetStage(integer stage)
This action sets the stage the time is taken at: TOP_OF_PIPE or BOTTOM_OF_PIPE, or another VkPipelineStageFlagBits value.
Parameters
stageinteger: The stage