Interface MTLCounterSampleBuffer


  • public interface MTLCounterSampleBuffer
    [@protocol] MTLCounterSampleBuffer The Counter Sample Buffer contains opaque counter samples as well as state needed to request a sample from the API.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      MTLDevice device()
      [@property] device The device that created the sample buffer.
      java.lang.String label()
      [@property] label The label for the sample buffer.
      NSData resolveCounterRange​(NSRange range)
      resolveCounterRange: Resolve the counters from the sample buffer to an NSData containing the counter values.
      long sampleCount()
      [@property] sampleCount The number of samples that may be stored in this sample buffer.
    • Method Detail

      • device

        MTLDevice device()
        [@property] device The device that created the sample buffer. It is only valid to use the sample buffer with this device.
      • label

        java.lang.String label()
        [@property] label The label for the sample buffer. This is set by the label property of the descriptor that is used to create the sample buffer.
      • resolveCounterRange

        NSData resolveCounterRange​(NSRange range)
        resolveCounterRange: Resolve the counters from the sample buffer to an NSData containing the counter values. This may only be used with sample buffers that have MTLStorageModeShared. Samples that encountered an error during resolve will be set to MTLCounterErrorValue.
        Parameters:
        range - The range of indices in the sample buffer to resolve.
        Returns:
        The resolved samples.
      • sampleCount

        long sampleCount()
        [@property] sampleCount The number of samples that may be stored in this sample buffer.