MTLResourceStatePass.hpp
1 //------------------------------------------------------------------------------------------------------------------------------------------------------------- 2 // 3 // Metal/MTLResourceStatePass.hpp 4 // 5 // Copyright 2020-2024 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 namespace MTL 30 { 31 class ResourceStatePassSampleBufferAttachmentDescriptor : public NS::Copying<ResourceStatePassSampleBufferAttachmentDescriptor> 32 { 33 public: 34 static class ResourceStatePassSampleBufferAttachmentDescriptor* alloc(); 35 36 class ResourceStatePassSampleBufferAttachmentDescriptor* init(); 37 38 class CounterSampleBuffer* sampleBuffer() const; 39 void setSampleBuffer(const class CounterSampleBuffer* sampleBuffer); 40 41 NS::UInteger startOfEncoderSampleIndex() const; 42 void setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex); 43 44 NS::UInteger endOfEncoderSampleIndex() const; 45 void setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex); 46 }; 47 48 class ResourceStatePassSampleBufferAttachmentDescriptorArray : public NS::Referencing<ResourceStatePassSampleBufferAttachmentDescriptorArray> 49 { 50 public: 51 static class ResourceStatePassSampleBufferAttachmentDescriptorArray* alloc(); 52 53 class ResourceStatePassSampleBufferAttachmentDescriptorArray* init(); 54 55 class ResourceStatePassSampleBufferAttachmentDescriptor* object(NS::UInteger attachmentIndex); 56 57 void setObject(const class ResourceStatePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex); 58 }; 59 60 class ResourceStatePassDescriptor : public NS::Copying<ResourceStatePassDescriptor> 61 { 62 public: 63 static class ResourceStatePassDescriptor* alloc(); 64 65 class ResourceStatePassDescriptor* init(); 66 67 static class ResourceStatePassDescriptor* resourceStatePassDescriptor(); 68 69 class ResourceStatePassSampleBufferAttachmentDescriptorArray* sampleBufferAttachments() const; 70 }; 71 72 } 73 74 // static method: alloc 75 _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptor* MTL::ResourceStatePassSampleBufferAttachmentDescriptor::alloc() 76 { 77 return NS::Object::alloc<MTL::ResourceStatePassSampleBufferAttachmentDescriptor>(_MTL_PRIVATE_CLS(MTLResourceStatePassSampleBufferAttachmentDescriptor)); 78 } 79 80 // method: init 81 _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptor* MTL::ResourceStatePassSampleBufferAttachmentDescriptor::init() 82 { 83 return NS::Object::init<MTL::ResourceStatePassSampleBufferAttachmentDescriptor>(); 84 } 85 86 // property: sampleBuffer 87 _MTL_INLINE MTL::CounterSampleBuffer* MTL::ResourceStatePassSampleBufferAttachmentDescriptor::sampleBuffer() const 88 { 89 return Object::sendMessage<MTL::CounterSampleBuffer*>(this, _MTL_PRIVATE_SEL(sampleBuffer)); 90 } 91 92 _MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setSampleBuffer(const MTL::CounterSampleBuffer* sampleBuffer) 93 { 94 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setSampleBuffer_), sampleBuffer); 95 } 96 97 // property: startOfEncoderSampleIndex 98 _MTL_INLINE NS::UInteger MTL::ResourceStatePassSampleBufferAttachmentDescriptor::startOfEncoderSampleIndex() const 99 { 100 return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(startOfEncoderSampleIndex)); 101 } 102 103 _MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setStartOfEncoderSampleIndex(NS::UInteger startOfEncoderSampleIndex) 104 { 105 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setStartOfEncoderSampleIndex_), startOfEncoderSampleIndex); 106 } 107 108 // property: endOfEncoderSampleIndex 109 _MTL_INLINE NS::UInteger MTL::ResourceStatePassSampleBufferAttachmentDescriptor::endOfEncoderSampleIndex() const 110 { 111 return Object::sendMessage<NS::UInteger>(this, _MTL_PRIVATE_SEL(endOfEncoderSampleIndex)); 112 } 113 114 _MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptor::setEndOfEncoderSampleIndex(NS::UInteger endOfEncoderSampleIndex) 115 { 116 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setEndOfEncoderSampleIndex_), endOfEncoderSampleIndex); 117 } 118 119 // static method: alloc 120 _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::alloc() 121 { 122 return NS::Object::alloc<MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray>(_MTL_PRIVATE_CLS(MTLResourceStatePassSampleBufferAttachmentDescriptorArray)); 123 } 124 125 // method: init 126 _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::init() 127 { 128 return NS::Object::init<MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray>(); 129 } 130 131 // method: objectAtIndexedSubscript: 132 _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptor* MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::object(NS::UInteger attachmentIndex) 133 { 134 return Object::sendMessage<MTL::ResourceStatePassSampleBufferAttachmentDescriptor*>(this, _MTL_PRIVATE_SEL(objectAtIndexedSubscript_), attachmentIndex); 135 } 136 137 // method: setObject:atIndexedSubscript: 138 _MTL_INLINE void MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray::setObject(const MTL::ResourceStatePassSampleBufferAttachmentDescriptor* attachment, NS::UInteger attachmentIndex) 139 { 140 Object::sendMessage<void>(this, _MTL_PRIVATE_SEL(setObject_atIndexedSubscript_), attachment, attachmentIndex); 141 } 142 143 // static method: alloc 144 _MTL_INLINE MTL::ResourceStatePassDescriptor* MTL::ResourceStatePassDescriptor::alloc() 145 { 146 return NS::Object::alloc<MTL::ResourceStatePassDescriptor>(_MTL_PRIVATE_CLS(MTLResourceStatePassDescriptor)); 147 } 148 149 // method: init 150 _MTL_INLINE MTL::ResourceStatePassDescriptor* MTL::ResourceStatePassDescriptor::init() 151 { 152 return NS::Object::init<MTL::ResourceStatePassDescriptor>(); 153 } 154 155 // static method: resourceStatePassDescriptor 156 _MTL_INLINE MTL::ResourceStatePassDescriptor* MTL::ResourceStatePassDescriptor::resourceStatePassDescriptor() 157 { 158 return Object::sendMessage<MTL::ResourceStatePassDescriptor*>(_MTL_PRIVATE_CLS(MTLResourceStatePassDescriptor), _MTL_PRIVATE_SEL(resourceStatePassDescriptor)); 159 } 160 161 // property: sampleBufferAttachments 162 _MTL_INLINE MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray* MTL::ResourceStatePassDescriptor::sampleBufferAttachments() const 163 { 164 return Object::sendMessage<MTL::ResourceStatePassSampleBufferAttachmentDescriptorArray*>(this, _MTL_PRIVATE_SEL(sampleBufferAttachments)); 165 }