objc2_metal/generated/
MTL4MeshRenderPipeline.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// Groups together properties you use to create a mesh render pipeline state object.
12    ///
13    /// Compared to ``MTLMeshRenderPipelineDescriptor``, this interface doesn't offer a mechanism to hint to Metal mutability
14    /// of object, mesh, or fragment buffers. Additionally, when you use this descriptor, you don't specify binary archives.
15    ///
16    /// See also [Apple's documentation](https://developer.apple.com/documentation/metal/mtl4meshrenderpipelinedescriptor?language=objc)
17    #[unsafe(super(MTL4PipelineDescriptor, NSObject))]
18    #[derive(Debug, PartialEq, Eq, Hash)]
19    #[cfg(feature = "MTL4PipelineState")]
20    pub struct MTL4MeshRenderPipelineDescriptor;
21);
22
23#[cfg(feature = "MTL4PipelineState")]
24extern_conformance!(
25    unsafe impl NSCopying for MTL4MeshRenderPipelineDescriptor {}
26);
27
28#[cfg(feature = "MTL4PipelineState")]
29unsafe impl CopyingHelper for MTL4MeshRenderPipelineDescriptor {
30    type Result = Self;
31}
32
33#[cfg(feature = "MTL4PipelineState")]
34extern_conformance!(
35    unsafe impl NSObjectProtocol for MTL4MeshRenderPipelineDescriptor {}
36);
37
38#[cfg(feature = "MTL4PipelineState")]
39impl MTL4MeshRenderPipelineDescriptor {
40    extern_methods!(
41        #[cfg(feature = "MTL4FunctionDescriptor")]
42        /// Assigns a function descriptor representing the function this pipeline executes for each *object* in the object shader stage.
43        #[unsafe(method(objectFunctionDescriptor))]
44        #[unsafe(method_family = none)]
45        pub fn objectFunctionDescriptor(&self) -> Option<Retained<MTL4FunctionDescriptor>>;
46
47        #[cfg(feature = "MTL4FunctionDescriptor")]
48        /// Setter for [`objectFunctionDescriptor`][Self::objectFunctionDescriptor].
49        ///
50        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
51        #[unsafe(method(setObjectFunctionDescriptor:))]
52        #[unsafe(method_family = none)]
53        pub fn setObjectFunctionDescriptor(
54            &self,
55            object_function_descriptor: Option<&MTL4FunctionDescriptor>,
56        );
57
58        #[cfg(feature = "MTL4FunctionDescriptor")]
59        /// Assigns a function descriptor representing the function this pipeline executes for each primitive in the mesh shader stage.
60        #[unsafe(method(meshFunctionDescriptor))]
61        #[unsafe(method_family = none)]
62        pub fn meshFunctionDescriptor(&self) -> Option<Retained<MTL4FunctionDescriptor>>;
63
64        #[cfg(feature = "MTL4FunctionDescriptor")]
65        /// Setter for [`meshFunctionDescriptor`][Self::meshFunctionDescriptor].
66        ///
67        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
68        #[unsafe(method(setMeshFunctionDescriptor:))]
69        #[unsafe(method_family = none)]
70        pub fn setMeshFunctionDescriptor(
71            &self,
72            mesh_function_descriptor: Option<&MTL4FunctionDescriptor>,
73        );
74
75        #[cfg(feature = "MTL4FunctionDescriptor")]
76        /// Assigns a function descriptor representing the function this pipeline executes for each fragment.
77        #[unsafe(method(fragmentFunctionDescriptor))]
78        #[unsafe(method_family = none)]
79        pub fn fragmentFunctionDescriptor(&self) -> Option<Retained<MTL4FunctionDescriptor>>;
80
81        #[cfg(feature = "MTL4FunctionDescriptor")]
82        /// Setter for [`fragmentFunctionDescriptor`][Self::fragmentFunctionDescriptor].
83        ///
84        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
85        #[unsafe(method(setFragmentFunctionDescriptor:))]
86        #[unsafe(method_family = none)]
87        pub fn setFragmentFunctionDescriptor(
88            &self,
89            fragment_function_descriptor: Option<&MTL4FunctionDescriptor>,
90        );
91
92        /// Controls the largest number of threads the pipeline state can execute in a single object shader threadgroup dispatch.
93        ///
94        /// This number represents the maximum size of the product of the components of parameter `threadsPerObjectThreadgroup`
95        /// that Metal can use when drawing with this pipeline in mesh shader dispatch methods, such as
96        /// ``MTL4RenderCommandEncoder/drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:``.
97        ///
98        /// The compiler's optimizer can use the value of this property to generate more efficient code, specifically when
99        /// the value doesn't exceed the thread execution width of the underlying GPU.
100        ///
101        /// The default value of this property is `0`, which indicates that the number you pass to attribute
102        /// `[[max_total_threads_per_threadgroup(N)]]` of the pipeline's object function determines the maximum
103        /// total threads per threadgroup.
104        ///
105        /// When you specify both the `[[max_total_threads_per_threadgroup(N)]]` attribute and this property, you are responsible
106        /// for making sure these values match.
107        ///
108        /// Additionally, you are responsible for ensuring this value doesn't exceed the "maximum threads per threadgroup"
109        /// device limit documented in the "Metal Feature Set Tables" PDF:
110        /// <https
111        /// ://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf>.
112        #[unsafe(method(maxTotalThreadsPerObjectThreadgroup))]
113        #[unsafe(method_family = none)]
114        pub fn maxTotalThreadsPerObjectThreadgroup(&self) -> NSUInteger;
115
116        /// Setter for [`maxTotalThreadsPerObjectThreadgroup`][Self::maxTotalThreadsPerObjectThreadgroup].
117        #[unsafe(method(setMaxTotalThreadsPerObjectThreadgroup:))]
118        #[unsafe(method_family = none)]
119        pub fn setMaxTotalThreadsPerObjectThreadgroup(
120            &self,
121            max_total_threads_per_object_threadgroup: NSUInteger,
122        );
123
124        /// Controls the largest number of threads the pipeline state can execute in a single mesh shader threadgroup dispatch.
125        ///
126        /// This number represents the maximum size of the product of the components of parameter `threadsPerMeshThreadgroup`
127        /// that Metal can use when drawing with this pipeline in mesh shader dispatch methods, such as
128        /// ``MTL4RenderCommandEncoder/drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:``.
129        ///
130        /// The compiler's optimizer can use the value of this property to generate more efficient code, specifically when
131        /// the value doesn't exceed the thread execution width of the underlying GPU.
132        ///
133        /// The default value of this property is `0`, thish indicates that the Metal Shader Language attribute
134        /// `[[max_total_threads_per_threadgroup]]` you attache to the pipeline's mesh shader function determines
135        /// the value of this property.
136        ///
137        /// When you specify both the `[[max_total_threads_per_threadgroup(N)]]` attribute and this property, you are responsible
138        /// for making sure these values match.
139        ///
140        /// Additionally, you are responsible for ensuring this value doesn't exceed the "maximum threads per threadgroup"
141        /// device limit documented in the "Metal Feature Set Tables" PDF:
142        /// <https
143        /// ://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf>.
144        #[unsafe(method(maxTotalThreadsPerMeshThreadgroup))]
145        #[unsafe(method_family = none)]
146        pub fn maxTotalThreadsPerMeshThreadgroup(&self) -> NSUInteger;
147
148        /// Setter for [`maxTotalThreadsPerMeshThreadgroup`][Self::maxTotalThreadsPerMeshThreadgroup].
149        #[unsafe(method(setMaxTotalThreadsPerMeshThreadgroup:))]
150        #[unsafe(method_family = none)]
151        pub fn setMaxTotalThreadsPerMeshThreadgroup(
152            &self,
153            max_total_threads_per_mesh_threadgroup: NSUInteger,
154        );
155
156        #[cfg(feature = "MTLTypes")]
157        /// Controls the required number of object threads-per-threadgroup when drawing with a mesh shader pipeline you create
158        /// from this descriptor.
159        ///
160        /// This argument is optional, unless this pipeline uses `CooperativeTensors`, in which case you are responsible for providing it.
161        ///
162        /// When this value is set to non-zero, you are responsible for ensuring the parameter `threadsPerObjectThreadgroup`
163        /// in any mesh dispatch draw calls that use this mesh render pipeline, such as
164        /// ``MTL4RenderCommandEncoder/drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:``,
165        /// match it.
166        ///
167        /// Setting this value to a size of 0 in every dimension disables this property.
168        #[unsafe(method(requiredThreadsPerObjectThreadgroup))]
169        #[unsafe(method_family = none)]
170        pub fn requiredThreadsPerObjectThreadgroup(&self) -> MTLSize;
171
172        #[cfg(feature = "MTLTypes")]
173        /// Setter for [`requiredThreadsPerObjectThreadgroup`][Self::requiredThreadsPerObjectThreadgroup].
174        #[unsafe(method(setRequiredThreadsPerObjectThreadgroup:))]
175        #[unsafe(method_family = none)]
176        pub fn setRequiredThreadsPerObjectThreadgroup(
177            &self,
178            required_threads_per_object_threadgroup: MTLSize,
179        );
180
181        #[cfg(feature = "MTLTypes")]
182        /// Controls the required number of mesh threads-per-threadgroup when drawing with a mesh shader pipeline you create
183        /// from this descriptor.
184        ///
185        /// This argument is optional, unless this pipeline uses `CooperativeTensors`, in which case you are responsible for providing it.
186        ///
187        /// When this value is set to non-zero, you are responsible for ensuring the parameter `threadsPerMeshThreadgroup`
188        /// in any mesh dispatch draw calls that use this mesh render pipeline, such as
189        /// ``MTL4RenderCommandEncoder/drawMeshThreadgroups:threadsPerObjectThreadgroup:threadsPerMeshThreadgroup:``,
190        /// match it.
191        ///
192        /// Setting this value to a size of 0 in every dimension disables this property.
193        #[unsafe(method(requiredThreadsPerMeshThreadgroup))]
194        #[unsafe(method_family = none)]
195        pub fn requiredThreadsPerMeshThreadgroup(&self) -> MTLSize;
196
197        #[cfg(feature = "MTLTypes")]
198        /// Setter for [`requiredThreadsPerMeshThreadgroup`][Self::requiredThreadsPerMeshThreadgroup].
199        #[unsafe(method(setRequiredThreadsPerMeshThreadgroup:))]
200        #[unsafe(method_family = none)]
201        pub fn setRequiredThreadsPerMeshThreadgroup(
202            &self,
203            required_threads_per_mesh_threadgroup: MTLSize,
204        );
205
206        /// Provides a guarantee to Metal regarding the number of threadgroup threads for the object stage of a pipeline you
207        /// create from this descriptor.
208        ///
209        /// If you set this property to
210        /// <doc
211        /// ://com.apple.documentation/documentation/swift/true>, you state to Metal that when
212        /// you use a mesh render pipeline you create from this descriptor, the number of threadgroup threads you dispatch for
213        /// the object stage is a multiple of its ``MTLRenderPipelineState/objectThreadExecutionWidth``. The compiler's optimizer can use this guarantee to generate
214        /// more efficient code.
215        ///
216        /// This property's default value is
217        /// <doc
218        /// ://com.apple.documentation/documentation/swift/false>.
219        #[unsafe(method(objectThreadgroupSizeIsMultipleOfThreadExecutionWidth))]
220        #[unsafe(method_family = none)]
221        pub fn objectThreadgroupSizeIsMultipleOfThreadExecutionWidth(&self) -> bool;
222
223        /// Setter for [`objectThreadgroupSizeIsMultipleOfThreadExecutionWidth`][Self::objectThreadgroupSizeIsMultipleOfThreadExecutionWidth].
224        #[unsafe(method(setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth:))]
225        #[unsafe(method_family = none)]
226        pub fn setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(
227            &self,
228            object_threadgroup_size_is_multiple_of_thread_execution_width: bool,
229        );
230
231        /// Provides a guarantee to Metal regarding the number of threadgroup threads for the mesh stage of a pipeline you
232        /// create from this descriptor.
233        ///
234        /// If you set this property to
235        /// <doc
236        /// ://com.apple.documentation/documentation/swift/true>, you state to Metal that when
237        /// you use a mesh render pipeline you create from this descriptor, the number of threadgroup threads you dispatch for
238        /// the mesh stage is a multiple of its ``MTLRenderPipelineState/meshThreadExecutionWidth``. The compiler's optimizer
239        /// can use this guarantee to generate more efficient code.
240        ///
241        /// This property's default value is
242        /// <doc
243        /// ://com.apple.documentation/documentation/swift/false>.
244        #[unsafe(method(meshThreadgroupSizeIsMultipleOfThreadExecutionWidth))]
245        #[unsafe(method_family = none)]
246        pub fn meshThreadgroupSizeIsMultipleOfThreadExecutionWidth(&self) -> bool;
247
248        /// Setter for [`meshThreadgroupSizeIsMultipleOfThreadExecutionWidth`][Self::meshThreadgroupSizeIsMultipleOfThreadExecutionWidth].
249        #[unsafe(method(setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth:))]
250        #[unsafe(method_family = none)]
251        pub fn setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(
252            &self,
253            mesh_threadgroup_size_is_multiple_of_thread_execution_width: bool,
254        );
255
256        /// Reserves storage for the object-to-mesh stage payload.
257        ///
258        /// This property determines the size, in bytes, of the buffer you indicate via the Metal Shading Language `[[payload]]`
259        /// attribute in the object and mesh shader functions of the mesh render pipeline.
260        ///
261        /// If this value is `0`, Metal derives the size from the (dereferenced) type you declare for the payload in the object
262        /// shader function. If the type is a pointer, Metal reserves space for a single element.
263        ///
264        /// The default value is `0`.
265        #[unsafe(method(payloadMemoryLength))]
266        #[unsafe(method_family = none)]
267        pub fn payloadMemoryLength(&self) -> NSUInteger;
268
269        /// Setter for [`payloadMemoryLength`][Self::payloadMemoryLength].
270        #[unsafe(method(setPayloadMemoryLength:))]
271        #[unsafe(method_family = none)]
272        pub fn setPayloadMemoryLength(&self, payload_memory_length: NSUInteger);
273
274        /// Controls the largest number of threads the pipeline state can execute when the object stage of a mesh
275        /// render pipeline you create from this descriptor dispatches its mesh stage.
276        ///
277        /// This number represents the maximum size of the product of the components of the parameter you pass to Metal
278        /// Shading Language's built-in function `mesh_grid_properties::set_threadgroups_per_grid`.
279        ///
280        /// The default value of this property is `0`, which indicates that the Metal Shading Language attribute
281        /// `[[max_total_threadgroups_per_mesh_grid(N)]]` you attach to the pipeline's mesh shader function determines
282        /// the value of this property.
283        ///
284        /// When you specify both the `[[max_total_threadgroups_per_mesh_grid(N)]]` attribute and this property, you are
285        /// responsible for making sure these values match.
286        ///
287        /// Additionally, you are responsible for ensuring this value doesn't exceed the "maximum threads per mesh grid"
288        /// device limit documented in the "Metal Feature Set Tables" PDF:
289        /// <https
290        /// ://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf>.
291        #[unsafe(method(maxTotalThreadgroupsPerMeshGrid))]
292        #[unsafe(method_family = none)]
293        pub fn maxTotalThreadgroupsPerMeshGrid(&self) -> NSUInteger;
294
295        /// Setter for [`maxTotalThreadgroupsPerMeshGrid`][Self::maxTotalThreadgroupsPerMeshGrid].
296        #[unsafe(method(setMaxTotalThreadgroupsPerMeshGrid:))]
297        #[unsafe(method_family = none)]
298        pub fn setMaxTotalThreadgroupsPerMeshGrid(
299            &self,
300            max_total_threadgroups_per_mesh_grid: NSUInteger,
301        );
302
303        /// Sets number of samples this pipeline applies for each fragment.
304        #[unsafe(method(rasterSampleCount))]
305        #[unsafe(method_family = none)]
306        pub fn rasterSampleCount(&self) -> NSUInteger;
307
308        /// Setter for [`rasterSampleCount`][Self::rasterSampleCount].
309        ///
310        /// # Safety
311        ///
312        /// This might not be bounds-checked.
313        #[unsafe(method(setRasterSampleCount:))]
314        #[unsafe(method_family = none)]
315        pub unsafe fn setRasterSampleCount(&self, raster_sample_count: NSUInteger);
316
317        /// Indicates whether to read and use the alpha channel fragment output of color attachments to compute a sample coverage mask.
318        #[unsafe(method(alphaToCoverageState))]
319        #[unsafe(method_family = none)]
320        pub fn alphaToCoverageState(&self) -> MTL4AlphaToCoverageState;
321
322        /// Setter for [`alphaToCoverageState`][Self::alphaToCoverageState].
323        #[unsafe(method(setAlphaToCoverageState:))]
324        #[unsafe(method_family = none)]
325        pub fn setAlphaToCoverageState(&self, alpha_to_coverage_state: MTL4AlphaToCoverageState);
326
327        /// Indicates whether the pipeline forces alpha channel values of color attachments to the largest representable value.
328        #[unsafe(method(alphaToOneState))]
329        #[unsafe(method_family = none)]
330        pub fn alphaToOneState(&self) -> MTL4AlphaToOneState;
331
332        /// Setter for [`alphaToOneState`][Self::alphaToOneState].
333        #[unsafe(method(setAlphaToOneState:))]
334        #[unsafe(method_family = none)]
335        pub fn setAlphaToOneState(&self, alpha_to_one_state: MTL4AlphaToOneState);
336
337        /// Determines whether the pipeline rasterizes primitives.
338        ///
339        /// By default, this value is
340        /// <doc
341        /// ://com.apple.documentation/documentation/swift/true>, specifying that this pipeline
342        /// rasterizes primitives. Set this property to
343        /// <doc
344        /// ://com.apple.documentation/documentation/swift/false> when you
345        /// don't provide a fragment shader function via function ``fragmentFunctionDescriptor``.
346        #[unsafe(method(isRasterizationEnabled))]
347        #[unsafe(method_family = none)]
348        pub fn isRasterizationEnabled(&self) -> bool;
349
350        /// Setter for [`isRasterizationEnabled`][Self::isRasterizationEnabled].
351        #[unsafe(method(setRasterizationEnabled:))]
352        #[unsafe(method_family = none)]
353        pub fn setRasterizationEnabled(&self, rasterization_enabled: bool);
354
355        /// Determines the maximum value that can you can pass as the pipeline's amplification count.
356        ///
357        /// This property controls the maximum count you pass to ``MTL4RenderCommandEncoder/setVertexAmplificationCount:viewMappings:``
358        /// when using vertex amplification with this pipeline.
359        #[unsafe(method(maxVertexAmplificationCount))]
360        #[unsafe(method_family = none)]
361        pub fn maxVertexAmplificationCount(&self) -> NSUInteger;
362
363        /// Setter for [`maxVertexAmplificationCount`][Self::maxVertexAmplificationCount].
364        ///
365        /// # Safety
366        ///
367        /// This might not be bounds-checked.
368        #[unsafe(method(setMaxVertexAmplificationCount:))]
369        #[unsafe(method_family = none)]
370        pub unsafe fn setMaxVertexAmplificationCount(
371            &self,
372            max_vertex_amplification_count: NSUInteger,
373        );
374
375        #[cfg(feature = "MTL4RenderPipeline")]
376        /// Accesses an array containing descriptions of the color attachments this pipeline writes to.
377        #[unsafe(method(colorAttachments))]
378        #[unsafe(method_family = none)]
379        pub fn colorAttachments(
380            &self,
381        ) -> Retained<MTL4RenderPipelineColorAttachmentDescriptorArray>;
382
383        #[cfg(feature = "MTL4LinkingDescriptor")]
384        /// Provides static linking information for the object stage of the render pipeline.
385        ///
386        /// Use this property to link extra shader functions to the object stage of the render pipeline.
387        #[unsafe(method(objectStaticLinkingDescriptor))]
388        #[unsafe(method_family = none)]
389        pub fn objectStaticLinkingDescriptor(&self) -> Retained<MTL4StaticLinkingDescriptor>;
390
391        #[cfg(feature = "MTL4LinkingDescriptor")]
392        /// Setter for [`objectStaticLinkingDescriptor`][Self::objectStaticLinkingDescriptor].
393        ///
394        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
395        #[unsafe(method(setObjectStaticLinkingDescriptor:))]
396        #[unsafe(method_family = none)]
397        pub fn setObjectStaticLinkingDescriptor(
398            &self,
399            object_static_linking_descriptor: Option<&MTL4StaticLinkingDescriptor>,
400        );
401
402        #[cfg(feature = "MTL4LinkingDescriptor")]
403        /// Provides static linking information for the mesh stage of the render pipeline.
404        ///
405        /// Use this property to link extra shader functions to the mesh stage of the render pipeline.
406        #[unsafe(method(meshStaticLinkingDescriptor))]
407        #[unsafe(method_family = none)]
408        pub fn meshStaticLinkingDescriptor(&self) -> Retained<MTL4StaticLinkingDescriptor>;
409
410        #[cfg(feature = "MTL4LinkingDescriptor")]
411        /// Setter for [`meshStaticLinkingDescriptor`][Self::meshStaticLinkingDescriptor].
412        ///
413        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
414        #[unsafe(method(setMeshStaticLinkingDescriptor:))]
415        #[unsafe(method_family = none)]
416        pub fn setMeshStaticLinkingDescriptor(
417            &self,
418            mesh_static_linking_descriptor: Option<&MTL4StaticLinkingDescriptor>,
419        );
420
421        #[cfg(feature = "MTL4LinkingDescriptor")]
422        /// Provides static linking information for the fragment stage of the render pipeline.
423        ///
424        /// Use this property to link extra shader functions to the fragment stage of the render pipeline.
425        #[unsafe(method(fragmentStaticLinkingDescriptor))]
426        #[unsafe(method_family = none)]
427        pub fn fragmentStaticLinkingDescriptor(&self) -> Retained<MTL4StaticLinkingDescriptor>;
428
429        #[cfg(feature = "MTL4LinkingDescriptor")]
430        /// Setter for [`fragmentStaticLinkingDescriptor`][Self::fragmentStaticLinkingDescriptor].
431        ///
432        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
433        #[unsafe(method(setFragmentStaticLinkingDescriptor:))]
434        #[unsafe(method_family = none)]
435        pub fn setFragmentStaticLinkingDescriptor(
436            &self,
437            fragment_static_linking_descriptor: Option<&MTL4StaticLinkingDescriptor>,
438        );
439
440        /// Indicates whether you can use the render pipeline to create new pipelines by adding binary functions to the object
441        /// shader function’s callable functions list.
442        #[unsafe(method(supportObjectBinaryLinking))]
443        #[unsafe(method_family = none)]
444        pub fn supportObjectBinaryLinking(&self) -> bool;
445
446        /// Setter for [`supportObjectBinaryLinking`][Self::supportObjectBinaryLinking].
447        #[unsafe(method(setSupportObjectBinaryLinking:))]
448        #[unsafe(method_family = none)]
449        pub fn setSupportObjectBinaryLinking(&self, support_object_binary_linking: bool);
450
451        /// Indicates whether you can use the render pipeline to create new pipelines by adding binary functions to the mesh
452        /// shader function’s callable functions list.
453        #[unsafe(method(supportMeshBinaryLinking))]
454        #[unsafe(method_family = none)]
455        pub fn supportMeshBinaryLinking(&self) -> bool;
456
457        /// Setter for [`supportMeshBinaryLinking`][Self::supportMeshBinaryLinking].
458        #[unsafe(method(setSupportMeshBinaryLinking:))]
459        #[unsafe(method_family = none)]
460        pub fn setSupportMeshBinaryLinking(&self, support_mesh_binary_linking: bool);
461
462        /// Indicates whether you can use the render pipeline to create new pipelines by adding binary functions to the fragment
463        /// shader function’s callable functions list.
464        #[unsafe(method(supportFragmentBinaryLinking))]
465        #[unsafe(method_family = none)]
466        pub fn supportFragmentBinaryLinking(&self) -> bool;
467
468        /// Setter for [`supportFragmentBinaryLinking`][Self::supportFragmentBinaryLinking].
469        #[unsafe(method(setSupportFragmentBinaryLinking:))]
470        #[unsafe(method_family = none)]
471        pub fn setSupportFragmentBinaryLinking(&self, support_fragment_binary_linking: bool);
472
473        #[cfg(feature = "MTL4RenderPipeline")]
474        /// Sets the logical-to-physical rendering remap state.
475        ///
476        /// Use this property to assign how a ``MTL4RenderCommandEncoder`` instance maps the output of your fragment shader to
477        /// physical color attachments.
478        #[unsafe(method(colorAttachmentMappingState))]
479        #[unsafe(method_family = none)]
480        pub fn colorAttachmentMappingState(
481            &self,
482        ) -> MTL4LogicalToPhysicalColorAttachmentMappingState;
483
484        #[cfg(feature = "MTL4RenderPipeline")]
485        /// Setter for [`colorAttachmentMappingState`][Self::colorAttachmentMappingState].
486        #[unsafe(method(setColorAttachmentMappingState:))]
487        #[unsafe(method_family = none)]
488        pub fn setColorAttachmentMappingState(
489            &self,
490            color_attachment_mapping_state: MTL4LogicalToPhysicalColorAttachmentMappingState,
491        );
492
493        /// Indicates whether the pipeline supports indirect command buffers.
494        #[unsafe(method(supportIndirectCommandBuffers))]
495        #[unsafe(method_family = none)]
496        pub fn supportIndirectCommandBuffers(&self) -> MTL4IndirectCommandBufferSupportState;
497
498        /// Setter for [`supportIndirectCommandBuffers`][Self::supportIndirectCommandBuffers].
499        #[unsafe(method(setSupportIndirectCommandBuffers:))]
500        #[unsafe(method_family = none)]
501        pub fn setSupportIndirectCommandBuffers(
502            &self,
503            support_indirect_command_buffers: MTL4IndirectCommandBufferSupportState,
504        );
505
506        /// Resets this descriptor to its default state.
507        #[unsafe(method(reset))]
508        #[unsafe(method_family = none)]
509        pub fn reset(&self);
510    );
511}
512
513/// Methods declared on superclass `NSObject`.
514#[cfg(feature = "MTL4PipelineState")]
515impl MTL4MeshRenderPipelineDescriptor {
516    extern_methods!(
517        #[unsafe(method(init))]
518        #[unsafe(method_family = init)]
519        pub fn init(this: Allocated<Self>) -> Retained<Self>;
520
521        #[unsafe(method(new))]
522        #[unsafe(method_family = new)]
523        pub fn new() -> Retained<Self>;
524    );
525}
526
527#[cfg(feature = "MTL4PipelineState")]
528impl DefaultRetained for MTL4MeshRenderPipelineDescriptor {
529    #[inline]
530    fn default_retained() -> Retained<Self> {
531        Self::new()
532    }
533}