objc2_metal/generated/
MTLComputePass.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct MTLComputePassSampleBufferAttachmentDescriptor;
15);
16
17extern_conformance!(
18 unsafe impl NSCopying for MTLComputePassSampleBufferAttachmentDescriptor {}
19);
20
21unsafe impl CopyingHelper for MTLComputePassSampleBufferAttachmentDescriptor {
22 type Result = Self;
23}
24
25extern_conformance!(
26 unsafe impl NSObjectProtocol for MTLComputePassSampleBufferAttachmentDescriptor {}
27);
28
29impl MTLComputePassSampleBufferAttachmentDescriptor {
30 extern_methods!(
31 #[cfg(feature = "MTLCounters")]
32 #[unsafe(method(sampleBuffer))]
38 #[unsafe(method_family = none)]
39 pub fn sampleBuffer(&self) -> Option<Retained<ProtocolObject<dyn MTLCounterSampleBuffer>>>;
40
41 #[cfg(feature = "MTLCounters")]
42 #[unsafe(method(setSampleBuffer:))]
44 #[unsafe(method_family = none)]
45 pub fn setSampleBuffer(
46 &self,
47 sample_buffer: Option<&ProtocolObject<dyn MTLCounterSampleBuffer>>,
48 );
49
50 #[unsafe(method(startOfEncoderSampleIndex))]
57 #[unsafe(method_family = none)]
58 pub fn startOfEncoderSampleIndex(&self) -> NSUInteger;
59
60 #[unsafe(method(setStartOfEncoderSampleIndex:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setStartOfEncoderSampleIndex(
68 &self,
69 start_of_encoder_sample_index: NSUInteger,
70 );
71
72 #[unsafe(method(endOfEncoderSampleIndex))]
79 #[unsafe(method_family = none)]
80 pub fn endOfEncoderSampleIndex(&self) -> NSUInteger;
81
82 #[unsafe(method(setEndOfEncoderSampleIndex:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn setEndOfEncoderSampleIndex(&self, end_of_encoder_sample_index: NSUInteger);
90 );
91}
92
93impl MTLComputePassSampleBufferAttachmentDescriptor {
95 extern_methods!(
96 #[unsafe(method(init))]
97 #[unsafe(method_family = init)]
98 pub fn init(this: Allocated<Self>) -> Retained<Self>;
99
100 #[unsafe(method(new))]
101 #[unsafe(method_family = new)]
102 pub fn new() -> Retained<Self>;
103 );
104}
105
106impl DefaultRetained for MTLComputePassSampleBufferAttachmentDescriptor {
107 #[inline]
108 fn default_retained() -> Retained<Self> {
109 Self::new()
110 }
111}
112
113extern_class!(
114 #[unsafe(super(NSObject))]
116 #[derive(Debug, PartialEq, Eq, Hash)]
117 pub struct MTLComputePassSampleBufferAttachmentDescriptorArray;
118);
119
120extern_conformance!(
121 unsafe impl NSObjectProtocol for MTLComputePassSampleBufferAttachmentDescriptorArray {}
122);
123
124impl MTLComputePassSampleBufferAttachmentDescriptorArray {
125 extern_methods!(
126 #[unsafe(method(objectAtIndexedSubscript:))]
130 #[unsafe(method_family = none)]
131 pub unsafe fn objectAtIndexedSubscript(
132 &self,
133 attachment_index: NSUInteger,
134 ) -> Retained<MTLComputePassSampleBufferAttachmentDescriptor>;
135
136 #[unsafe(method(setObject:atIndexedSubscript:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn setObject_atIndexedSubscript(
142 &self,
143 attachment: Option<&MTLComputePassSampleBufferAttachmentDescriptor>,
144 attachment_index: NSUInteger,
145 );
146 );
147}
148
149impl MTLComputePassSampleBufferAttachmentDescriptorArray {
151 extern_methods!(
152 #[unsafe(method(init))]
153 #[unsafe(method_family = init)]
154 pub fn init(this: Allocated<Self>) -> Retained<Self>;
155
156 #[unsafe(method(new))]
157 #[unsafe(method_family = new)]
158 pub fn new() -> Retained<Self>;
159 );
160}
161
162impl DefaultRetained for MTLComputePassSampleBufferAttachmentDescriptorArray {
163 #[inline]
164 fn default_retained() -> Retained<Self> {
165 Self::new()
166 }
167}
168
169extern_class!(
170 #[unsafe(super(NSObject))]
174 #[derive(Debug, PartialEq, Eq, Hash)]
175 pub struct MTLComputePassDescriptor;
176);
177
178extern_conformance!(
179 unsafe impl NSCopying for MTLComputePassDescriptor {}
180);
181
182unsafe impl CopyingHelper for MTLComputePassDescriptor {
183 type Result = Self;
184}
185
186extern_conformance!(
187 unsafe impl NSObjectProtocol for MTLComputePassDescriptor {}
188);
189
190impl MTLComputePassDescriptor {
191 extern_methods!(
192 #[unsafe(method(computePassDescriptor))]
194 #[unsafe(method_family = none)]
195 pub fn computePassDescriptor() -> Retained<MTLComputePassDescriptor>;
196
197 #[cfg(feature = "MTLCommandBuffer")]
198 #[unsafe(method(dispatchType))]
200 #[unsafe(method_family = none)]
201 pub fn dispatchType(&self) -> MTLDispatchType;
202
203 #[cfg(feature = "MTLCommandBuffer")]
204 #[unsafe(method(setDispatchType:))]
206 #[unsafe(method_family = none)]
207 pub fn setDispatchType(&self, dispatch_type: MTLDispatchType);
208
209 #[unsafe(method(sampleBufferAttachments))]
211 #[unsafe(method_family = none)]
212 pub fn sampleBufferAttachments(
213 &self,
214 ) -> Retained<MTLComputePassSampleBufferAttachmentDescriptorArray>;
215 );
216}
217
218impl MTLComputePassDescriptor {
220 extern_methods!(
221 #[unsafe(method(init))]
222 #[unsafe(method_family = init)]
223 pub fn init(this: Allocated<Self>) -> Retained<Self>;
224
225 #[unsafe(method(new))]
226 #[unsafe(method_family = new)]
227 pub fn new() -> Retained<Self>;
228 );
229}
230
231impl DefaultRetained for MTLComputePassDescriptor {
232 #[inline]
233 fn default_retained() -> Retained<Self> {
234 Self::new()
235 }
236}