resolveCounters(_:range:destinationBuffer:destinationOffset:)
Encodes a command that resolves the data from the samples in a sample counter buffer and stores the results into a buffer.
Declaration
func resolveCounters(_ sampleBuffer: any MTLCounterSampleBuffer, range: Range<Int>, destinationBuffer: any MTLBuffer, destinationOffset: Int)Parameters
- sampleBuffer:
A counter sample buffer source that contains the sample data.
- range:
A range that indicates which of the buffer’s samples the command resolves.
- destinationBuffer:
A destination buffer where the command stores the data it resolves.
- destinationOffset:
A starting offset, in bytes, within
destinationBufferwhere the blit pass writes the first byte of the data it resolves.
Mentioned in
Discussion
For an example of how and when to use this method, see Converting a GPU’s counter data into a readable format.