yum-mirror/VkFFT
git clone https://git.yummers.dev/yum-mirror/VkFFT
ba7001c
develop
1//------------------------------------------------------------------------------------------------------------------------------------------------------------- 2// 3// Metal/MTLCaptureManager.hpp 4// 5// Copyright 2020-2021 Apple Inc. 6// 7// Licensed under the Apache License, Version 2.0 (the "License"); 8// you may not use this file except in compliance with the License. 9// You may obtain a copy of the License at 10// 11// http://www.apache.org/licenses/LICENSE-2.0 12// 13// Unless required by applicable law or agreed to in writing, software 14// distributed under the License is distributed on an "AS IS" BASIS, 15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16// See the License for the specific language governing permissions and 17// limitations under the License. 18// 19//------------------------------------------------------------------------------------------------------------------------------------------------------------- 20 21#pragma once 22 23#include "MTLDefines.hpp" 24#include "MTLHeaderBridge.hpp" 25#include "MTLPrivate.hpp" 26 27#include <Foundation/Foundation.hpp> 28 29#include "MTLCaptureManager.hpp" 30 31namespace MTL 32{ 33_MTL_ENUM (NS ::Integer ,CaptureError ) { 34CaptureErrorNotSupported = 1 , 35CaptureErrorAlreadyCapturing = 2 , 36CaptureErrorInvalidDescriptor = 3 , 37}; 38 39_MTL_ENUM (NS ::Integer ,CaptureDestination ) { 40CaptureDestinationDeveloperTools = 1 , 41CaptureDestinationGPUTraceDocument = 2 , 42}; 43 44class CaptureDescriptor :public NS ::Copying < CaptureDescriptor > 45{ 46public : 47static class CaptureDescriptor * alloc (); 48 49class CaptureDescriptor * init (); 50 51id captureObject ()const ; 52void setCaptureObject (id captureObject ); 53 54MTL ::CaptureDestination destination ()const ; 55void setDestination (MTL ::CaptureDestination destination ); 56 57NS ::URL * outputURL ()const ; 58void setOutputURL (const NS ::URL * outputURL ); 59}; 60 61class CaptureManager :public NS ::Referencing < CaptureManager > 62{ 63public : 64static class CaptureManager * alloc (); 65 66static class CaptureManager * sharedCaptureManager (); 67 68MTL ::CaptureManager * init (); 69 70class CaptureScope * newCaptureScope (const class Device * device ); 71 72class CaptureScope * newCaptureScope (const class CommandQueue * commandQueue ); 73 74bool supportsDestination (MTL ::CaptureDestination destination ); 75 76bool startCapture (const class CaptureDescriptor * descriptor ,NS ::Error ** error ); 77 78void startCapture (const class Device * device ); 79 80void startCapture (const class CommandQueue * commandQueue ); 81 82void startCapture (const class CaptureScope * captureScope ); 83 84void stopCapture (); 85 86class CaptureScope * defaultCaptureScope ()const ; 87void setDefaultCaptureScope (const class CaptureScope * defaultCaptureScope ); 88 89bool isCapturing ()const ; 90}; 91 92} 93 94// static method: alloc 95_MTL_INLINE MTL ::CaptureDescriptor * MTL ::CaptureDescriptor ::alloc () 96{ 97return NS ::Object ::alloc < MTL ::CaptureDescriptor > (_MTL_PRIVATE_CLS (MTLCaptureDescriptor )); 98} 99 100// method: init 101_MTL_INLINE MTL ::CaptureDescriptor * MTL ::CaptureDescriptor ::init () 102{ 103return NS ::Object ::init < MTL ::CaptureDescriptor > (); 104} 105 106// property: captureObject 107_MTL_INLINE id MTL ::CaptureDescriptor ::captureObject ()const 108{ 109return Object ::sendMessage < id > (this ,_MTL_PRIVATE_SEL (captureObject )); 110} 111 112_MTL_INLINE voidMTL ::CaptureDescriptor ::setCaptureObject (id captureObject ) 113{ 114Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setCaptureObject_ ),captureObject ); 115} 116 117// property: destination 118_MTL_INLINE MTL ::CaptureDestination MTL ::CaptureDescriptor ::destination ()const 119{ 120return Object ::sendMessage < MTL ::CaptureDestination > (this ,_MTL_PRIVATE_SEL (destination )); 121} 122 123_MTL_INLINE voidMTL ::CaptureDescriptor ::setDestination (MTL ::CaptureDestination destination ) 124{ 125Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setDestination_ ),destination ); 126} 127 128// property: outputURL 129_MTL_INLINE NS ::URL * MTL ::CaptureDescriptor ::outputURL ()const 130{ 131return Object ::sendMessage < NS ::URL *> (this ,_MTL_PRIVATE_SEL (outputURL )); 132} 133 134_MTL_INLINE voidMTL ::CaptureDescriptor ::setOutputURL (const NS ::URL * outputURL ) 135{ 136Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setOutputURL_ ),outputURL ); 137} 138 139// static method: alloc 140_MTL_INLINE MTL ::CaptureManager * MTL ::CaptureManager ::alloc () 141{ 142return NS ::Object ::alloc < MTL ::CaptureManager > (_MTL_PRIVATE_CLS (MTLCaptureManager )); 143} 144 145// static method: sharedCaptureManager 146_MTL_INLINE MTL ::CaptureManager * MTL ::CaptureManager ::sharedCaptureManager () 147{ 148return Object ::sendMessage < MTL ::CaptureManager *> (_MTL_PRIVATE_CLS (MTLCaptureManager ),_MTL_PRIVATE_SEL (sharedCaptureManager )); 149} 150 151// method: init 152_MTL_INLINE MTL ::CaptureManager * MTL ::CaptureManager ::init () 153{ 154return NS ::Object ::init < MTL ::CaptureManager > (); 155} 156 157// method: newCaptureScopeWithDevice: 158_MTL_INLINE MTL ::CaptureScope * MTL ::CaptureManager ::newCaptureScope (const MTL ::Device * device ) 159{ 160return Object ::sendMessage < MTL ::CaptureScope *> (this ,_MTL_PRIVATE_SEL (newCaptureScopeWithDevice_ ),device ); 161} 162 163// method: newCaptureScopeWithCommandQueue: 164_MTL_INLINE MTL ::CaptureScope * MTL ::CaptureManager ::newCaptureScope (const MTL ::CommandQueue * commandQueue ) 165{ 166return Object ::sendMessage < MTL ::CaptureScope *> (this ,_MTL_PRIVATE_SEL (newCaptureScopeWithCommandQueue_ ),commandQueue ); 167} 168 169// method: supportsDestination: 170_MTL_INLINE boolMTL ::CaptureManager ::supportsDestination (MTL ::CaptureDestination destination ) 171{ 172return Object ::sendMessageSafe < bool > (this ,_MTL_PRIVATE_SEL (supportsDestination_ ),destination ); 173} 174 175// method: startCaptureWithDescriptor:error: 176_MTL_INLINE boolMTL ::CaptureManager ::startCapture (const MTL ::CaptureDescriptor * descriptor ,NS ::Error ** error ) 177{ 178return Object ::sendMessage < bool > (this ,_MTL_PRIVATE_SEL (startCaptureWithDescriptor_error_ ),descriptor ,error ); 179} 180 181// method: startCaptureWithDevice: 182_MTL_INLINE voidMTL ::CaptureManager ::startCapture (const MTL ::Device * device ) 183{ 184Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (startCaptureWithDevice_ ),device ); 185} 186 187// method: startCaptureWithCommandQueue: 188_MTL_INLINE voidMTL ::CaptureManager ::startCapture (const MTL ::CommandQueue * commandQueue ) 189{ 190Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (startCaptureWithCommandQueue_ ),commandQueue ); 191} 192 193// method: startCaptureWithScope: 194_MTL_INLINE voidMTL ::CaptureManager ::startCapture (const MTL ::CaptureScope * captureScope ) 195{ 196Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (startCaptureWithScope_ ),captureScope ); 197} 198 199// method: stopCapture 200_MTL_INLINE voidMTL ::CaptureManager ::stopCapture () 201{ 202Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (stopCapture )); 203} 204 205// property: defaultCaptureScope 206_MTL_INLINE MTL ::CaptureScope * MTL ::CaptureManager ::defaultCaptureScope ()const 207{ 208return Object ::sendMessage < MTL ::CaptureScope *> (this ,_MTL_PRIVATE_SEL (defaultCaptureScope )); 209} 210 211_MTL_INLINE voidMTL ::CaptureManager ::setDefaultCaptureScope (const MTL ::CaptureScope * defaultCaptureScope ) 212{ 213Object ::sendMessage < void > (this ,_MTL_PRIVATE_SEL (setDefaultCaptureScope_ ),defaultCaptureScope ); 214} 215 216// property: isCapturing 217_MTL_INLINE boolMTL ::CaptureManager ::isCapturing ()const 218{ 219return Object ::sendMessage < bool > (this ,_MTL_PRIVATE_SEL (isCapturing )); 220}