peachsim 0.1.1684 → 0.1.1692
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/coverage-swift.ts +72 -5
- package/cli/commands/inspect/actions.ts +1 -0
- package/cli/commands/screenshot.ts +12 -0
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +2252 -1462
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1762 -995
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +2184 -1417
- package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +175 -69
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +174 -68
- package/dist-lib/native-app-identity-project.cjs +163 -51
- package/dist-lib/native-app-identity-project.mjs +206 -82
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +26 -23
- package/dist-lib/public-origins-lib.json +74 -61
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +2 -2
- package/dist-lib/skills.cjs +2633 -1840
- package/dist-lib/swift-compile.cjs +2478 -100
- package/dist-lib/swift-compile.mjs +2475 -100
- package/dist-lib/swift-package.cjs +108 -50
- package/dist-lib/swift-package.mjs +104 -50
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +3979 -985
- package/dist-lib/vite.cjs +12 -18
- package/dist-lib/worklet-executable.cjs +7 -4
- package/dist-lib/worklet-executable.mjs +7 -4
- package/dist-types/packages/peach-engine/src/engine/clipboardContract.d.ts +15 -1
- package/dist-types/packages/peach-globals/src/clipboardBridgeContract.d.ts +6 -0
- package/dist-types/packages/peach-globals/src/index.d.ts +1 -1
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +3 -2
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/package.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLAvailability.h +22 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBackgroundActivitySession.h +145 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityCondition.h +113 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconIdentityConstraint.h +34 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBeaconRegion.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLBody.h +26 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularGeographicCondition.h +59 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCircularRegion.h +64 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLCondition.h +48 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLError.h +52 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLErrorDomain.h +24 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLGeocoder.h +55 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLHeading.h +117 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocation.h +9 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager+CLVisitExtensions.h +45 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +877 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManagerDelegate.h +225 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceError.h +33 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationPushServiceExtension.h +28 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationUpdater.h +250 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitor.h +140 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitorConfiguration.h +77 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringEvent.h +184 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLMonitoringRecord.h +57 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +123 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLServiceSession.h +211 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLVisit.h +66 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CoreLocation.h +46 -0
- package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Modules/module.modulemap +7 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +96 -2
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceBase.h +52 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceObjC.h +240 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceRef.h +474 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Headers/IOSurfaceTypes.h +66 -0
- package/sdk/ios/System/Library/Frameworks/IOSurface.framework/Modules/module.modulemap +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4AccelerationStructure.h +9 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Archive.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ArgumentTable.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunction.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BinaryFunctionDescriptor.h +14 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4BufferRange.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandAllocator.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandBuffer.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandEncoder.h +16 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommandQueue.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CommitFeedback.h +15 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Compiler.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4CompilerTask.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputeCommandEncoder.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4ComputePipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4Counters.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4FunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LibraryFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4LinkingDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MachineLearningPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4MeshRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineDataSetSerializer.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4PipelineState.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderCommandEncoder.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPass.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4RenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4SpecializedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4StitchedFunctionDescriptor.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTL4TileRenderPipeline.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructure.h +1212 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureCommandEncoder.h +322 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAccelerationStructureTypes.h +224 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLAllocation.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgument.h +279 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLArgumentEncoder.h +199 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBinaryArchive.h +142 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitCommandEncoder.h +266 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBlitPass.h +82 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLBuffer.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureManager.h +113 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCaptureScope.h +43 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandBuffer.h +449 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandEncoder.h +148 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCommandQueue.h +102 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputeCommandEncoder.h +350 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePass.h +90 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLComputePipeline.h +274 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLCounters.h +225 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDataType.h +232 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDefines.h +39 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDepthStencil.h +93 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDevice.h +1122 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDeviceCertification.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDrawable.h +36 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLDynamicLibrary.h +81 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLEvent.h +79 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFence.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionConstantValues.h +30 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionDescriptor.h +95 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionHandle.h +29 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionLog.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLFunctionStitching.h +131 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLGPUAddress.h +19 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLHeap.h +284 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandBuffer.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCommandQueue.h +11 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIOCompressor.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandBuffer.h +157 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIndirectCommandEncoder.h +110 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLIntersectionFunctionTable.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLibrary.h +549 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLinkedFunctions.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLLogState.h +65 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLParallelRenderCommandEncoder.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPipeline.h +57 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLPixelFormat.h +342 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRasterizationRate.h +323 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderCommandEncoder.h +1068 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPass.h +411 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLRenderPipeline.h +788 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResidencySet.h +141 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResource.h +307 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStateCommandEncoder.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceStatePass.h +85 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLResourceViewPool.h +22 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLSampler.h +252 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLStageInputOutputDescriptor.h +158 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTensor.h +17 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTexture.h +460 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTextureViewPool.h +18 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLTypes.h +125 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVertexDescriptor.h +153 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/MTLVisibleFunctionTable.h +45 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Headers/Metal.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Metal.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTDefines.h +35 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTTagClass.h +33 -0
- package/sdk/ios/System/Library/Frameworks/UniformTypeIdentifiers.framework/Headers/UTType.h +504 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLEssentialsAvailability.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +444 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Headers/LocationEssentials.h +14 -0
- package/sdk/ios/System/Library/Frameworks/_LocationEssentials.framework/Modules/module.modulemap +14 -0
- package/sdk/ios/usr/include/complex.h +167 -0
- package/sdk/ios/usr/include/dispatch/dispatch.h +5 -0
- package/sdk/ios/usr/include/mach/mach_types.h +1 -0
- package/sdk/ios/usr/include/math.h +835 -2
- package/sdk/ios/usr/include/sys/cdefs.h +0 -1
- package/src/generated/swift-c-predefines.json +1988 -0
- package/src/nitro-bundle.ts +1 -0
- package/src/nitro-compile.ts +4 -0
- package/src/nitroContract.ts +18 -2
- package/src/swift-compile.ts +446 -49
- package/src/swift-coverage/package.ts +3 -1
- package/src/swift-coverage/xcode-assets.ts +62 -2
- package/src/swift-coverage/xcode-packages.ts +11 -6
- package/src/swift-host.ts +333 -57
- package/src/swift-objc-compile.ts +20 -5
- package/src/swift-objc-standin.ts +21 -11
- package/src/swift-package-manifest.ts +151 -28
- package/src/swift-package.ts +134 -58
- package/src/swift-packages.ts +141 -44
- package/src/swift-source-file.ts +10 -15
- package/src/swift-standins.ts +87 -13
- package/src/swift-submit.ts +5 -0
- package/src/swiftContract.ts +160 -75
- package/src/target-matcher.ts +15 -2
- package/src/worklet-executable.ts +7 -3
- package/src/xcode-json-project.ts +14 -2
- package/src/xcode-project.ts +154 -59
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MTLComputePipeline.h
|
|
3
|
+
// Metal
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2014 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#import <Metal/MTLDefines.h>
|
|
9
|
+
#import <Metal/MTLDevice.h>
|
|
10
|
+
#import <Metal/MTLArgument.h>
|
|
11
|
+
#import <Metal/MTLStageInputOutputDescriptor.h>
|
|
12
|
+
#import <Metal/MTLPipeline.h>
|
|
13
|
+
#import <Metal/MTLAllocation.h>
|
|
14
|
+
|
|
15
|
+
#import <Metal/MTLLinkedFunctions.h>
|
|
16
|
+
@protocol MTLFunctionHandle;
|
|
17
|
+
|
|
18
|
+
@protocol MTLDynamicLibrary;
|
|
19
|
+
|
|
20
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
21
|
+
|
|
22
|
+
MTL_EXPORT API_AVAILABLE(macos(10.11), ios(8.0)) NS_SWIFT_SENDABLE
|
|
23
|
+
@interface MTLComputePipelineReflection : NSObject
|
|
24
|
+
|
|
25
|
+
@property (nonnull, readonly) NSArray<id<MTLBinding>> *bindings API_AVAILABLE(macos(13.0), ios(16.0));
|
|
26
|
+
@property (readonly) NSArray <MTLArgument *> *arguments API_DEPRECATED_WITH_REPLACEMENT("bindings", macos(10.11, 13.0), ios(8.0, 16.0));
|
|
27
|
+
|
|
28
|
+
@end
|
|
29
|
+
|
|
30
|
+
MTL_EXPORT API_AVAILABLE(macos(10.11), ios(9.0))
|
|
31
|
+
@interface MTLComputePipelineDescriptor : NSObject <NSCopying>
|
|
32
|
+
|
|
33
|
+
/*!
|
|
34
|
+
@property label
|
|
35
|
+
@abstract A string to help identify this object.
|
|
36
|
+
*/
|
|
37
|
+
@property (nullable, copy, nonatomic) NSString *label;
|
|
38
|
+
|
|
39
|
+
/*!
|
|
40
|
+
@property computeFunction
|
|
41
|
+
@abstract The function to use with the MTLComputePipelineState
|
|
42
|
+
*/
|
|
43
|
+
@property (nullable, readwrite, nonatomic, strong) id <MTLFunction> computeFunction;
|
|
44
|
+
|
|
45
|
+
/*!
|
|
46
|
+
@property threadGroupSizeIsMultipleOfThreadExecutionWidth
|
|
47
|
+
@abstract An optimization flag, set if the thread group size will always be a multiple of thread execution width
|
|
48
|
+
*/
|
|
49
|
+
@property (readwrite, nonatomic) BOOL threadGroupSizeIsMultipleOfThreadExecutionWidth;
|
|
50
|
+
|
|
51
|
+
/*!
|
|
52
|
+
@property maxTotalThreadsPerThreadgroup
|
|
53
|
+
@abstract Optional property. Set the maxTotalThreadsPerThreadgroup. If it is not set, returns zero.
|
|
54
|
+
*/
|
|
55
|
+
@property (readwrite, nonatomic) NSUInteger maxTotalThreadsPerThreadgroup API_AVAILABLE(macos(10.14), ios(12.0));
|
|
56
|
+
|
|
57
|
+
/*!
|
|
58
|
+
@property computeDataDescriptor
|
|
59
|
+
@abstract An MTLStageInputOutputDescriptor to fetch data from buffers
|
|
60
|
+
*/
|
|
61
|
+
@property (nullable, copy, nonatomic) MTLStageInputOutputDescriptor *stageInputDescriptor API_AVAILABLE(macos(10.12), ios(10.0));
|
|
62
|
+
|
|
63
|
+
/*!
|
|
64
|
+
@property buffers
|
|
65
|
+
@abstract Optional properties for each buffer binding used by the compute function.
|
|
66
|
+
*/
|
|
67
|
+
@property (readonly) MTLPipelineBufferDescriptorArray *buffers API_AVAILABLE(macos(10.13), ios(11.0));
|
|
68
|
+
|
|
69
|
+
/*!
|
|
70
|
+
@property supportIndirectCommandBuffers
|
|
71
|
+
@abstract This flag makes this pipeline usable with indirect command buffers.
|
|
72
|
+
*/
|
|
73
|
+
@property (readwrite, nonatomic) BOOL supportIndirectCommandBuffers API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0));
|
|
74
|
+
|
|
75
|
+
/*!
|
|
76
|
+
@property insertLibraries
|
|
77
|
+
@abstract The set of MTLDynamicLibrary to use to resolve external symbols before considering symbols from dependent MTLDynamicLibrary.
|
|
78
|
+
@discussion Typical workflows use the libraries property of MTLCompileOptions to record dependent libraries at compile time without having to use insertLibraries.
|
|
79
|
+
This property can be used to override symbols from dependent libraries for experimentation or evaluating alternative implementations.
|
|
80
|
+
It can also be used to provide dynamic libraries that are dynamically created (for example, from source) that have no stable installName that can be used to automatically load from the file system.
|
|
81
|
+
@see MTLDynamicLibrary
|
|
82
|
+
*/
|
|
83
|
+
@property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLDynamicLibrary>>* insertLibraries API_DEPRECATED_WITH_REPLACEMENT("preloadedLibraries", macos(11.0, 12.0), ios(14.0, 15.0));
|
|
84
|
+
|
|
85
|
+
/*!
|
|
86
|
+
@property preloadedLibraries
|
|
87
|
+
@abstract The set of MTLDynamicLibrary to use to resolve external symbols before considering symbols from dependent MTLDynamicLibrary.
|
|
88
|
+
@discussion Typical workflows use the libraries property of MTLCompileOptions to record dependent libraries at compile time without having to use preloadedLibraries.
|
|
89
|
+
This property can be used to override symbols from dependent libraries for experimentation or evaluating alternative implementations.
|
|
90
|
+
It can also be used to provide dynamic libraries that are dynamically created (for example, from source) that have no stable installName that can be used to automatically load from the file system.
|
|
91
|
+
@see MTLDynamicLibrary
|
|
92
|
+
*/
|
|
93
|
+
@property (readwrite, nonnull, nonatomic, copy) NSArray<id<MTLDynamicLibrary>>* preloadedLibraries API_AVAILABLE(macos(12.0), ios(15.0));
|
|
94
|
+
|
|
95
|
+
/*!
|
|
96
|
+
@property binaryArchives
|
|
97
|
+
@abstract The set of MTLBinaryArchive to search for compiled code when creating the pipeline state.
|
|
98
|
+
@discussion Accelerate pipeline state creation by providing archives of compiled code such that no compilation needs to happen on the fast path.
|
|
99
|
+
@see MTLBinaryArchive
|
|
100
|
+
*/
|
|
101
|
+
@property (readwrite, nullable, nonatomic, copy) NSArray<id<MTLBinaryArchive>> *binaryArchives API_AVAILABLE(macos(11.0), ios(14.0));
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
/*!
|
|
106
|
+
@method reset
|
|
107
|
+
@abstract Restore all compute pipeline descriptor properties to their default values.
|
|
108
|
+
*/
|
|
109
|
+
- (void)reset;
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
/*!
|
|
113
|
+
@property linkedFunctions
|
|
114
|
+
@abstract The set of functions to be linked with the pipeline state and accessed from the compute function.
|
|
115
|
+
@see MTLLinkedFunctions
|
|
116
|
+
*/
|
|
117
|
+
@property (nullable, copy, nonatomic) MTLLinkedFunctions *linkedFunctions
|
|
118
|
+
API_AVAILABLE(macos(11.0), ios(14.0));
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
/*!
|
|
123
|
+
@property supportAddingBinaryFunctions
|
|
124
|
+
@abstract This flag makes this pipeline support creating a new pipeline by adding binary functions.
|
|
125
|
+
*/
|
|
126
|
+
@property (readwrite, nonatomic) BOOL supportAddingBinaryFunctions
|
|
127
|
+
API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
/*!
|
|
131
|
+
@property maxCallStackDepth
|
|
132
|
+
@abstract The maximum depth of the call stack in stack frames from the kernel. Defaults to 1 additional stack frame.
|
|
133
|
+
*/
|
|
134
|
+
@property (readwrite, nonatomic) NSUInteger maxCallStackDepth
|
|
135
|
+
API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
/*!
|
|
140
|
+
@property shaderValidation
|
|
141
|
+
@abstract Toggle that determines whether Metal Shader Validation should be enabled or disabled for the pipeline.
|
|
142
|
+
@discussion The value can be overridden using `MTL_SHADER_VALIDATION_ENABLE_PIPELINES` or `MTL_SHADER_VALIDATION_DISABLE_PIPELINES` Environment Variables.
|
|
143
|
+
*/
|
|
144
|
+
@property (readwrite, nonatomic) MTLShaderValidation shaderValidation API_AVAILABLE(macos(15.0), ios(18.0));
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
@property(readwrite, nonatomic) MTLForwardProgressUsage forwardProgressUsage API_AVAILABLE(macos(27.0), ios(27.0));
|
|
148
|
+
@property(readwrite, nonatomic) MTLContentionRelief contentionRelief API_AVAILABLE(macos(27.0), ios(27.0));
|
|
149
|
+
@property(readwrite, nonatomic) BOOL optimizeForPersistentKernel API_AVAILABLE(macos(27.0), ios(27.0));
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
@end
|
|
153
|
+
|
|
154
|
+
/*!
|
|
155
|
+
@protocol MTLComputePipelineState
|
|
156
|
+
@abstract A handle to compiled code for a compute function.
|
|
157
|
+
@discussion MTLComputePipelineState is a single compute function. It can only be used with the device that it was created against.
|
|
158
|
+
*/
|
|
159
|
+
API_AVAILABLE(macos(10.11), ios(8.0)) NS_SWIFT_SENDABLE
|
|
160
|
+
@protocol MTLComputePipelineState <MTLAllocation, NSObject>
|
|
161
|
+
|
|
162
|
+
@property (nullable, readonly) NSString *label API_AVAILABLE(macos(10.13), ios(11.0));
|
|
163
|
+
|
|
164
|
+
/// The compute pipeline's reflection information, if available.
|
|
165
|
+
///
|
|
166
|
+
/// The property is `nil` by default to help reduce your app's memory footprint,
|
|
167
|
+
/// but you can create reflection information when your app needs it.
|
|
168
|
+
///
|
|
169
|
+
/// Create reflection information by building a pipeline from an
|
|
170
|
+
/// ``MTL4Compiler`` instance with the following steps:
|
|
171
|
+
///
|
|
172
|
+
/// 1. Configure the ``MTL4PipelineOptions/shaderReflection`` property of an ``MTL4PipelineOptions`` instance.
|
|
173
|
+
/// 2. Assign that instance to the ``MTL4PipelineDescriptor/options`` property of an ``MTL4PipelineDescriptor`` instance.
|
|
174
|
+
/// 3. Create a compute pipeline state by passing that pipeline descriptor to one of the ``MTL4Compiler`` instance's methods.
|
|
175
|
+
///
|
|
176
|
+
/// The property is `nil` when you create a pipeline state from an``MTLDevice`` instance,
|
|
177
|
+
/// such as with its ``MTLDevice/newComputePipelineStateWithDescriptor:options:completionHandler:`` method.
|
|
178
|
+
@property (nullable, readonly) MTLComputePipelineReflection* reflection API_AVAILABLE(macos(26.0), ios(26.0));
|
|
179
|
+
|
|
180
|
+
/// Gets the function handle for a function this pipeline links at the Metal IR level by name.
|
|
181
|
+
///
|
|
182
|
+
/// - Parameters:
|
|
183
|
+
/// - name: A string representing the name of the function.
|
|
184
|
+
///
|
|
185
|
+
/// - Returns: A function handle corresponding to the function if the name matches a function in this pipeline state,
|
|
186
|
+
/// otherwise `nil`.
|
|
187
|
+
- (nullable id<MTLFunctionHandle>)functionHandleWithName:(NSString*)name API_AVAILABLE(macos(26.0), ios(26.0));
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
/*!
|
|
191
|
+
@property device
|
|
192
|
+
@abstract The device this resource was created against. This resource can only be used with this device.
|
|
193
|
+
*/
|
|
194
|
+
@property (readonly) id <MTLDevice> device;
|
|
195
|
+
|
|
196
|
+
/*!
|
|
197
|
+
@property maxTotalThreadsPerThreadgroup
|
|
198
|
+
@abstract The maximum total number of threads that can be in a single compute threadgroup.
|
|
199
|
+
*/
|
|
200
|
+
@property (readonly) NSUInteger maxTotalThreadsPerThreadgroup;
|
|
201
|
+
|
|
202
|
+
/*!
|
|
203
|
+
@property threadExecutionWidth
|
|
204
|
+
@abstract For most efficient execution, the threadgroup size should be a multiple of this when executing the kernel.
|
|
205
|
+
*/
|
|
206
|
+
@property (readonly) NSUInteger threadExecutionWidth;
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
/*!
|
|
210
|
+
@property staticThreadgroupMemoryLength
|
|
211
|
+
@abstract The length in bytes of threadgroup memory that is statically allocated.
|
|
212
|
+
*/
|
|
213
|
+
@property (readonly) NSUInteger staticThreadgroupMemoryLength API_AVAILABLE(macos(10.13), ios(11.0));
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
/*!
|
|
217
|
+
@method imageblockMemoryLengthForDimensions:
|
|
218
|
+
@brief Returns imageblock memory length for given image block dimensions.
|
|
219
|
+
*/
|
|
220
|
+
- (NSUInteger)imageblockMemoryLengthForDimensions:(MTLSize)imageblockDimensions API_AVAILABLE(ios(11.0), macos(11.0), macCatalyst(14.0), tvos(14.5));
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
/*!
|
|
224
|
+
@property supportIndirectCommandBuffers
|
|
225
|
+
@abstract Tells whether this pipeline state is usable through an Indirect Command Buffer.
|
|
226
|
+
*/
|
|
227
|
+
@property (readonly) BOOL supportIndirectCommandBuffers API_AVAILABLE(macos(11.0), macCatalyst(14.0), ios(13.0));
|
|
228
|
+
|
|
229
|
+
/*!
|
|
230
|
+
@property gpuResourceID
|
|
231
|
+
@abstract Handle of the GPU resource suitable for storing in an Argument Buffer
|
|
232
|
+
*/
|
|
233
|
+
@property (readonly) MTLResourceID gpuResourceID API_AVAILABLE(macos(13.0), ios(16.0));
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
/*!
|
|
237
|
+
@method functionHandleWithFunction:
|
|
238
|
+
@brief Get the function handle for the specified function from the pipeline state.
|
|
239
|
+
*/
|
|
240
|
+
- (nullable id<MTLFunctionHandle>)functionHandleWithFunction:(id<MTLFunction>)function API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
/*!
|
|
244
|
+
@method newRenderPipelineStateWithAdditionalBinaryFunctions:stage:
|
|
245
|
+
@brief Allocate a new compute pipeline state by adding binary functions to this pipeline state.
|
|
246
|
+
*/
|
|
247
|
+
- (nullable id <MTLComputePipelineState>)newComputePipelineStateWithAdditionalBinaryFunctions:(nonnull NSArray<id<MTLFunction>> *)functions error:(__autoreleasing NSError **)error API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
|
|
248
|
+
|
|
249
|
+
/*!
|
|
250
|
+
@method newVisibleFunctionTableWithDescriptor:
|
|
251
|
+
@brief Allocate a visible function table for the pipeline with the provided descriptor.
|
|
252
|
+
*/
|
|
253
|
+
- (nullable id<MTLVisibleFunctionTable>)newVisibleFunctionTableWithDescriptor:(MTLVisibleFunctionTableDescriptor * __nonnull)descriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
|
|
254
|
+
|
|
255
|
+
/*!
|
|
256
|
+
@method newIntersectionFunctionTableWithDescriptor:
|
|
257
|
+
@brief Allocate an intersection function table for the pipeline with the provided descriptor.
|
|
258
|
+
*/
|
|
259
|
+
- (nullable id <MTLIntersectionFunctionTable>)newIntersectionFunctionTableWithDescriptor:(MTLIntersectionFunctionTableDescriptor * _Nonnull)descriptor API_AVAILABLE(macos(11.0), ios(14.0), tvos(16.0));
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
/*!
|
|
263
|
+
@property shaderValidation
|
|
264
|
+
@abstract Current state of Shader Validation for the pipeline.
|
|
265
|
+
*/
|
|
266
|
+
@property (readonly, nonatomic) MTLShaderValidation shaderValidation API_AVAILABLE(macos(15.0), ios(18.0));
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
- (NSUInteger)recommendedPersistentThreadgroupsPerGridForThreadsPerThreadgroup:(MTLSize)threadsPerThreadgroup API_AVAILABLE(macos(27.0), ios(27.0));
|
|
270
|
+
@property(readonly) MTLForwardProgressUsage forwardProgressUsage API_AVAILABLE(macos(27.0), ios(27.0));
|
|
271
|
+
|
|
272
|
+
@end
|
|
273
|
+
|
|
274
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
//
|
|
2
|
+
// MTLCounters.h
|
|
3
|
+
// Metal
|
|
4
|
+
//
|
|
5
|
+
// Copyright (c) 2019 Apple Inc. All rights reserved.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
#ifndef MTLCounters_h
|
|
9
|
+
#define MTLCounters_h
|
|
10
|
+
|
|
11
|
+
#import <Foundation/Foundation.h>
|
|
12
|
+
#import <Metal/MTLDefines.h>
|
|
13
|
+
#import <Metal/MTLResource.h>
|
|
14
|
+
|
|
15
|
+
@protocol MTLDevice;
|
|
16
|
+
|
|
17
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
18
|
+
|
|
19
|
+
#define MTLCounterErrorValue ((uint64_t)~0ULL)
|
|
20
|
+
#define MTLCounterDontSample ((NSUInteger)-1)
|
|
21
|
+
|
|
22
|
+
/*!
|
|
23
|
+
@enum MTLCommonCounter
|
|
24
|
+
@abstract Common counters that, when present, are expected to have similar meanings across
|
|
25
|
+
different implementations.
|
|
26
|
+
@constant MTLCommonCounterTimestamp The GPU time when the sample is taken.
|
|
27
|
+
@constant MTLCommonCounterTessellationInputPatches The number of patches input to the tessellator.
|
|
28
|
+
@constant MTLCommonCounterVertexInvocations The number of times the vertex shader was invoked.
|
|
29
|
+
@constant MTLCommonCounterPostTessellationVertexInvocations The number of times the post tessellation vertex shader was invoked.
|
|
30
|
+
@constant MTLCommonCounterClipperInvocations The number of primitives passed to the clipper.
|
|
31
|
+
@constant MTLCommonCounterClipperPrimitivesOut The number of primitives output from the clipper.
|
|
32
|
+
@constant MTLCommonCounterFragmentInvocations The number of times the fragment shader was invoked.
|
|
33
|
+
@constant MTLCommonCounterFragmentsPassed The number of fragments that passed Depth, Stencil, and Scissor tests.
|
|
34
|
+
@constant MTLCommonCounterComputeKernelInvocations The number of times the computer kernel was invoked.
|
|
35
|
+
@constant MTLCommonCounterTotalCycles The total number of cycles.
|
|
36
|
+
@constant MTLCommonCounterVertexCycles The amount of cycles the vertex shader was running.
|
|
37
|
+
@constant MTLCommonCounterTessellationCycles The amount of cycles spent in the tessellator.
|
|
38
|
+
@constant MTLCommonCounterPostTessellationVertexCycles The amount of cycles the post tessellation vertex shader was running.
|
|
39
|
+
@constant MTLCommonCounterFragmentCycles The amount of cycles the fragment shader was running.
|
|
40
|
+
@constant MTLCommonCounterRenderTargetWriteCycles The amount of cycles spent writing to the render targets.
|
|
41
|
+
*/
|
|
42
|
+
typedef NSString * const MTLCommonCounter NS_TYPED_ENUM API_AVAILABLE(macos(10.15), ios(14.0));
|
|
43
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterTimestamp API_AVAILABLE(macos(10.15), ios(14.0));
|
|
44
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterTessellationInputPatches API_AVAILABLE(macos(10.15), ios(14.0));
|
|
45
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterVertexInvocations API_AVAILABLE(macos(10.15), ios(14.0));
|
|
46
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterPostTessellationVertexInvocations API_AVAILABLE(macos(10.15), ios(14.0));
|
|
47
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterClipperInvocations API_AVAILABLE(macos(10.15), ios(14.0));
|
|
48
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterClipperPrimitivesOut API_AVAILABLE(macos(10.15), ios(14.0));
|
|
49
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterFragmentInvocations API_AVAILABLE(macos(10.15), ios(14.0));
|
|
50
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterFragmentsPassed API_AVAILABLE(macos(10.15), ios(14.0));
|
|
51
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterComputeKernelInvocations API_AVAILABLE(macos(10.15), ios(14.0));
|
|
52
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterTotalCycles API_AVAILABLE(macos(10.15), ios(14.0));
|
|
53
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterVertexCycles API_AVAILABLE(macos(10.15), ios(14.0));
|
|
54
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterTessellationCycles API_AVAILABLE(macos(10.15), ios(14.0));
|
|
55
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterPostTessellationVertexCycles API_AVAILABLE(macos(10.15), ios(14.0));
|
|
56
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterFragmentCycles API_AVAILABLE(macos(10.15), ios(14.0));
|
|
57
|
+
MTL_EXTERN MTLCommonCounter MTLCommonCounterRenderTargetWriteCycles API_AVAILABLE(macos(10.15), ios(14.0));
|
|
58
|
+
|
|
59
|
+
/*!
|
|
60
|
+
@enum MTLCommonCounterSet
|
|
61
|
+
@abstract Common counter set names.
|
|
62
|
+
@discussion Each of these common counter sets has a defined structure type. Implementations
|
|
63
|
+
may omit some of the counters from these sets.
|
|
64
|
+
@constant MTLCommonCounterSetTimestamp A counter set containing only the timestamp.
|
|
65
|
+
@constant MTLCommonCounterSetStageUtilization A counter set containing utilization per stage.
|
|
66
|
+
@constant MTLCommonCounterSetStatistic A counter set containing various statistics.
|
|
67
|
+
*/
|
|
68
|
+
typedef NSString * const MTLCommonCounterSet NS_TYPED_ENUM API_AVAILABLE(macos(10.15), ios(14.0));
|
|
69
|
+
MTL_EXTERN MTLCommonCounterSet MTLCommonCounterSetTimestamp API_AVAILABLE(macos(10.15), ios(14.0));
|
|
70
|
+
MTL_EXTERN MTLCommonCounterSet MTLCommonCounterSetStageUtilization API_AVAILABLE(macos(10.15), ios(14.0));
|
|
71
|
+
MTL_EXTERN MTLCommonCounterSet MTLCommonCounterSetStatistic API_AVAILABLE(macos(10.15), ios(14.0));
|
|
72
|
+
|
|
73
|
+
typedef struct
|
|
74
|
+
{
|
|
75
|
+
uint64_t timestamp;
|
|
76
|
+
} MTLCounterResultTimestamp API_AVAILABLE(macos(10.15), ios(14.0));
|
|
77
|
+
|
|
78
|
+
typedef struct
|
|
79
|
+
{
|
|
80
|
+
uint64_t totalCycles;
|
|
81
|
+
uint64_t vertexCycles;
|
|
82
|
+
uint64_t tessellationCycles;
|
|
83
|
+
uint64_t postTessellationVertexCycles;
|
|
84
|
+
uint64_t fragmentCycles;
|
|
85
|
+
uint64_t renderTargetCycles;
|
|
86
|
+
} MTLCounterResultStageUtilization API_AVAILABLE(macos(10.15), ios(14.0));
|
|
87
|
+
|
|
88
|
+
typedef struct
|
|
89
|
+
{
|
|
90
|
+
uint64_t tessellationInputPatches;
|
|
91
|
+
uint64_t vertexInvocations;
|
|
92
|
+
uint64_t postTessellationVertexInvocations;
|
|
93
|
+
uint64_t clipperInvocations;
|
|
94
|
+
uint64_t clipperPrimitivesOut;
|
|
95
|
+
uint64_t fragmentInvocations;
|
|
96
|
+
uint64_t fragmentsPassed;
|
|
97
|
+
uint64_t computeKernelInvocations;
|
|
98
|
+
} MTLCounterResultStatistic API_AVAILABLE(macos(10.15), ios(14.0));
|
|
99
|
+
|
|
100
|
+
/*!
|
|
101
|
+
@protocol MTLCounter
|
|
102
|
+
@abstract A descriptor for a single counter.
|
|
103
|
+
*/
|
|
104
|
+
MTL_EXPORT API_AVAILABLE(macos(10.15), ios(14.0)) NS_SWIFT_SENDABLE
|
|
105
|
+
@protocol MTLCounter <NSObject>
|
|
106
|
+
@property (readonly, copy) NSString *name API_AVAILABLE(macos(10.15), ios(14.0));
|
|
107
|
+
@end
|
|
108
|
+
|
|
109
|
+
/*!
|
|
110
|
+
@protocol MTLCounterSet
|
|
111
|
+
@abstract A collection of MTLCounters that the device can capture in
|
|
112
|
+
a single pass.
|
|
113
|
+
*/
|
|
114
|
+
MTL_EXPORT API_AVAILABLE(macos(10.15), ios(14.0)) NS_SWIFT_SENDABLE
|
|
115
|
+
@protocol MTLCounterSet <NSObject>
|
|
116
|
+
/*!
|
|
117
|
+
@property name The name of the counter set.
|
|
118
|
+
*/
|
|
119
|
+
@property (readonly, copy) NSString *name API_AVAILABLE(macos(10.15), ios(14.0));
|
|
120
|
+
|
|
121
|
+
/*!
|
|
122
|
+
@property counters The set of counters captured by the counter set.
|
|
123
|
+
@discussion The counters array contains all the counters that will be written
|
|
124
|
+
when a counter sample is collected. Counters that do not appear in this array
|
|
125
|
+
will not be written to the resolved buffer when the samples are resolved, even if
|
|
126
|
+
they appear in the corresponding resolved counter structure. Instead
|
|
127
|
+
MTLCounterErrorValue will be written in the resolved buffer.
|
|
128
|
+
*/
|
|
129
|
+
@property (readonly, copy) NSArray<id<MTLCounter>>* counters API_AVAILABLE(macos(10.15), ios(14.0));
|
|
130
|
+
|
|
131
|
+
@end
|
|
132
|
+
|
|
133
|
+
/*!
|
|
134
|
+
@interface MTLCounterSampleBufferDescriptor
|
|
135
|
+
@abstract Object to represent the counter state.
|
|
136
|
+
*/
|
|
137
|
+
MTL_EXPORT API_AVAILABLE(macos(10.15), ios(14.0))
|
|
138
|
+
@interface MTLCounterSampleBufferDescriptor : NSObject <NSCopying>
|
|
139
|
+
/*!
|
|
140
|
+
@property counterSet The counterset to be sampled for this counter sample buffer
|
|
141
|
+
*/
|
|
142
|
+
@property (nullable, readwrite, retain) id<MTLCounterSet> counterSet API_AVAILABLE(macos(10.15), ios(14.0));
|
|
143
|
+
/*!
|
|
144
|
+
@property label A label to identify the sample buffer in debugging tools.
|
|
145
|
+
*/
|
|
146
|
+
@property (readwrite, copy) NSString *label API_AVAILABLE(macos(10.15), ios(14.0));
|
|
147
|
+
/*!
|
|
148
|
+
@property storageMode The storage mode for the sample buffer. Only
|
|
149
|
+
MTLStorageModeShared and MTLStorageModePrivate may be used.
|
|
150
|
+
*/
|
|
151
|
+
@property (readwrite) MTLStorageMode storageMode API_AVAILABLE(macos(10.15), ios(14.0));
|
|
152
|
+
|
|
153
|
+
/*!
|
|
154
|
+
@property sampleCount The number of samples that may be stored in the
|
|
155
|
+
counter sample buffer.
|
|
156
|
+
*/
|
|
157
|
+
@property (readwrite) NSUInteger sampleCount API_AVAILABLE(macos(10.15), ios(14.0));
|
|
158
|
+
@end
|
|
159
|
+
|
|
160
|
+
/*!
|
|
161
|
+
@protocol MTLCounterSampleBuffer
|
|
162
|
+
@abstract The Counter Sample Buffer contains opaque counter samples as well
|
|
163
|
+
as state needed to request a sample from the API.
|
|
164
|
+
*/
|
|
165
|
+
API_AVAILABLE(macos(10.15), ios(14.0))
|
|
166
|
+
@protocol MTLCounterSampleBuffer <NSObject>
|
|
167
|
+
/*!
|
|
168
|
+
@property device The device that created the sample buffer. It is only valid
|
|
169
|
+
to use the sample buffer with this device.
|
|
170
|
+
*/
|
|
171
|
+
@property (readonly) id<MTLDevice> device API_AVAILABLE(macos(10.15), ios(14.0));
|
|
172
|
+
|
|
173
|
+
/*!
|
|
174
|
+
@property label The label for the sample buffer. This is set by the label
|
|
175
|
+
property of the descriptor that is used to create the sample buffer.
|
|
176
|
+
*/
|
|
177
|
+
@property (readonly) NSString *label API_AVAILABLE(macos(10.15), ios(14.0));
|
|
178
|
+
/*!
|
|
179
|
+
@property sampleCount The number of samples that may be stored in this sample buffer.
|
|
180
|
+
*/
|
|
181
|
+
@property (readonly) NSUInteger sampleCount API_AVAILABLE(macos(10.15), ios(14.0));
|
|
182
|
+
|
|
183
|
+
/*!
|
|
184
|
+
@method resolveCounterRange:
|
|
185
|
+
@abstract Resolve the counters from the sample buffer to an NSData containing
|
|
186
|
+
the counter values. This may only be used with sample buffers that have
|
|
187
|
+
MTLStorageModeShared.
|
|
188
|
+
@param range The range of indices in the sample buffer to resolve.
|
|
189
|
+
@return The resolved samples.
|
|
190
|
+
@discussion Samples that encountered an error during resolve will be set to
|
|
191
|
+
MTLCounterErrorValue.
|
|
192
|
+
*/
|
|
193
|
+
-(nullable NSData *)resolveCounterRange:(NSRange)range
|
|
194
|
+
API_AVAILABLE(macos(10.15), ios(14.0));
|
|
195
|
+
@end
|
|
196
|
+
|
|
197
|
+
/*!
|
|
198
|
+
@constant MTLCounterErrorDomain
|
|
199
|
+
@abstract NSErrors raised when creating a counter sample buffer.
|
|
200
|
+
*/
|
|
201
|
+
API_AVAILABLE(macos(10.15), ios(14.0))
|
|
202
|
+
MTL_EXTERN NSErrorDomain const MTLCounterErrorDomain;
|
|
203
|
+
|
|
204
|
+
/*!
|
|
205
|
+
@enum MTLCounterSampleBufferError
|
|
206
|
+
@constant MTLCounterSampleBufferErrorOutOfMemory
|
|
207
|
+
There wasn't enough memory available to allocate the counter sample buffer.
|
|
208
|
+
|
|
209
|
+
@constant MTLCounterSampleBufferErrorInvalid
|
|
210
|
+
Invalid parameter passed while creating counter sample buffer.
|
|
211
|
+
|
|
212
|
+
@constant MTLCounterSampleBufferErrorInternal
|
|
213
|
+
There was some other error in allocating the counter sample buffer.
|
|
214
|
+
*/
|
|
215
|
+
typedef NS_ENUM(NSInteger, MTLCounterSampleBufferError)
|
|
216
|
+
{
|
|
217
|
+
MTLCounterSampleBufferErrorOutOfMemory,
|
|
218
|
+
MTLCounterSampleBufferErrorInvalid,
|
|
219
|
+
MTLCounterSampleBufferErrorInternal,
|
|
220
|
+
} API_AVAILABLE(macos(10.15), ios(14.0));
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
NS_ASSUME_NONNULL_END
|
|
224
|
+
|
|
225
|
+
#endif /* MTLCounters_h */
|