objc2_metal_performance_shaders/generated/MPSNDArray/
MPSNDArrayGradientState.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6use objc2_metal::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(MPSState, NSObject))]
18 #[derive(Debug, PartialEq, Eq, Hash)]
19 #[cfg(all(feature = "MPSCore", feature = "MPSState"))]
20 pub struct MPSNDArrayGradientState;
21);
22
23#[cfg(all(feature = "MPSCore", feature = "MPSState"))]
24extern_conformance!(
25 unsafe impl NSObjectProtocol for MPSNDArrayGradientState {}
26);
27
28#[cfg(all(feature = "MPSCore", feature = "MPSState"))]
29impl MPSNDArrayGradientState {
30 extern_methods!();
31}
32
33#[cfg(all(feature = "MPSCore", feature = "MPSState"))]
35impl MPSNDArrayGradientState {
36 extern_methods!(
37 #[unsafe(method(temporaryStateWithCommandBuffer:bufferSize:))]
43 #[unsafe(method_family = none)]
44 pub unsafe fn temporaryStateWithCommandBuffer_bufferSize(
45 cmd_buf: &ProtocolObject<dyn MTLCommandBuffer>,
46 buffer_size: usize,
47 ) -> Retained<Self>;
48
49 #[unsafe(method(temporaryStateWithCommandBuffer:textureDescriptor:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn temporaryStateWithCommandBuffer_textureDescriptor(
57 cmd_buf: &ProtocolObject<dyn MTLCommandBuffer>,
58 descriptor: &MTLTextureDescriptor,
59 ) -> Retained<Self>;
60
61 #[unsafe(method(temporaryStateWithCommandBuffer:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn temporaryStateWithCommandBuffer(
67 cmd_buf: &ProtocolObject<dyn MTLCommandBuffer>,
68 ) -> Retained<Self>;
69
70 #[unsafe(method(initWithDevice:bufferSize:))]
71 #[unsafe(method_family = init)]
72 pub unsafe fn initWithDevice_bufferSize(
73 this: Allocated<Self>,
74 device: &ProtocolObject<dyn MTLDevice>,
75 buffer_size: usize,
76 ) -> Retained<Self>;
77
78 #[unsafe(method(initWithDevice:textureDescriptor:))]
79 #[unsafe(method_family = init)]
80 pub unsafe fn initWithDevice_textureDescriptor(
81 this: Allocated<Self>,
82 device: &ProtocolObject<dyn MTLDevice>,
83 descriptor: &MTLTextureDescriptor,
84 ) -> Retained<Self>;
85
86 #[unsafe(method(initWithResource:))]
95 #[unsafe(method_family = init)]
96 pub unsafe fn initWithResource(
97 this: Allocated<Self>,
98 resource: Option<&ProtocolObject<dyn MTLResource>>,
99 ) -> Retained<Self>;
100
101 #[unsafe(method(init))]
102 #[unsafe(method_family = init)]
103 pub unsafe fn init(this: Allocated<Self>) -> Option<Retained<Self>>;
104
105 #[unsafe(method(initWithDevice:resourceList:))]
112 #[unsafe(method_family = init)]
113 pub unsafe fn initWithDevice_resourceList(
114 this: Allocated<Self>,
115 device: &ProtocolObject<dyn MTLDevice>,
116 resource_list: &MPSStateResourceList,
117 ) -> Retained<Self>;
118
119 #[unsafe(method(temporaryStateWithCommandBuffer:resourceList:))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn temporaryStateWithCommandBuffer_resourceList(
125 command_buffer: &ProtocolObject<dyn MTLCommandBuffer>,
126 resource_list: &MPSStateResourceList,
127 ) -> Retained<Self>;
128
129 #[unsafe(method(initWithResources:))]
141 #[unsafe(method_family = init)]
142 pub unsafe fn initWithResources(
143 this: Allocated<Self>,
144 resources: Option<&NSArray<ProtocolObject<dyn MTLResource>>>,
145 ) -> Retained<Self>;
146 );
147}
148
149#[cfg(all(feature = "MPSCore", feature = "MPSState"))]
151impl MPSNDArrayGradientState {
152 extern_methods!(
153 #[unsafe(method(new))]
154 #[unsafe(method_family = new)]
155 pub unsafe fn new() -> Retained<Self>;
156 );
157}