writeTimestamp(counterHeap:index:)
Writes a GPU timestamp into the given counter heap.
Declaration
func writeTimestamp(counterHeap: any MTL4CounterHeap, index: Int)Parameters
- counterHeap:
Mtl4counterheap to write the timestamp into.
- index:
The index within the Mtl4counterheap that Metal writes the timestamp to.
Discussion
This method captures a timestamp after work prior to this command in the command buffer is complete. Work after this call may or may not have started.
You are responsible for ensuring the counterHeap is of type MTL4CounterHeapType.timestamp.