Can you help me convert Cocoa interface MTLCaptureDescriptor to FPC 3.2.0 code?
I use Metal framework from Ryan Joseph. But it doesn't include MTLCaptureDescriptor from macOS Catalina.
I attach 2 files: MTLCaptureDescriptor.inc (from Ryan) and MTLCaptureDescriptor.h from Xcode headers.
This code I need to convert:
/// The destination where you want the GPU trace to be captured to.
typedef NS_ENUM(NSInteger, MTLCaptureDestination)
{
/// Capture to Developer Tools (Xcode) and stop the execution after capturing.
MTLCaptureDestinationDeveloperTools = 1,
/// Capture to a GPU Trace document and continue execution after capturing.
MTLCaptureDestinationGPUTraceDocument,
} API_AVAILABLE(macos(10.15), ios(13.0));
MTL_EXTERN API_AVAILABLE(macos(10.15), ios(13.0))
@interface MTLCaptureDescriptor: NSObject <NSCopying>
{
@private
id _captureObject;
MTLCaptureDestination _destination;
NSURL *_outputURL;
}
/**
@brief The object that is captured.
Must be one of the following:
MTLDevice captures all command queues of the device.
MTLCommandQueue captures a single command queue.
MTLCaptureScope captures between the next begin and end of the scope.
*/
@property (nonatomic, strong, nullable) id captureObject;
/// The destination you want the GPU trace to be captured to.
@property (nonatomic, assign) MTLCaptureDestination destination;
/// URL the GPU Trace document will be captured to.
/// Must be specified when destiation is MTLCaptureDestinationGPUTraceDocument.
@property (nonatomic, copy, nullable) NSURL *outputURL;
@end