Contents

makeCounterSampleBuffer(descriptor:)

Creates a counter sample buffer.

Declaration

func makeCounterSampleBuffer(descriptor: MTLCounterSampleBufferDescriptor) throws -> any MTLCounterSampleBuffer

Parameters

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.

See Also

Sampling a GPU device’s counters