makeCounterSampleBuffer(descriptor:)
Creates a counter sample buffer.
Declaration
func makeCounterSampleBuffer(descriptor: MTLCounterSampleBufferDescriptor) throws -> any MTLCounterSampleBufferParameters
- descriptor:
An Mtlcountersamplebufferdescriptor instance.
Mentioned in
Return Value
A new MTLCounterSampleBuffer instance if the method completes successfully; otherwise Swift throws an error and Objective-C returns nil.
Discussion
The method may produce an error if the GPU driver has exhausted its underlying resources for counter sample buffers.