size(ofCounterHeapEntry:)
Returns the size, in bytes, of each entry in a counter heap of a specific counter heap type when your app resolves it into a usable format.
Declaration
func size(ofCounterHeapEntry type: MTL4CounterHeapType) -> IntParameters
- type:
Mtl4counterheaptype value that represents the type of the Mtl4counterheap to resolve.
Return Value
The size of the post-transformation entry from a MTL4CounterHeap of type MTL4CounterHeapType.
Discussion
In order to use the data available in a MTL4CounterHeap, your app first resolves it either in the CPU timeline or in the GPU timeline. When your app calls resolveCounterHeap:withRange:intoBuffer:waitFence:updateFence: to resolve counter data in the GPU timeline, Metal writes the data into a MTLBuffer.
During this process, Metal transform the data in the heap into a format consisting of entries of the size that this method advertises, based on the MTL4CounterHeapType.