1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct MTLBlendFactor(pub NSUInteger);
15impl MTLBlendFactor {
16 #[doc(alias = "MTLBlendFactorZero")]
17 pub const Zero: Self = Self(0);
18 #[doc(alias = "MTLBlendFactorOne")]
19 pub const One: Self = Self(1);
20 #[doc(alias = "MTLBlendFactorSourceColor")]
21 pub const SourceColor: Self = Self(2);
22 #[doc(alias = "MTLBlendFactorOneMinusSourceColor")]
23 pub const OneMinusSourceColor: Self = Self(3);
24 #[doc(alias = "MTLBlendFactorSourceAlpha")]
25 pub const SourceAlpha: Self = Self(4);
26 #[doc(alias = "MTLBlendFactorOneMinusSourceAlpha")]
27 pub const OneMinusSourceAlpha: Self = Self(5);
28 #[doc(alias = "MTLBlendFactorDestinationColor")]
29 pub const DestinationColor: Self = Self(6);
30 #[doc(alias = "MTLBlendFactorOneMinusDestinationColor")]
31 pub const OneMinusDestinationColor: Self = Self(7);
32 #[doc(alias = "MTLBlendFactorDestinationAlpha")]
33 pub const DestinationAlpha: Self = Self(8);
34 #[doc(alias = "MTLBlendFactorOneMinusDestinationAlpha")]
35 pub const OneMinusDestinationAlpha: Self = Self(9);
36 #[doc(alias = "MTLBlendFactorSourceAlphaSaturated")]
37 pub const SourceAlphaSaturated: Self = Self(10);
38 #[doc(alias = "MTLBlendFactorBlendColor")]
39 pub const BlendColor: Self = Self(11);
40 #[doc(alias = "MTLBlendFactorOneMinusBlendColor")]
41 pub const OneMinusBlendColor: Self = Self(12);
42 #[doc(alias = "MTLBlendFactorBlendAlpha")]
43 pub const BlendAlpha: Self = Self(13);
44 #[doc(alias = "MTLBlendFactorOneMinusBlendAlpha")]
45 pub const OneMinusBlendAlpha: Self = Self(14);
46 #[doc(alias = "MTLBlendFactorSource1Color")]
47 pub const Source1Color: Self = Self(15);
48 #[doc(alias = "MTLBlendFactorOneMinusSource1Color")]
49 pub const OneMinusSource1Color: Self = Self(16);
50 #[doc(alias = "MTLBlendFactorSource1Alpha")]
51 pub const Source1Alpha: Self = Self(17);
52 #[doc(alias = "MTLBlendFactorOneMinusSource1Alpha")]
53 pub const OneMinusSource1Alpha: Self = Self(18);
54 #[doc(alias = "MTLBlendFactorUnspecialized")]
60 pub const Unspecialized: Self = Self(19);
61}
62
63unsafe impl Encode for MTLBlendFactor {
64 const ENCODING: Encoding = NSUInteger::ENCODING;
65}
66
67unsafe impl RefEncode for MTLBlendFactor {
68 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
69}
70
71#[repr(transparent)]
74#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
75pub struct MTLBlendOperation(pub NSUInteger);
76impl MTLBlendOperation {
77 #[doc(alias = "MTLBlendOperationAdd")]
78 pub const Add: Self = Self(0);
79 #[doc(alias = "MTLBlendOperationSubtract")]
80 pub const Subtract: Self = Self(1);
81 #[doc(alias = "MTLBlendOperationReverseSubtract")]
82 pub const ReverseSubtract: Self = Self(2);
83 #[doc(alias = "MTLBlendOperationMin")]
84 pub const Min: Self = Self(3);
85 #[doc(alias = "MTLBlendOperationMax")]
86 pub const Max: Self = Self(4);
87 #[doc(alias = "MTLBlendOperationUnspecialized")]
89 pub const Unspecialized: Self = Self(5);
90}
91
92unsafe impl Encode for MTLBlendOperation {
93 const ENCODING: Encoding = NSUInteger::ENCODING;
94}
95
96unsafe impl RefEncode for MTLBlendOperation {
97 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
98}
99
100#[repr(transparent)]
103#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
104pub struct MTLColorWriteMask(pub NSUInteger);
105bitflags::bitflags! {
106 impl MTLColorWriteMask: NSUInteger {
107 #[doc(alias = "MTLColorWriteMaskNone")]
108 const None = 0;
109 #[doc(alias = "MTLColorWriteMaskRed")]
110 const Red = 0x1<<3;
111 #[doc(alias = "MTLColorWriteMaskGreen")]
112 const Green = 0x1<<2;
113 #[doc(alias = "MTLColorWriteMaskBlue")]
114 const Blue = 0x1<<1;
115 #[doc(alias = "MTLColorWriteMaskAlpha")]
116 const Alpha = 0x1<<0;
117 #[doc(alias = "MTLColorWriteMaskAll")]
118 const All = 0xf;
119#[doc(alias = "MTLColorWriteMaskUnspecialized")]
123 const Unspecialized = 0x10;
124 }
125}
126
127unsafe impl Encode for MTLColorWriteMask {
128 const ENCODING: Encoding = NSUInteger::ENCODING;
129}
130
131unsafe impl RefEncode for MTLColorWriteMask {
132 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
133}
134
135#[repr(transparent)]
138#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
139pub struct MTLPrimitiveTopologyClass(pub NSUInteger);
140impl MTLPrimitiveTopologyClass {
141 #[doc(alias = "MTLPrimitiveTopologyClassUnspecified")]
142 pub const Unspecified: Self = Self(0);
143 #[doc(alias = "MTLPrimitiveTopologyClassPoint")]
144 pub const Point: Self = Self(1);
145 #[doc(alias = "MTLPrimitiveTopologyClassLine")]
146 pub const Line: Self = Self(2);
147 #[doc(alias = "MTLPrimitiveTopologyClassTriangle")]
148 pub const Triangle: Self = Self(3);
149}
150
151unsafe impl Encode for MTLPrimitiveTopologyClass {
152 const ENCODING: Encoding = NSUInteger::ENCODING;
153}
154
155unsafe impl RefEncode for MTLPrimitiveTopologyClass {
156 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
157}
158
159#[repr(transparent)]
162#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
163pub struct MTLTessellationPartitionMode(pub NSUInteger);
164impl MTLTessellationPartitionMode {
165 #[doc(alias = "MTLTessellationPartitionModePow2")]
166 pub const Pow2: Self = Self(0);
167 #[doc(alias = "MTLTessellationPartitionModeInteger")]
168 pub const Integer: Self = Self(1);
169 #[doc(alias = "MTLTessellationPartitionModeFractionalOdd")]
170 pub const FractionalOdd: Self = Self(2);
171 #[doc(alias = "MTLTessellationPartitionModeFractionalEven")]
172 pub const FractionalEven: Self = Self(3);
173}
174
175unsafe impl Encode for MTLTessellationPartitionMode {
176 const ENCODING: Encoding = NSUInteger::ENCODING;
177}
178
179unsafe impl RefEncode for MTLTessellationPartitionMode {
180 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
181}
182
183#[repr(transparent)]
186#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
187pub struct MTLTessellationFactorStepFunction(pub NSUInteger);
188impl MTLTessellationFactorStepFunction {
189 #[doc(alias = "MTLTessellationFactorStepFunctionConstant")]
190 pub const Constant: Self = Self(0);
191 #[doc(alias = "MTLTessellationFactorStepFunctionPerPatch")]
192 pub const PerPatch: Self = Self(1);
193 #[doc(alias = "MTLTessellationFactorStepFunctionPerInstance")]
194 pub const PerInstance: Self = Self(2);
195 #[doc(alias = "MTLTessellationFactorStepFunctionPerPatchAndPerInstance")]
196 pub const PerPatchAndPerInstance: Self = Self(3);
197}
198
199unsafe impl Encode for MTLTessellationFactorStepFunction {
200 const ENCODING: Encoding = NSUInteger::ENCODING;
201}
202
203unsafe impl RefEncode for MTLTessellationFactorStepFunction {
204 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
205}
206
207#[repr(transparent)]
210#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
211pub struct MTLTessellationFactorFormat(pub NSUInteger);
212impl MTLTessellationFactorFormat {
213 #[doc(alias = "MTLTessellationFactorFormatHalf")]
214 pub const Half: Self = Self(0);
215}
216
217unsafe impl Encode for MTLTessellationFactorFormat {
218 const ENCODING: Encoding = NSUInteger::ENCODING;
219}
220
221unsafe impl RefEncode for MTLTessellationFactorFormat {
222 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
223}
224
225#[repr(transparent)]
228#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
229pub struct MTLTessellationControlPointIndexType(pub NSUInteger);
230impl MTLTessellationControlPointIndexType {
231 #[doc(alias = "MTLTessellationControlPointIndexTypeNone")]
232 pub const None: Self = Self(0);
233 #[doc(alias = "MTLTessellationControlPointIndexTypeUInt16")]
234 pub const UInt16: Self = Self(1);
235 #[doc(alias = "MTLTessellationControlPointIndexTypeUInt32")]
236 pub const UInt32: Self = Self(2);
237}
238
239unsafe impl Encode for MTLTessellationControlPointIndexType {
240 const ENCODING: Encoding = NSUInteger::ENCODING;
241}
242
243unsafe impl RefEncode for MTLTessellationControlPointIndexType {
244 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
245}
246
247extern_class!(
248 #[unsafe(super(NSObject))]
250 #[derive(Debug, PartialEq, Eq, Hash)]
251 pub struct MTLRenderPipelineColorAttachmentDescriptor;
252);
253
254extern_conformance!(
255 unsafe impl NSCopying for MTLRenderPipelineColorAttachmentDescriptor {}
256);
257
258unsafe impl CopyingHelper for MTLRenderPipelineColorAttachmentDescriptor {
259 type Result = Self;
260}
261
262extern_conformance!(
263 unsafe impl NSObjectProtocol for MTLRenderPipelineColorAttachmentDescriptor {}
264);
265
266impl MTLRenderPipelineColorAttachmentDescriptor {
267 extern_methods!(
268 #[cfg(feature = "MTLPixelFormat")]
269 #[unsafe(method(pixelFormat))]
271 #[unsafe(method_family = none)]
272 pub fn pixelFormat(&self) -> MTLPixelFormat;
273
274 #[cfg(feature = "MTLPixelFormat")]
275 #[unsafe(method(setPixelFormat:))]
277 #[unsafe(method_family = none)]
278 pub fn setPixelFormat(&self, pixel_format: MTLPixelFormat);
279
280 #[unsafe(method(isBlendingEnabled))]
282 #[unsafe(method_family = none)]
283 pub fn isBlendingEnabled(&self) -> bool;
284
285 #[unsafe(method(setBlendingEnabled:))]
287 #[unsafe(method_family = none)]
288 pub fn setBlendingEnabled(&self, blending_enabled: bool);
289
290 #[unsafe(method(sourceRGBBlendFactor))]
292 #[unsafe(method_family = none)]
293 pub fn sourceRGBBlendFactor(&self) -> MTLBlendFactor;
294
295 #[unsafe(method(setSourceRGBBlendFactor:))]
297 #[unsafe(method_family = none)]
298 pub fn setSourceRGBBlendFactor(&self, source_rgb_blend_factor: MTLBlendFactor);
299
300 #[unsafe(method(destinationRGBBlendFactor))]
302 #[unsafe(method_family = none)]
303 pub fn destinationRGBBlendFactor(&self) -> MTLBlendFactor;
304
305 #[unsafe(method(setDestinationRGBBlendFactor:))]
307 #[unsafe(method_family = none)]
308 pub fn setDestinationRGBBlendFactor(&self, destination_rgb_blend_factor: MTLBlendFactor);
309
310 #[unsafe(method(rgbBlendOperation))]
312 #[unsafe(method_family = none)]
313 pub fn rgbBlendOperation(&self) -> MTLBlendOperation;
314
315 #[unsafe(method(setRgbBlendOperation:))]
317 #[unsafe(method_family = none)]
318 pub fn setRgbBlendOperation(&self, rgb_blend_operation: MTLBlendOperation);
319
320 #[unsafe(method(sourceAlphaBlendFactor))]
322 #[unsafe(method_family = none)]
323 pub fn sourceAlphaBlendFactor(&self) -> MTLBlendFactor;
324
325 #[unsafe(method(setSourceAlphaBlendFactor:))]
327 #[unsafe(method_family = none)]
328 pub fn setSourceAlphaBlendFactor(&self, source_alpha_blend_factor: MTLBlendFactor);
329
330 #[unsafe(method(destinationAlphaBlendFactor))]
332 #[unsafe(method_family = none)]
333 pub fn destinationAlphaBlendFactor(&self) -> MTLBlendFactor;
334
335 #[unsafe(method(setDestinationAlphaBlendFactor:))]
337 #[unsafe(method_family = none)]
338 pub fn setDestinationAlphaBlendFactor(
339 &self,
340 destination_alpha_blend_factor: MTLBlendFactor,
341 );
342
343 #[unsafe(method(alphaBlendOperation))]
345 #[unsafe(method_family = none)]
346 pub fn alphaBlendOperation(&self) -> MTLBlendOperation;
347
348 #[unsafe(method(setAlphaBlendOperation:))]
350 #[unsafe(method_family = none)]
351 pub fn setAlphaBlendOperation(&self, alpha_blend_operation: MTLBlendOperation);
352
353 #[unsafe(method(writeMask))]
355 #[unsafe(method_family = none)]
356 pub fn writeMask(&self) -> MTLColorWriteMask;
357
358 #[unsafe(method(setWriteMask:))]
360 #[unsafe(method_family = none)]
361 pub fn setWriteMask(&self, write_mask: MTLColorWriteMask);
362 );
363}
364
365impl MTLRenderPipelineColorAttachmentDescriptor {
367 extern_methods!(
368 #[unsafe(method(init))]
369 #[unsafe(method_family = init)]
370 pub fn init(this: Allocated<Self>) -> Retained<Self>;
371
372 #[unsafe(method(new))]
373 #[unsafe(method_family = new)]
374 pub fn new() -> Retained<Self>;
375 );
376}
377
378impl DefaultRetained for MTLRenderPipelineColorAttachmentDescriptor {
379 #[inline]
380 fn default_retained() -> Retained<Self> {
381 Self::new()
382 }
383}
384
385extern_class!(
386 #[unsafe(super(NSObject))]
390 #[derive(Debug, PartialEq, Eq, Hash)]
391 pub struct MTLLogicalToPhysicalColorAttachmentMap;
392);
393
394extern_conformance!(
395 unsafe impl NSCopying for MTLLogicalToPhysicalColorAttachmentMap {}
396);
397
398unsafe impl CopyingHelper for MTLLogicalToPhysicalColorAttachmentMap {
399 type Result = Self;
400}
401
402extern_conformance!(
403 unsafe impl NSObjectProtocol for MTLLogicalToPhysicalColorAttachmentMap {}
404);
405
406impl MTLLogicalToPhysicalColorAttachmentMap {
407 extern_methods!(
408 #[unsafe(method(setPhysicalIndex:forLogicalIndex:))]
419 #[unsafe(method_family = none)]
420 pub unsafe fn setPhysicalIndex_forLogicalIndex(
421 &self,
422 physical_index: NSUInteger,
423 logical_index: NSUInteger,
424 );
425
426 #[unsafe(method(getPhysicalIndexForLogicalIndex:))]
432 #[unsafe(method_family = none)]
433 pub unsafe fn getPhysicalIndexForLogicalIndex(
434 &self,
435 logical_index: NSUInteger,
436 ) -> NSUInteger;
437
438 #[unsafe(method(reset))]
439 #[unsafe(method_family = none)]
440 pub fn reset(&self);
441 );
442}
443
444impl MTLLogicalToPhysicalColorAttachmentMap {
446 extern_methods!(
447 #[unsafe(method(init))]
448 #[unsafe(method_family = init)]
449 pub fn init(this: Allocated<Self>) -> Retained<Self>;
450
451 #[unsafe(method(new))]
452 #[unsafe(method_family = new)]
453 pub fn new() -> Retained<Self>;
454 );
455}
456
457impl DefaultRetained for MTLLogicalToPhysicalColorAttachmentMap {
458 #[inline]
459 fn default_retained() -> Retained<Self> {
460 Self::new()
461 }
462}
463
464extern_class!(
465 #[unsafe(super(NSObject))]
467 #[derive(Debug, PartialEq, Eq, Hash)]
468 pub struct MTLRenderPipelineReflection;
469);
470
471unsafe impl Send for MTLRenderPipelineReflection {}
472
473unsafe impl Sync for MTLRenderPipelineReflection {}
474
475extern_conformance!(
476 unsafe impl NSObjectProtocol for MTLRenderPipelineReflection {}
477);
478
479impl MTLRenderPipelineReflection {
480 extern_methods!(
481 #[cfg(feature = "MTLArgument")]
482 #[unsafe(method(vertexBindings))]
483 #[unsafe(method_family = none)]
484 pub fn vertexBindings(&self) -> Retained<NSArray<ProtocolObject<dyn MTLBinding>>>;
485
486 #[cfg(feature = "MTLArgument")]
487 #[unsafe(method(fragmentBindings))]
488 #[unsafe(method_family = none)]
489 pub fn fragmentBindings(&self) -> Retained<NSArray<ProtocolObject<dyn MTLBinding>>>;
490
491 #[cfg(feature = "MTLArgument")]
492 #[unsafe(method(tileBindings))]
493 #[unsafe(method_family = none)]
494 pub fn tileBindings(&self) -> Retained<NSArray<ProtocolObject<dyn MTLBinding>>>;
495
496 #[cfg(feature = "MTLArgument")]
497 #[unsafe(method(objectBindings))]
498 #[unsafe(method_family = none)]
499 pub fn objectBindings(&self) -> Retained<NSArray<ProtocolObject<dyn MTLBinding>>>;
500
501 #[cfg(feature = "MTLArgument")]
502 #[unsafe(method(meshBindings))]
503 #[unsafe(method_family = none)]
504 pub fn meshBindings(&self) -> Retained<NSArray<ProtocolObject<dyn MTLBinding>>>;
505
506 #[cfg(feature = "MTLArgument")]
507 #[deprecated]
508 #[unsafe(method(vertexArguments))]
509 #[unsafe(method_family = none)]
510 pub fn vertexArguments(&self) -> Option<Retained<NSArray<MTLArgument>>>;
511
512 #[cfg(feature = "MTLArgument")]
513 #[deprecated]
514 #[unsafe(method(fragmentArguments))]
515 #[unsafe(method_family = none)]
516 pub fn fragmentArguments(&self) -> Option<Retained<NSArray<MTLArgument>>>;
517
518 #[cfg(feature = "MTLArgument")]
519 #[deprecated]
520 #[unsafe(method(tileArguments))]
521 #[unsafe(method_family = none)]
522 pub fn tileArguments(&self) -> Option<Retained<NSArray<MTLArgument>>>;
523 );
524}
525
526impl MTLRenderPipelineReflection {
528 extern_methods!(
529 #[unsafe(method(init))]
530 #[unsafe(method_family = init)]
531 pub fn init(this: Allocated<Self>) -> Retained<Self>;
532
533 #[unsafe(method(new))]
534 #[unsafe(method_family = new)]
535 pub fn new() -> Retained<Self>;
536 );
537}
538
539impl DefaultRetained for MTLRenderPipelineReflection {
540 #[inline]
541 fn default_retained() -> Retained<Self> {
542 Self::new()
543 }
544}
545
546extern_class!(
547 #[unsafe(super(NSObject))]
549 #[derive(Debug, PartialEq, Eq, Hash)]
550 pub struct MTLRenderPipelineDescriptor;
551);
552
553extern_conformance!(
554 unsafe impl NSCopying for MTLRenderPipelineDescriptor {}
555);
556
557unsafe impl CopyingHelper for MTLRenderPipelineDescriptor {
558 type Result = Self;
559}
560
561extern_conformance!(
562 unsafe impl NSObjectProtocol for MTLRenderPipelineDescriptor {}
563);
564
565impl MTLRenderPipelineDescriptor {
566 extern_methods!(
567 #[unsafe(method(label))]
568 #[unsafe(method_family = none)]
569 pub fn label(&self) -> Option<Retained<NSString>>;
570
571 #[unsafe(method(setLabel:))]
575 #[unsafe(method_family = none)]
576 pub fn setLabel(&self, label: Option<&NSString>);
577
578 #[cfg(feature = "MTLLibrary")]
579 #[unsafe(method(vertexFunction))]
580 #[unsafe(method_family = none)]
581 pub fn vertexFunction(&self) -> Option<Retained<ProtocolObject<dyn MTLFunction>>>;
582
583 #[cfg(feature = "MTLLibrary")]
584 #[unsafe(method(setVertexFunction:))]
586 #[unsafe(method_family = none)]
587 pub fn setVertexFunction(&self, vertex_function: Option<&ProtocolObject<dyn MTLFunction>>);
588
589 #[cfg(feature = "MTLLibrary")]
590 #[unsafe(method(fragmentFunction))]
591 #[unsafe(method_family = none)]
592 pub fn fragmentFunction(&self) -> Option<Retained<ProtocolObject<dyn MTLFunction>>>;
593
594 #[cfg(feature = "MTLLibrary")]
595 #[unsafe(method(setFragmentFunction:))]
597 #[unsafe(method_family = none)]
598 pub fn setFragmentFunction(
599 &self,
600 fragment_function: Option<&ProtocolObject<dyn MTLFunction>>,
601 );
602
603 #[cfg(feature = "MTLVertexDescriptor")]
604 #[unsafe(method(vertexDescriptor))]
605 #[unsafe(method_family = none)]
606 pub fn vertexDescriptor(&self) -> Option<Retained<MTLVertexDescriptor>>;
607
608 #[cfg(feature = "MTLVertexDescriptor")]
609 #[unsafe(method(setVertexDescriptor:))]
613 #[unsafe(method_family = none)]
614 pub fn setVertexDescriptor(&self, vertex_descriptor: Option<&MTLVertexDescriptor>);
615
616 #[deprecated]
617 #[unsafe(method(sampleCount))]
618 #[unsafe(method_family = none)]
619 pub fn sampleCount(&self) -> NSUInteger;
620
621 #[deprecated]
623 #[unsafe(method(setSampleCount:))]
624 #[unsafe(method_family = none)]
625 pub fn setSampleCount(&self, sample_count: NSUInteger);
626
627 #[unsafe(method(rasterSampleCount))]
628 #[unsafe(method_family = none)]
629 pub fn rasterSampleCount(&self) -> NSUInteger;
630
631 #[unsafe(method(setRasterSampleCount:))]
633 #[unsafe(method_family = none)]
634 pub fn setRasterSampleCount(&self, raster_sample_count: NSUInteger);
635
636 #[unsafe(method(isAlphaToCoverageEnabled))]
637 #[unsafe(method_family = none)]
638 pub fn isAlphaToCoverageEnabled(&self) -> bool;
639
640 #[unsafe(method(setAlphaToCoverageEnabled:))]
642 #[unsafe(method_family = none)]
643 pub fn setAlphaToCoverageEnabled(&self, alpha_to_coverage_enabled: bool);
644
645 #[unsafe(method(isAlphaToOneEnabled))]
646 #[unsafe(method_family = none)]
647 pub fn isAlphaToOneEnabled(&self) -> bool;
648
649 #[unsafe(method(setAlphaToOneEnabled:))]
651 #[unsafe(method_family = none)]
652 pub fn setAlphaToOneEnabled(&self, alpha_to_one_enabled: bool);
653
654 #[unsafe(method(isRasterizationEnabled))]
655 #[unsafe(method_family = none)]
656 pub fn isRasterizationEnabled(&self) -> bool;
657
658 #[unsafe(method(setRasterizationEnabled:))]
660 #[unsafe(method_family = none)]
661 pub fn setRasterizationEnabled(&self, rasterization_enabled: bool);
662
663 #[unsafe(method(maxVertexAmplificationCount))]
664 #[unsafe(method_family = none)]
665 pub fn maxVertexAmplificationCount(&self) -> NSUInteger;
666
667 #[unsafe(method(setMaxVertexAmplificationCount:))]
673 #[unsafe(method_family = none)]
674 pub unsafe fn setMaxVertexAmplificationCount(
675 &self,
676 max_vertex_amplification_count: NSUInteger,
677 );
678
679 #[unsafe(method(colorAttachments))]
680 #[unsafe(method_family = none)]
681 pub fn colorAttachments(&self)
682 -> Retained<MTLRenderPipelineColorAttachmentDescriptorArray>;
683
684 #[cfg(feature = "MTLPixelFormat")]
685 #[unsafe(method(depthAttachmentPixelFormat))]
686 #[unsafe(method_family = none)]
687 pub fn depthAttachmentPixelFormat(&self) -> MTLPixelFormat;
688
689 #[cfg(feature = "MTLPixelFormat")]
690 #[unsafe(method(setDepthAttachmentPixelFormat:))]
692 #[unsafe(method_family = none)]
693 pub fn setDepthAttachmentPixelFormat(&self, depth_attachment_pixel_format: MTLPixelFormat);
694
695 #[cfg(feature = "MTLPixelFormat")]
696 #[unsafe(method(stencilAttachmentPixelFormat))]
697 #[unsafe(method_family = none)]
698 pub fn stencilAttachmentPixelFormat(&self) -> MTLPixelFormat;
699
700 #[cfg(feature = "MTLPixelFormat")]
701 #[unsafe(method(setStencilAttachmentPixelFormat:))]
703 #[unsafe(method_family = none)]
704 pub fn setStencilAttachmentPixelFormat(
705 &self,
706 stencil_attachment_pixel_format: MTLPixelFormat,
707 );
708
709 #[unsafe(method(inputPrimitiveTopology))]
710 #[unsafe(method_family = none)]
711 pub fn inputPrimitiveTopology(&self) -> MTLPrimitiveTopologyClass;
712
713 #[unsafe(method(setInputPrimitiveTopology:))]
715 #[unsafe(method_family = none)]
716 pub unsafe fn setInputPrimitiveTopology(
717 &self,
718 input_primitive_topology: MTLPrimitiveTopologyClass,
719 );
720
721 #[unsafe(method(tessellationPartitionMode))]
722 #[unsafe(method_family = none)]
723 pub fn tessellationPartitionMode(&self) -> MTLTessellationPartitionMode;
724
725 #[unsafe(method(setTessellationPartitionMode:))]
727 #[unsafe(method_family = none)]
728 pub unsafe fn setTessellationPartitionMode(
729 &self,
730 tessellation_partition_mode: MTLTessellationPartitionMode,
731 );
732
733 #[unsafe(method(maxTessellationFactor))]
734 #[unsafe(method_family = none)]
735 pub fn maxTessellationFactor(&self) -> NSUInteger;
736
737 #[unsafe(method(setMaxTessellationFactor:))]
739 #[unsafe(method_family = none)]
740 pub unsafe fn setMaxTessellationFactor(&self, max_tessellation_factor: NSUInteger);
741
742 #[unsafe(method(isTessellationFactorScaleEnabled))]
743 #[unsafe(method_family = none)]
744 pub fn isTessellationFactorScaleEnabled(&self) -> bool;
745
746 #[unsafe(method(setTessellationFactorScaleEnabled:))]
748 #[unsafe(method_family = none)]
749 pub fn setTessellationFactorScaleEnabled(&self, tessellation_factor_scale_enabled: bool);
750
751 #[unsafe(method(tessellationFactorFormat))]
752 #[unsafe(method_family = none)]
753 pub fn tessellationFactorFormat(&self) -> MTLTessellationFactorFormat;
754
755 #[unsafe(method(setTessellationFactorFormat:))]
757 #[unsafe(method_family = none)]
758 pub fn setTessellationFactorFormat(
759 &self,
760 tessellation_factor_format: MTLTessellationFactorFormat,
761 );
762
763 #[unsafe(method(tessellationControlPointIndexType))]
764 #[unsafe(method_family = none)]
765 pub fn tessellationControlPointIndexType(&self) -> MTLTessellationControlPointIndexType;
766
767 #[unsafe(method(setTessellationControlPointIndexType:))]
769 #[unsafe(method_family = none)]
770 pub unsafe fn setTessellationControlPointIndexType(
771 &self,
772 tessellation_control_point_index_type: MTLTessellationControlPointIndexType,
773 );
774
775 #[unsafe(method(tessellationFactorStepFunction))]
776 #[unsafe(method_family = none)]
777 pub fn tessellationFactorStepFunction(&self) -> MTLTessellationFactorStepFunction;
778
779 #[unsafe(method(setTessellationFactorStepFunction:))]
781 #[unsafe(method_family = none)]
782 pub fn setTessellationFactorStepFunction(
783 &self,
784 tessellation_factor_step_function: MTLTessellationFactorStepFunction,
785 );
786
787 #[cfg(feature = "MTLRenderCommandEncoder")]
788 #[unsafe(method(tessellationOutputWindingOrder))]
789 #[unsafe(method_family = none)]
790 pub fn tessellationOutputWindingOrder(&self) -> MTLWinding;
791
792 #[cfg(feature = "MTLRenderCommandEncoder")]
793 #[unsafe(method(setTessellationOutputWindingOrder:))]
795 #[unsafe(method_family = none)]
796 pub fn setTessellationOutputWindingOrder(
797 &self,
798 tessellation_output_winding_order: MTLWinding,
799 );
800
801 #[cfg(feature = "MTLPipeline")]
802 #[unsafe(method(vertexBuffers))]
803 #[unsafe(method_family = none)]
804 pub fn vertexBuffers(&self) -> Retained<MTLPipelineBufferDescriptorArray>;
805
806 #[cfg(feature = "MTLPipeline")]
807 #[unsafe(method(fragmentBuffers))]
808 #[unsafe(method_family = none)]
809 pub fn fragmentBuffers(&self) -> Retained<MTLPipelineBufferDescriptorArray>;
810
811 #[unsafe(method(supportIndirectCommandBuffers))]
812 #[unsafe(method_family = none)]
813 pub fn supportIndirectCommandBuffers(&self) -> bool;
814
815 #[unsafe(method(setSupportIndirectCommandBuffers:))]
817 #[unsafe(method_family = none)]
818 pub fn setSupportIndirectCommandBuffers(&self, support_indirect_command_buffers: bool);
819
820 #[cfg(feature = "MTLBinaryArchive")]
821 #[unsafe(method(binaryArchives))]
827 #[unsafe(method_family = none)]
828 pub fn binaryArchives(
829 &self,
830 ) -> Option<Retained<NSArray<ProtocolObject<dyn MTLBinaryArchive>>>>;
831
832 #[cfg(feature = "MTLBinaryArchive")]
833 #[unsafe(method(setBinaryArchives:))]
837 #[unsafe(method_family = none)]
838 pub fn setBinaryArchives(
839 &self,
840 binary_archives: Option<&NSArray<ProtocolObject<dyn MTLBinaryArchive>>>,
841 );
842
843 #[cfg(feature = "MTLDynamicLibrary")]
844 #[unsafe(method(vertexPreloadedLibraries))]
852 #[unsafe(method_family = none)]
853 pub fn vertexPreloadedLibraries(
854 &self,
855 ) -> Retained<NSArray<ProtocolObject<dyn MTLDynamicLibrary>>>;
856
857 #[cfg(feature = "MTLDynamicLibrary")]
858 #[unsafe(method(setVertexPreloadedLibraries:))]
862 #[unsafe(method_family = none)]
863 pub fn setVertexPreloadedLibraries(
864 &self,
865 vertex_preloaded_libraries: &NSArray<ProtocolObject<dyn MTLDynamicLibrary>>,
866 );
867
868 #[cfg(feature = "MTLDynamicLibrary")]
869 #[unsafe(method(fragmentPreloadedLibraries))]
877 #[unsafe(method_family = none)]
878 pub fn fragmentPreloadedLibraries(
879 &self,
880 ) -> Retained<NSArray<ProtocolObject<dyn MTLDynamicLibrary>>>;
881
882 #[cfg(feature = "MTLDynamicLibrary")]
883 #[unsafe(method(setFragmentPreloadedLibraries:))]
887 #[unsafe(method_family = none)]
888 pub fn setFragmentPreloadedLibraries(
889 &self,
890 fragment_preloaded_libraries: &NSArray<ProtocolObject<dyn MTLDynamicLibrary>>,
891 );
892
893 #[cfg(feature = "MTLLinkedFunctions")]
894 #[unsafe(method(vertexLinkedFunctions))]
898 #[unsafe(method_family = none)]
899 pub fn vertexLinkedFunctions(&self) -> Retained<MTLLinkedFunctions>;
900
901 #[cfg(feature = "MTLLinkedFunctions")]
902 #[unsafe(method(setVertexLinkedFunctions:))]
906 #[unsafe(method_family = none)]
907 pub fn setVertexLinkedFunctions(
908 &self,
909 vertex_linked_functions: Option<&MTLLinkedFunctions>,
910 );
911
912 #[cfg(feature = "MTLLinkedFunctions")]
913 #[unsafe(method(fragmentLinkedFunctions))]
917 #[unsafe(method_family = none)]
918 pub fn fragmentLinkedFunctions(&self) -> Retained<MTLLinkedFunctions>;
919
920 #[cfg(feature = "MTLLinkedFunctions")]
921 #[unsafe(method(setFragmentLinkedFunctions:))]
925 #[unsafe(method_family = none)]
926 pub fn setFragmentLinkedFunctions(
927 &self,
928 fragment_linked_functions: Option<&MTLLinkedFunctions>,
929 );
930
931 #[unsafe(method(supportAddingVertexBinaryFunctions))]
933 #[unsafe(method_family = none)]
934 pub fn supportAddingVertexBinaryFunctions(&self) -> bool;
935
936 #[unsafe(method(setSupportAddingVertexBinaryFunctions:))]
938 #[unsafe(method_family = none)]
939 pub fn setSupportAddingVertexBinaryFunctions(
940 &self,
941 support_adding_vertex_binary_functions: bool,
942 );
943
944 #[unsafe(method(supportAddingFragmentBinaryFunctions))]
946 #[unsafe(method_family = none)]
947 pub fn supportAddingFragmentBinaryFunctions(&self) -> bool;
948
949 #[unsafe(method(setSupportAddingFragmentBinaryFunctions:))]
951 #[unsafe(method_family = none)]
952 pub fn setSupportAddingFragmentBinaryFunctions(
953 &self,
954 support_adding_fragment_binary_functions: bool,
955 );
956
957 #[unsafe(method(maxVertexCallStackDepth))]
959 #[unsafe(method_family = none)]
960 pub fn maxVertexCallStackDepth(&self) -> NSUInteger;
961
962 #[unsafe(method(setMaxVertexCallStackDepth:))]
964 #[unsafe(method_family = none)]
965 pub fn setMaxVertexCallStackDepth(&self, max_vertex_call_stack_depth: NSUInteger);
966
967 #[unsafe(method(maxFragmentCallStackDepth))]
969 #[unsafe(method_family = none)]
970 pub fn maxFragmentCallStackDepth(&self) -> NSUInteger;
971
972 #[unsafe(method(setMaxFragmentCallStackDepth:))]
974 #[unsafe(method_family = none)]
975 pub fn setMaxFragmentCallStackDepth(&self, max_fragment_call_stack_depth: NSUInteger);
976
977 #[unsafe(method(reset))]
979 #[unsafe(method_family = none)]
980 pub fn reset(&self);
981
982 #[cfg(feature = "MTLPipeline")]
983 #[unsafe(method(shaderValidation))]
987 #[unsafe(method_family = none)]
988 pub fn shaderValidation(&self) -> MTLShaderValidation;
989
990 #[cfg(feature = "MTLPipeline")]
991 #[unsafe(method(setShaderValidation:))]
993 #[unsafe(method_family = none)]
994 pub fn setShaderValidation(&self, shader_validation: MTLShaderValidation);
995 );
996}
997
998impl MTLRenderPipelineDescriptor {
1000 extern_methods!(
1001 #[unsafe(method(init))]
1002 #[unsafe(method_family = init)]
1003 pub fn init(this: Allocated<Self>) -> Retained<Self>;
1004
1005 #[unsafe(method(new))]
1006 #[unsafe(method_family = new)]
1007 pub fn new() -> Retained<Self>;
1008 );
1009}
1010
1011impl DefaultRetained for MTLRenderPipelineDescriptor {
1012 #[inline]
1013 fn default_retained() -> Retained<Self> {
1014 Self::new()
1015 }
1016}
1017
1018extern_class!(
1019 #[unsafe(super(NSObject))]
1021 #[derive(Debug, PartialEq, Eq, Hash)]
1022 pub struct MTLRenderPipelineFunctionsDescriptor;
1023);
1024
1025extern_conformance!(
1026 unsafe impl NSCopying for MTLRenderPipelineFunctionsDescriptor {}
1027);
1028
1029unsafe impl CopyingHelper for MTLRenderPipelineFunctionsDescriptor {
1030 type Result = Self;
1031}
1032
1033extern_conformance!(
1034 unsafe impl NSObjectProtocol for MTLRenderPipelineFunctionsDescriptor {}
1035);
1036
1037impl MTLRenderPipelineFunctionsDescriptor {
1038 extern_methods!(
1039 #[cfg(feature = "MTLLibrary")]
1040 #[unsafe(method(vertexAdditionalBinaryFunctions))]
1042 #[unsafe(method_family = none)]
1043 pub fn vertexAdditionalBinaryFunctions(
1044 &self,
1045 ) -> Option<Retained<NSArray<ProtocolObject<dyn MTLFunction>>>>;
1046
1047 #[cfg(feature = "MTLLibrary")]
1048 #[unsafe(method(setVertexAdditionalBinaryFunctions:))]
1057 #[unsafe(method_family = none)]
1058 pub unsafe fn setVertexAdditionalBinaryFunctions(
1059 &self,
1060 vertex_additional_binary_functions: Option<&NSArray<ProtocolObject<dyn MTLFunction>>>,
1061 );
1062
1063 #[cfg(feature = "MTLLibrary")]
1064 #[unsafe(method(fragmentAdditionalBinaryFunctions))]
1066 #[unsafe(method_family = none)]
1067 pub fn fragmentAdditionalBinaryFunctions(
1068 &self,
1069 ) -> Option<Retained<NSArray<ProtocolObject<dyn MTLFunction>>>>;
1070
1071 #[cfg(feature = "MTLLibrary")]
1072 #[unsafe(method(setFragmentAdditionalBinaryFunctions:))]
1081 #[unsafe(method_family = none)]
1082 pub unsafe fn setFragmentAdditionalBinaryFunctions(
1083 &self,
1084 fragment_additional_binary_functions: Option<&NSArray<ProtocolObject<dyn MTLFunction>>>,
1085 );
1086
1087 #[cfg(feature = "MTLLibrary")]
1088 #[unsafe(method(tileAdditionalBinaryFunctions))]
1090 #[unsafe(method_family = none)]
1091 pub fn tileAdditionalBinaryFunctions(
1092 &self,
1093 ) -> Option<Retained<NSArray<ProtocolObject<dyn MTLFunction>>>>;
1094
1095 #[cfg(feature = "MTLLibrary")]
1096 #[unsafe(method(setTileAdditionalBinaryFunctions:))]
1105 #[unsafe(method_family = none)]
1106 pub unsafe fn setTileAdditionalBinaryFunctions(
1107 &self,
1108 tile_additional_binary_functions: Option<&NSArray<ProtocolObject<dyn MTLFunction>>>,
1109 );
1110 );
1111}
1112
1113impl MTLRenderPipelineFunctionsDescriptor {
1115 extern_methods!(
1116 #[unsafe(method(init))]
1117 #[unsafe(method_family = init)]
1118 pub fn init(this: Allocated<Self>) -> Retained<Self>;
1119
1120 #[unsafe(method(new))]
1121 #[unsafe(method_family = new)]
1122 pub fn new() -> Retained<Self>;
1123 );
1124}
1125
1126impl DefaultRetained for MTLRenderPipelineFunctionsDescriptor {
1127 #[inline]
1128 fn default_retained() -> Retained<Self> {
1129 Self::new()
1130 }
1131}
1132
1133extern_protocol!(
1134 #[cfg(feature = "MTLAllocation")]
1141 pub unsafe trait MTLRenderPipelineState:
1142 MTLAllocation + NSObjectProtocol + Send + Sync
1143 {
1144 #[unsafe(method(label))]
1145 #[unsafe(method_family = none)]
1146 fn label(&self) -> Option<Retained<NSString>>;
1147
1148 #[cfg(feature = "MTLDevice")]
1149 #[unsafe(method(device))]
1150 #[unsafe(method_family = none)]
1151 fn device(&self) -> Retained<ProtocolObject<dyn MTLDevice>>;
1152
1153 #[unsafe(method(reflection))]
1157 #[unsafe(method_family = none)]
1158 fn reflection(&self) -> Option<Retained<MTLRenderPipelineReflection>>;
1159
1160 #[cfg(all(feature = "MTLFunctionHandle", feature = "MTLRenderCommandEncoder"))]
1161 #[unsafe(method(functionHandleWithName:stage:))]
1169 #[unsafe(method_family = none)]
1170 fn functionHandleWithName_stage(
1171 &self,
1172 name: &NSString,
1173 stage: MTLRenderStages,
1174 ) -> Option<Retained<ProtocolObject<dyn MTLFunctionHandle>>>;
1175
1176 #[cfg(all(
1177 feature = "MTL4BinaryFunction",
1178 feature = "MTLFunctionHandle",
1179 feature = "MTLRenderCommandEncoder"
1180 ))]
1181 #[unsafe(method(functionHandleWithBinaryFunction:stage:))]
1189 #[unsafe(method_family = none)]
1190 fn functionHandleWithBinaryFunction_stage(
1191 &self,
1192 function: &ProtocolObject<dyn MTL4BinaryFunction>,
1193 stage: MTLRenderStages,
1194 ) -> Option<Retained<ProtocolObject<dyn MTLFunctionHandle>>>;
1195
1196 #[cfg(feature = "MTL4RenderPipeline")]
1197 #[unsafe(method(newRenderPipelineStateWithBinaryFunctions:error:_))]
1206 #[unsafe(method_family = new)]
1207 fn newRenderPipelineStateWithBinaryFunctions_error(
1208 &self,
1209 binary_functions_descriptor: &MTL4RenderPipelineBinaryFunctionsDescriptor,
1210 ) -> Result<Retained<ProtocolObject<dyn MTLRenderPipelineState>>, Retained<NSError>>;
1211
1212 #[cfg(feature = "MTL4PipelineState")]
1213 #[unsafe(method(newRenderPipelineDescriptorForSpecialization))]
1231 #[unsafe(method_family = new)]
1232 fn newRenderPipelineDescriptorForSpecialization(&self) -> Retained<MTL4PipelineDescriptor>;
1233
1234 #[unsafe(method(maxTotalThreadsPerThreadgroup))]
1236 #[unsafe(method_family = none)]
1237 fn maxTotalThreadsPerThreadgroup(&self) -> NSUInteger;
1238
1239 #[unsafe(method(threadgroupSizeMatchesTileSize))]
1241 #[unsafe(method_family = none)]
1242 fn threadgroupSizeMatchesTileSize(&self) -> bool;
1243
1244 #[unsafe(method(imageblockSampleLength))]
1246 #[unsafe(method_family = none)]
1247 fn imageblockSampleLength(&self) -> NSUInteger;
1248
1249 #[cfg(feature = "MTLTypes")]
1250 #[unsafe(method(imageblockMemoryLengthForDimensions:))]
1252 #[unsafe(method_family = none)]
1253 fn imageblockMemoryLengthForDimensions(&self, imageblock_dimensions: MTLSize)
1254 -> NSUInteger;
1255
1256 #[unsafe(method(supportIndirectCommandBuffers))]
1257 #[unsafe(method_family = none)]
1258 fn supportIndirectCommandBuffers(&self) -> bool;
1259
1260 #[unsafe(method(maxTotalThreadsPerObjectThreadgroup))]
1264 #[unsafe(method_family = none)]
1265 fn maxTotalThreadsPerObjectThreadgroup(&self) -> NSUInteger;
1266
1267 #[unsafe(method(maxTotalThreadsPerMeshThreadgroup))]
1271 #[unsafe(method_family = none)]
1272 fn maxTotalThreadsPerMeshThreadgroup(&self) -> NSUInteger;
1273
1274 #[unsafe(method(objectThreadExecutionWidth))]
1278 #[unsafe(method_family = none)]
1279 fn objectThreadExecutionWidth(&self) -> NSUInteger;
1280
1281 #[unsafe(method(meshThreadExecutionWidth))]
1285 #[unsafe(method_family = none)]
1286 fn meshThreadExecutionWidth(&self) -> NSUInteger;
1287
1288 #[unsafe(method(maxTotalThreadgroupsPerMeshGrid))]
1292 #[unsafe(method_family = none)]
1293 fn maxTotalThreadgroupsPerMeshGrid(&self) -> NSUInteger;
1294
1295 #[cfg(feature = "MTLTypes")]
1296 #[unsafe(method(gpuResourceID))]
1298 #[unsafe(method_family = none)]
1299 fn gpuResourceID(&self) -> MTLResourceID;
1300
1301 #[cfg(all(
1302 feature = "MTLFunctionHandle",
1303 feature = "MTLLibrary",
1304 feature = "MTLRenderCommandEncoder"
1305 ))]
1306 #[unsafe(method(functionHandleWithFunction:stage:))]
1313 #[unsafe(method_family = none)]
1314 unsafe fn functionHandleWithFunction_stage(
1315 &self,
1316 function: &ProtocolObject<dyn MTLFunction>,
1317 stage: MTLRenderStages,
1318 ) -> Option<Retained<ProtocolObject<dyn MTLFunctionHandle>>>;
1319
1320 #[cfg(all(
1321 feature = "MTLRenderCommandEncoder",
1322 feature = "MTLResource",
1323 feature = "MTLVisibleFunctionTable"
1324 ))]
1325 #[unsafe(method(newVisibleFunctionTableWithDescriptor:stage:))]
1327 #[unsafe(method_family = new)]
1328 fn newVisibleFunctionTableWithDescriptor_stage(
1329 &self,
1330 descriptor: &MTLVisibleFunctionTableDescriptor,
1331 stage: MTLRenderStages,
1332 ) -> Option<Retained<ProtocolObject<dyn MTLVisibleFunctionTable>>>;
1333
1334 #[cfg(all(
1335 feature = "MTLIntersectionFunctionTable",
1336 feature = "MTLRenderCommandEncoder",
1337 feature = "MTLResource"
1338 ))]
1339 #[unsafe(method(newIntersectionFunctionTableWithDescriptor:stage:))]
1341 #[unsafe(method_family = new)]
1342 fn newIntersectionFunctionTableWithDescriptor_stage(
1343 &self,
1344 descriptor: &MTLIntersectionFunctionTableDescriptor,
1345 stage: MTLRenderStages,
1346 ) -> Option<Retained<ProtocolObject<dyn MTLIntersectionFunctionTable>>>;
1347
1348 #[unsafe(method(newRenderPipelineStateWithAdditionalBinaryFunctions:error:_))]
1350 #[unsafe(method_family = new)]
1351 fn newRenderPipelineStateWithAdditionalBinaryFunctions_error(
1352 &self,
1353 additional_binary_functions: &MTLRenderPipelineFunctionsDescriptor,
1354 ) -> Result<Retained<ProtocolObject<dyn MTLRenderPipelineState>>, Retained<NSError>>;
1355
1356 #[cfg(feature = "MTLPipeline")]
1357 #[unsafe(method(shaderValidation))]
1365 #[unsafe(method_family = none)]
1366 unsafe fn shaderValidation(&self) -> MTLShaderValidation;
1367
1368 #[cfg(feature = "MTLTypes")]
1369 #[unsafe(method(requiredThreadsPerTileThreadgroup))]
1371 #[unsafe(method_family = none)]
1372 fn requiredThreadsPerTileThreadgroup(&self) -> MTLSize;
1373
1374 #[cfg(feature = "MTLTypes")]
1375 #[unsafe(method(requiredThreadsPerObjectThreadgroup))]
1379 #[unsafe(method_family = none)]
1380 fn requiredThreadsPerObjectThreadgroup(&self) -> MTLSize;
1381
1382 #[cfg(feature = "MTLTypes")]
1383 #[unsafe(method(requiredThreadsPerMeshThreadgroup))]
1387 #[unsafe(method_family = none)]
1388 fn requiredThreadsPerMeshThreadgroup(&self) -> MTLSize;
1389 }
1390);
1391
1392extern_class!(
1393 #[unsafe(super(NSObject))]
1395 #[derive(Debug, PartialEq, Eq, Hash)]
1396 pub struct MTLRenderPipelineColorAttachmentDescriptorArray;
1397);
1398
1399extern_conformance!(
1400 unsafe impl NSObjectProtocol for MTLRenderPipelineColorAttachmentDescriptorArray {}
1401);
1402
1403impl MTLRenderPipelineColorAttachmentDescriptorArray {
1404 extern_methods!(
1405 #[unsafe(method(objectAtIndexedSubscript:))]
1409 #[unsafe(method_family = none)]
1410 pub unsafe fn objectAtIndexedSubscript(
1411 &self,
1412 attachment_index: NSUInteger,
1413 ) -> Retained<MTLRenderPipelineColorAttachmentDescriptor>;
1414
1415 #[unsafe(method(setObject:atIndexedSubscript:))]
1419 #[unsafe(method_family = none)]
1420 pub unsafe fn setObject_atIndexedSubscript(
1421 &self,
1422 attachment: Option<&MTLRenderPipelineColorAttachmentDescriptor>,
1423 attachment_index: NSUInteger,
1424 );
1425 );
1426}
1427
1428impl MTLRenderPipelineColorAttachmentDescriptorArray {
1430 extern_methods!(
1431 #[unsafe(method(init))]
1432 #[unsafe(method_family = init)]
1433 pub fn init(this: Allocated<Self>) -> Retained<Self>;
1434
1435 #[unsafe(method(new))]
1436 #[unsafe(method_family = new)]
1437 pub fn new() -> Retained<Self>;
1438 );
1439}
1440
1441impl DefaultRetained for MTLRenderPipelineColorAttachmentDescriptorArray {
1442 #[inline]
1443 fn default_retained() -> Retained<Self> {
1444 Self::new()
1445 }
1446}
1447
1448extern_class!(
1449 #[unsafe(super(NSObject))]
1451 #[derive(Debug, PartialEq, Eq, Hash)]
1452 pub struct MTLTileRenderPipelineColorAttachmentDescriptor;
1453);
1454
1455extern_conformance!(
1456 unsafe impl NSCopying for MTLTileRenderPipelineColorAttachmentDescriptor {}
1457);
1458
1459unsafe impl CopyingHelper for MTLTileRenderPipelineColorAttachmentDescriptor {
1460 type Result = Self;
1461}
1462
1463extern_conformance!(
1464 unsafe impl NSObjectProtocol for MTLTileRenderPipelineColorAttachmentDescriptor {}
1465);
1466
1467impl MTLTileRenderPipelineColorAttachmentDescriptor {
1468 extern_methods!(
1469 #[cfg(feature = "MTLPixelFormat")]
1470 #[unsafe(method(pixelFormat))]
1472 #[unsafe(method_family = none)]
1473 pub fn pixelFormat(&self) -> MTLPixelFormat;
1474
1475 #[cfg(feature = "MTLPixelFormat")]
1476 #[unsafe(method(setPixelFormat:))]
1478 #[unsafe(method_family = none)]
1479 pub fn setPixelFormat(&self, pixel_format: MTLPixelFormat);
1480 );
1481}
1482
1483impl MTLTileRenderPipelineColorAttachmentDescriptor {
1485 extern_methods!(
1486 #[unsafe(method(init))]
1487 #[unsafe(method_family = init)]
1488 pub fn init(this: Allocated<Self>) -> Retained<Self>;
1489
1490 #[unsafe(method(new))]
1491 #[unsafe(method_family = new)]
1492 pub fn new() -> Retained<Self>;
1493 );
1494}
1495
1496impl DefaultRetained for MTLTileRenderPipelineColorAttachmentDescriptor {
1497 #[inline]
1498 fn default_retained() -> Retained<Self> {
1499 Self::new()
1500 }
1501}
1502
1503extern_class!(
1504 #[unsafe(super(NSObject))]
1506 #[derive(Debug, PartialEq, Eq, Hash)]
1507 pub struct MTLTileRenderPipelineColorAttachmentDescriptorArray;
1508);
1509
1510extern_conformance!(
1511 unsafe impl NSObjectProtocol for MTLTileRenderPipelineColorAttachmentDescriptorArray {}
1512);
1513
1514impl MTLTileRenderPipelineColorAttachmentDescriptorArray {
1515 extern_methods!(
1516 #[unsafe(method(objectAtIndexedSubscript:))]
1520 #[unsafe(method_family = none)]
1521 pub unsafe fn objectAtIndexedSubscript(
1522 &self,
1523 attachment_index: NSUInteger,
1524 ) -> Retained<MTLTileRenderPipelineColorAttachmentDescriptor>;
1525
1526 #[unsafe(method(setObject:atIndexedSubscript:))]
1530 #[unsafe(method_family = none)]
1531 pub unsafe fn setObject_atIndexedSubscript(
1532 &self,
1533 attachment: &MTLTileRenderPipelineColorAttachmentDescriptor,
1534 attachment_index: NSUInteger,
1535 );
1536 );
1537}
1538
1539impl MTLTileRenderPipelineColorAttachmentDescriptorArray {
1541 extern_methods!(
1542 #[unsafe(method(init))]
1543 #[unsafe(method_family = init)]
1544 pub fn init(this: Allocated<Self>) -> Retained<Self>;
1545
1546 #[unsafe(method(new))]
1547 #[unsafe(method_family = new)]
1548 pub fn new() -> Retained<Self>;
1549 );
1550}
1551
1552impl DefaultRetained for MTLTileRenderPipelineColorAttachmentDescriptorArray {
1553 #[inline]
1554 fn default_retained() -> Retained<Self> {
1555 Self::new()
1556 }
1557}
1558
1559extern_class!(
1560 #[unsafe(super(NSObject))]
1562 #[derive(Debug, PartialEq, Eq, Hash)]
1563 pub struct MTLTileRenderPipelineDescriptor;
1564);
1565
1566extern_conformance!(
1567 unsafe impl NSCopying for MTLTileRenderPipelineDescriptor {}
1568);
1569
1570unsafe impl CopyingHelper for MTLTileRenderPipelineDescriptor {
1571 type Result = Self;
1572}
1573
1574extern_conformance!(
1575 unsafe impl NSObjectProtocol for MTLTileRenderPipelineDescriptor {}
1576);
1577
1578impl MTLTileRenderPipelineDescriptor {
1579 extern_methods!(
1580 #[unsafe(method(label))]
1582 #[unsafe(method_family = none)]
1583 pub fn label(&self) -> Option<Retained<NSString>>;
1584
1585 #[unsafe(method(setLabel:))]
1589 #[unsafe(method_family = none)]
1590 pub fn setLabel(&self, label: Option<&NSString>);
1591
1592 #[cfg(feature = "MTLLibrary")]
1593 #[unsafe(method(tileFunction))]
1599 #[unsafe(method_family = none)]
1600 pub fn tileFunction(&self) -> Retained<ProtocolObject<dyn MTLFunction>>;
1601
1602 #[cfg(feature = "MTLLibrary")]
1603 #[unsafe(method(setTileFunction:))]
1610 #[unsafe(method_family = none)]
1611 pub unsafe fn setTileFunction(&self, tile_function: &ProtocolObject<dyn MTLFunction>);
1612
1613 #[unsafe(method(rasterSampleCount))]
1614 #[unsafe(method_family = none)]
1615 pub fn rasterSampleCount(&self) -> NSUInteger;
1616
1617 #[unsafe(method(setRasterSampleCount:))]
1623 #[unsafe(method_family = none)]
1624 pub unsafe fn setRasterSampleCount(&self, raster_sample_count: NSUInteger);
1625
1626 #[unsafe(method(colorAttachments))]
1627 #[unsafe(method_family = none)]
1628 pub fn colorAttachments(
1629 &self,
1630 ) -> Retained<MTLTileRenderPipelineColorAttachmentDescriptorArray>;
1631
1632 #[unsafe(method(threadgroupSizeMatchesTileSize))]
1636 #[unsafe(method_family = none)]
1637 pub fn threadgroupSizeMatchesTileSize(&self) -> bool;
1638
1639 #[unsafe(method(setThreadgroupSizeMatchesTileSize:))]
1641 #[unsafe(method_family = none)]
1642 pub fn setThreadgroupSizeMatchesTileSize(&self, threadgroup_size_matches_tile_size: bool);
1643
1644 #[cfg(feature = "MTLPipeline")]
1645 #[unsafe(method(tileBuffers))]
1646 #[unsafe(method_family = none)]
1647 pub fn tileBuffers(&self) -> Retained<MTLPipelineBufferDescriptorArray>;
1648
1649 #[unsafe(method(maxTotalThreadsPerThreadgroup))]
1651 #[unsafe(method_family = none)]
1652 pub fn maxTotalThreadsPerThreadgroup(&self) -> NSUInteger;
1653
1654 #[unsafe(method(setMaxTotalThreadsPerThreadgroup:))]
1656 #[unsafe(method_family = none)]
1657 pub fn setMaxTotalThreadsPerThreadgroup(
1658 &self,
1659 max_total_threads_per_threadgroup: NSUInteger,
1660 );
1661
1662 #[cfg(feature = "MTLBinaryArchive")]
1663 #[unsafe(method(binaryArchives))]
1669 #[unsafe(method_family = none)]
1670 pub fn binaryArchives(
1671 &self,
1672 ) -> Option<Retained<NSArray<ProtocolObject<dyn MTLBinaryArchive>>>>;
1673
1674 #[cfg(feature = "MTLBinaryArchive")]
1675 #[unsafe(method(setBinaryArchives:))]
1679 #[unsafe(method_family = none)]
1680 pub fn setBinaryArchives(
1681 &self,
1682 binary_archives: Option<&NSArray<ProtocolObject<dyn MTLBinaryArchive>>>,
1683 );
1684
1685 #[cfg(feature = "MTLDynamicLibrary")]
1686 #[unsafe(method(preloadedLibraries))]
1694 #[unsafe(method_family = none)]
1695 pub fn preloadedLibraries(
1696 &self,
1697 ) -> Retained<NSArray<ProtocolObject<dyn MTLDynamicLibrary>>>;
1698
1699 #[cfg(feature = "MTLDynamicLibrary")]
1700 #[unsafe(method(setPreloadedLibraries:))]
1704 #[unsafe(method_family = none)]
1705 pub fn setPreloadedLibraries(
1706 &self,
1707 preloaded_libraries: &NSArray<ProtocolObject<dyn MTLDynamicLibrary>>,
1708 );
1709
1710 #[cfg(feature = "MTLLinkedFunctions")]
1711 #[unsafe(method(linkedFunctions))]
1715 #[unsafe(method_family = none)]
1716 pub fn linkedFunctions(&self) -> Retained<MTLLinkedFunctions>;
1717
1718 #[cfg(feature = "MTLLinkedFunctions")]
1719 #[unsafe(method(setLinkedFunctions:))]
1723 #[unsafe(method_family = none)]
1724 pub fn setLinkedFunctions(&self, linked_functions: Option<&MTLLinkedFunctions>);
1725
1726 #[unsafe(method(supportAddingBinaryFunctions))]
1728 #[unsafe(method_family = none)]
1729 pub fn supportAddingBinaryFunctions(&self) -> bool;
1730
1731 #[unsafe(method(setSupportAddingBinaryFunctions:))]
1733 #[unsafe(method_family = none)]
1734 pub fn setSupportAddingBinaryFunctions(&self, support_adding_binary_functions: bool);
1735
1736 #[unsafe(method(maxCallStackDepth))]
1738 #[unsafe(method_family = none)]
1739 pub fn maxCallStackDepth(&self) -> NSUInteger;
1740
1741 #[unsafe(method(setMaxCallStackDepth:))]
1743 #[unsafe(method_family = none)]
1744 pub fn setMaxCallStackDepth(&self, max_call_stack_depth: NSUInteger);
1745
1746 #[unsafe(method(reset))]
1747 #[unsafe(method_family = none)]
1748 pub fn reset(&self);
1749
1750 #[cfg(feature = "MTLPipeline")]
1751 #[unsafe(method(shaderValidation))]
1755 #[unsafe(method_family = none)]
1756 pub fn shaderValidation(&self) -> MTLShaderValidation;
1757
1758 #[cfg(feature = "MTLPipeline")]
1759 #[unsafe(method(setShaderValidation:))]
1761 #[unsafe(method_family = none)]
1762 pub fn setShaderValidation(&self, shader_validation: MTLShaderValidation);
1763
1764 #[cfg(feature = "MTLTypes")]
1765 #[unsafe(method(requiredThreadsPerThreadgroup))]
1769 #[unsafe(method_family = none)]
1770 pub fn requiredThreadsPerThreadgroup(&self) -> MTLSize;
1771
1772 #[cfg(feature = "MTLTypes")]
1773 #[unsafe(method(setRequiredThreadsPerThreadgroup:))]
1775 #[unsafe(method_family = none)]
1776 pub fn setRequiredThreadsPerThreadgroup(&self, required_threads_per_threadgroup: MTLSize);
1777 );
1778}
1779
1780impl MTLTileRenderPipelineDescriptor {
1782 extern_methods!(
1783 #[unsafe(method(init))]
1784 #[unsafe(method_family = init)]
1785 pub fn init(this: Allocated<Self>) -> Retained<Self>;
1786
1787 #[unsafe(method(new))]
1788 #[unsafe(method_family = new)]
1789 pub fn new() -> Retained<Self>;
1790 );
1791}
1792
1793impl DefaultRetained for MTLTileRenderPipelineDescriptor {
1794 #[inline]
1795 fn default_retained() -> Retained<Self> {
1796 Self::new()
1797 }
1798}
1799
1800extern_class!(
1801 #[unsafe(super(NSObject))]
1805 #[derive(Debug, PartialEq, Eq, Hash)]
1806 pub struct MTLMeshRenderPipelineDescriptor;
1807);
1808
1809extern_conformance!(
1810 unsafe impl NSCopying for MTLMeshRenderPipelineDescriptor {}
1811);
1812
1813unsafe impl CopyingHelper for MTLMeshRenderPipelineDescriptor {
1814 type Result = Self;
1815}
1816
1817extern_conformance!(
1818 unsafe impl NSObjectProtocol for MTLMeshRenderPipelineDescriptor {}
1819);
1820
1821impl MTLMeshRenderPipelineDescriptor {
1822 extern_methods!(
1823 #[unsafe(method(label))]
1826 #[unsafe(method_family = none)]
1827 pub fn label(&self) -> Option<Retained<NSString>>;
1828
1829 #[unsafe(method(setLabel:))]
1833 #[unsafe(method_family = none)]
1834 pub fn setLabel(&self, label: Option<&NSString>);
1835
1836 #[cfg(feature = "MTLLibrary")]
1837 #[unsafe(method(objectFunction))]
1841 #[unsafe(method_family = none)]
1842 pub fn objectFunction(&self) -> Option<Retained<ProtocolObject<dyn MTLFunction>>>;
1843
1844 #[cfg(feature = "MTLLibrary")]
1845 #[unsafe(method(setObjectFunction:))]
1852 #[unsafe(method_family = none)]
1853 pub unsafe fn setObjectFunction(
1854 &self,
1855 object_function: Option<&ProtocolObject<dyn MTLFunction>>,
1856 );
1857
1858 #[cfg(feature = "MTLLibrary")]
1859 #[unsafe(method(meshFunction))]
1862 #[unsafe(method_family = none)]
1863 pub fn meshFunction(&self) -> Option<Retained<ProtocolObject<dyn MTLFunction>>>;
1864
1865 #[cfg(feature = "MTLLibrary")]
1866 #[unsafe(method(setMeshFunction:))]
1873 #[unsafe(method_family = none)]
1874 pub unsafe fn setMeshFunction(
1875 &self,
1876 mesh_function: Option<&ProtocolObject<dyn MTLFunction>>,
1877 );
1878
1879 #[cfg(feature = "MTLLibrary")]
1880 #[unsafe(method(fragmentFunction))]
1883 #[unsafe(method_family = none)]
1884 pub fn fragmentFunction(&self) -> Option<Retained<ProtocolObject<dyn MTLFunction>>>;
1885
1886 #[cfg(feature = "MTLLibrary")]
1887 #[unsafe(method(setFragmentFunction:))]
1894 #[unsafe(method_family = none)]
1895 pub unsafe fn setFragmentFunction(
1896 &self,
1897 fragment_function: Option<&ProtocolObject<dyn MTLFunction>>,
1898 );
1899
1900 #[unsafe(method(maxTotalThreadsPerObjectThreadgroup))]
1906 #[unsafe(method_family = none)]
1907 pub fn maxTotalThreadsPerObjectThreadgroup(&self) -> NSUInteger;
1908
1909 #[unsafe(method(setMaxTotalThreadsPerObjectThreadgroup:))]
1911 #[unsafe(method_family = none)]
1912 pub fn setMaxTotalThreadsPerObjectThreadgroup(
1913 &self,
1914 max_total_threads_per_object_threadgroup: NSUInteger,
1915 );
1916
1917 #[unsafe(method(maxTotalThreadsPerMeshThreadgroup))]
1923 #[unsafe(method_family = none)]
1924 pub fn maxTotalThreadsPerMeshThreadgroup(&self) -> NSUInteger;
1925
1926 #[unsafe(method(setMaxTotalThreadsPerMeshThreadgroup:))]
1928 #[unsafe(method_family = none)]
1929 pub fn setMaxTotalThreadsPerMeshThreadgroup(
1930 &self,
1931 max_total_threads_per_mesh_threadgroup: NSUInteger,
1932 );
1933
1934 #[unsafe(method(objectThreadgroupSizeIsMultipleOfThreadExecutionWidth))]
1938 #[unsafe(method_family = none)]
1939 pub fn objectThreadgroupSizeIsMultipleOfThreadExecutionWidth(&self) -> bool;
1940
1941 #[unsafe(method(setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth:))]
1943 #[unsafe(method_family = none)]
1944 pub fn setObjectThreadgroupSizeIsMultipleOfThreadExecutionWidth(
1945 &self,
1946 object_threadgroup_size_is_multiple_of_thread_execution_width: bool,
1947 );
1948
1949 #[unsafe(method(meshThreadgroupSizeIsMultipleOfThreadExecutionWidth))]
1953 #[unsafe(method_family = none)]
1954 pub fn meshThreadgroupSizeIsMultipleOfThreadExecutionWidth(&self) -> bool;
1955
1956 #[unsafe(method(setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth:))]
1958 #[unsafe(method_family = none)]
1959 pub fn setMeshThreadgroupSizeIsMultipleOfThreadExecutionWidth(
1960 &self,
1961 mesh_threadgroup_size_is_multiple_of_thread_execution_width: bool,
1962 );
1963
1964 #[unsafe(method(payloadMemoryLength))]
1968 #[unsafe(method_family = none)]
1969 pub fn payloadMemoryLength(&self) -> NSUInteger;
1970
1971 #[unsafe(method(setPayloadMemoryLength:))]
1973 #[unsafe(method_family = none)]
1974 pub fn setPayloadMemoryLength(&self, payload_memory_length: NSUInteger);
1975
1976 #[unsafe(method(maxTotalThreadgroupsPerMeshGrid))]
1982 #[unsafe(method_family = none)]
1983 pub fn maxTotalThreadgroupsPerMeshGrid(&self) -> NSUInteger;
1984
1985 #[unsafe(method(setMaxTotalThreadgroupsPerMeshGrid:))]
1987 #[unsafe(method_family = none)]
1988 pub fn setMaxTotalThreadgroupsPerMeshGrid(
1989 &self,
1990 max_total_threadgroups_per_mesh_grid: NSUInteger,
1991 );
1992
1993 #[cfg(feature = "MTLPipeline")]
1994 #[unsafe(method(objectBuffers))]
1998 #[unsafe(method_family = none)]
1999 pub fn objectBuffers(&self) -> Retained<MTLPipelineBufferDescriptorArray>;
2000
2001 #[cfg(feature = "MTLPipeline")]
2002 #[unsafe(method(meshBuffers))]
2006 #[unsafe(method_family = none)]
2007 pub fn meshBuffers(&self) -> Retained<MTLPipelineBufferDescriptorArray>;
2008
2009 #[cfg(feature = "MTLPipeline")]
2010 #[unsafe(method(fragmentBuffers))]
2014 #[unsafe(method_family = none)]
2015 pub fn fragmentBuffers(&self) -> Retained<MTLPipelineBufferDescriptorArray>;
2016
2017 #[unsafe(method(rasterSampleCount))]
2019 #[unsafe(method_family = none)]
2020 pub fn rasterSampleCount(&self) -> NSUInteger;
2021
2022 #[unsafe(method(setRasterSampleCount:))]
2028 #[unsafe(method_family = none)]
2029 pub unsafe fn setRasterSampleCount(&self, raster_sample_count: NSUInteger);
2030
2031 #[unsafe(method(isAlphaToCoverageEnabled))]
2035 #[unsafe(method_family = none)]
2036 pub fn isAlphaToCoverageEnabled(&self) -> bool;
2037
2038 #[unsafe(method(setAlphaToCoverageEnabled:))]
2040 #[unsafe(method_family = none)]
2041 pub fn setAlphaToCoverageEnabled(&self, alpha_to_coverage_enabled: bool);
2042
2043 #[unsafe(method(isAlphaToOneEnabled))]
2047 #[unsafe(method_family = none)]
2048 pub fn isAlphaToOneEnabled(&self) -> bool;
2049
2050 #[unsafe(method(setAlphaToOneEnabled:))]
2052 #[unsafe(method_family = none)]
2053 pub fn setAlphaToOneEnabled(&self, alpha_to_one_enabled: bool);
2054
2055 #[unsafe(method(isRasterizationEnabled))]
2059 #[unsafe(method_family = none)]
2060 pub fn isRasterizationEnabled(&self) -> bool;
2061
2062 #[unsafe(method(setRasterizationEnabled:))]
2064 #[unsafe(method_family = none)]
2065 pub fn setRasterizationEnabled(&self, rasterization_enabled: bool);
2066
2067 #[unsafe(method(maxVertexAmplificationCount))]
2071 #[unsafe(method_family = none)]
2072 pub fn maxVertexAmplificationCount(&self) -> NSUInteger;
2073
2074 #[unsafe(method(setMaxVertexAmplificationCount:))]
2080 #[unsafe(method_family = none)]
2081 pub unsafe fn setMaxVertexAmplificationCount(
2082 &self,
2083 max_vertex_amplification_count: NSUInteger,
2084 );
2085
2086 #[unsafe(method(colorAttachments))]
2088 #[unsafe(method_family = none)]
2089 pub fn colorAttachments(&self)
2090 -> Retained<MTLRenderPipelineColorAttachmentDescriptorArray>;
2091
2092 #[cfg(feature = "MTLPixelFormat")]
2093 #[unsafe(method(depthAttachmentPixelFormat))]
2097 #[unsafe(method_family = none)]
2098 pub fn depthAttachmentPixelFormat(&self) -> MTLPixelFormat;
2099
2100 #[cfg(feature = "MTLPixelFormat")]
2101 #[unsafe(method(setDepthAttachmentPixelFormat:))]
2103 #[unsafe(method_family = none)]
2104 pub fn setDepthAttachmentPixelFormat(&self, depth_attachment_pixel_format: MTLPixelFormat);
2105
2106 #[cfg(feature = "MTLPixelFormat")]
2107 #[unsafe(method(stencilAttachmentPixelFormat))]
2111 #[unsafe(method_family = none)]
2112 pub fn stencilAttachmentPixelFormat(&self) -> MTLPixelFormat;
2113
2114 #[cfg(feature = "MTLPixelFormat")]
2115 #[unsafe(method(setStencilAttachmentPixelFormat:))]
2117 #[unsafe(method_family = none)]
2118 pub fn setStencilAttachmentPixelFormat(
2119 &self,
2120 stencil_attachment_pixel_format: MTLPixelFormat,
2121 );
2122
2123 #[unsafe(method(supportIndirectCommandBuffers))]
2127 #[unsafe(method_family = none)]
2128 pub fn supportIndirectCommandBuffers(&self) -> bool;
2129
2130 #[unsafe(method(setSupportIndirectCommandBuffers:))]
2132 #[unsafe(method_family = none)]
2133 pub fn setSupportIndirectCommandBuffers(&self, support_indirect_command_buffers: bool);
2134
2135 #[cfg(feature = "MTLBinaryArchive")]
2136 #[unsafe(method(binaryArchives))]
2142 #[unsafe(method_family = none)]
2143 pub fn binaryArchives(
2144 &self,
2145 ) -> Option<Retained<NSArray<ProtocolObject<dyn MTLBinaryArchive>>>>;
2146
2147 #[cfg(feature = "MTLBinaryArchive")]
2148 #[unsafe(method(setBinaryArchives:))]
2152 #[unsafe(method_family = none)]
2153 pub fn setBinaryArchives(
2154 &self,
2155 binary_archives: Option<&NSArray<ProtocolObject<dyn MTLBinaryArchive>>>,
2156 );
2157
2158 #[cfg(feature = "MTLLinkedFunctions")]
2159 #[unsafe(method(objectLinkedFunctions))]
2163 #[unsafe(method_family = none)]
2164 pub fn objectLinkedFunctions(&self) -> Retained<MTLLinkedFunctions>;
2165
2166 #[cfg(feature = "MTLLinkedFunctions")]
2167 #[unsafe(method(setObjectLinkedFunctions:))]
2171 #[unsafe(method_family = none)]
2172 pub fn setObjectLinkedFunctions(
2173 &self,
2174 object_linked_functions: Option<&MTLLinkedFunctions>,
2175 );
2176
2177 #[cfg(feature = "MTLLinkedFunctions")]
2178 #[unsafe(method(meshLinkedFunctions))]
2182 #[unsafe(method_family = none)]
2183 pub fn meshLinkedFunctions(&self) -> Retained<MTLLinkedFunctions>;
2184
2185 #[cfg(feature = "MTLLinkedFunctions")]
2186 #[unsafe(method(setMeshLinkedFunctions:))]
2190 #[unsafe(method_family = none)]
2191 pub fn setMeshLinkedFunctions(&self, mesh_linked_functions: Option<&MTLLinkedFunctions>);
2192
2193 #[cfg(feature = "MTLLinkedFunctions")]
2194 #[unsafe(method(fragmentLinkedFunctions))]
2198 #[unsafe(method_family = none)]
2199 pub fn fragmentLinkedFunctions(&self) -> Retained<MTLLinkedFunctions>;
2200
2201 #[cfg(feature = "MTLLinkedFunctions")]
2202 #[unsafe(method(setFragmentLinkedFunctions:))]
2206 #[unsafe(method_family = none)]
2207 pub fn setFragmentLinkedFunctions(
2208 &self,
2209 fragment_linked_functions: Option<&MTLLinkedFunctions>,
2210 );
2211
2212 #[unsafe(method(reset))]
2214 #[unsafe(method_family = none)]
2215 pub fn reset(&self);
2216
2217 #[cfg(feature = "MTLPipeline")]
2218 #[unsafe(method(shaderValidation))]
2222 #[unsafe(method_family = none)]
2223 pub fn shaderValidation(&self) -> MTLShaderValidation;
2224
2225 #[cfg(feature = "MTLPipeline")]
2226 #[unsafe(method(setShaderValidation:))]
2228 #[unsafe(method_family = none)]
2229 pub fn setShaderValidation(&self, shader_validation: MTLShaderValidation);
2230
2231 #[cfg(feature = "MTLTypes")]
2232 #[unsafe(method(requiredThreadsPerObjectThreadgroup))]
2236 #[unsafe(method_family = none)]
2237 pub fn requiredThreadsPerObjectThreadgroup(&self) -> MTLSize;
2238
2239 #[cfg(feature = "MTLTypes")]
2240 #[unsafe(method(setRequiredThreadsPerObjectThreadgroup:))]
2242 #[unsafe(method_family = none)]
2243 pub fn setRequiredThreadsPerObjectThreadgroup(
2244 &self,
2245 required_threads_per_object_threadgroup: MTLSize,
2246 );
2247
2248 #[cfg(feature = "MTLTypes")]
2249 #[unsafe(method(requiredThreadsPerMeshThreadgroup))]
2253 #[unsafe(method_family = none)]
2254 pub fn requiredThreadsPerMeshThreadgroup(&self) -> MTLSize;
2255
2256 #[cfg(feature = "MTLTypes")]
2257 #[unsafe(method(setRequiredThreadsPerMeshThreadgroup:))]
2259 #[unsafe(method_family = none)]
2260 pub fn setRequiredThreadsPerMeshThreadgroup(
2261 &self,
2262 required_threads_per_mesh_threadgroup: MTLSize,
2263 );
2264 );
2265}
2266
2267impl MTLMeshRenderPipelineDescriptor {
2269 extern_methods!(
2270 #[unsafe(method(init))]
2271 #[unsafe(method_family = init)]
2272 pub fn init(this: Allocated<Self>) -> Retained<Self>;
2273
2274 #[unsafe(method(new))]
2275 #[unsafe(method_family = new)]
2276 pub fn new() -> Retained<Self>;
2277 );
2278}
2279
2280impl DefaultRetained for MTLMeshRenderPipelineDescriptor {
2281 #[inline]
2282 fn default_retained() -> Retained<Self> {
2283 Self::new()
2284 }
2285}