objc2_metal/generated/
MTL4ComputePipeline.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(MTL4PipelineDescriptor, NSObject))]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "MTL4PipelineState")]
17 pub struct MTL4ComputePipelineDescriptor;
18);
19
20#[cfg(feature = "MTL4PipelineState")]
21extern_conformance!(
22 unsafe impl NSCopying for MTL4ComputePipelineDescriptor {}
23);
24
25#[cfg(feature = "MTL4PipelineState")]
26unsafe impl CopyingHelper for MTL4ComputePipelineDescriptor {
27 type Result = Self;
28}
29
30#[cfg(feature = "MTL4PipelineState")]
31extern_conformance!(
32 unsafe impl NSObjectProtocol for MTL4ComputePipelineDescriptor {}
33);
34
35#[cfg(feature = "MTL4PipelineState")]
36impl MTL4ComputePipelineDescriptor {
37 extern_methods!(
38 #[cfg(feature = "MTL4FunctionDescriptor")]
39 #[unsafe(method(computeFunctionDescriptor))]
45 #[unsafe(method_family = none)]
46 pub fn computeFunctionDescriptor(&self) -> Option<Retained<MTL4FunctionDescriptor>>;
47
48 #[cfg(feature = "MTL4FunctionDescriptor")]
49 #[unsafe(method(setComputeFunctionDescriptor:))]
53 #[unsafe(method_family = none)]
54 pub fn setComputeFunctionDescriptor(
55 &self,
56 compute_function_descriptor: Option<&MTL4FunctionDescriptor>,
57 );
58
59 #[unsafe(method(threadGroupSizeIsMultipleOfThreadExecutionWidth))]
62 #[unsafe(method_family = none)]
63 pub fn threadGroupSizeIsMultipleOfThreadExecutionWidth(&self) -> bool;
64
65 #[unsafe(method(setThreadGroupSizeIsMultipleOfThreadExecutionWidth:))]
67 #[unsafe(method_family = none)]
68 pub fn setThreadGroupSizeIsMultipleOfThreadExecutionWidth(
69 &self,
70 thread_group_size_is_multiple_of_thread_execution_width: bool,
71 );
72
73 #[unsafe(method(maxTotalThreadsPerThreadgroup))]
76 #[unsafe(method_family = none)]
77 pub fn maxTotalThreadsPerThreadgroup(&self) -> NSUInteger;
78
79 #[unsafe(method(setMaxTotalThreadsPerThreadgroup:))]
81 #[unsafe(method_family = none)]
82 pub fn setMaxTotalThreadsPerThreadgroup(
83 &self,
84 max_total_threads_per_threadgroup: NSUInteger,
85 );
86
87 #[cfg(feature = "MTLTypes")]
88 #[unsafe(method(requiredThreadsPerThreadgroup))]
97 #[unsafe(method_family = none)]
98 pub fn requiredThreadsPerThreadgroup(&self) -> MTLSize;
99
100 #[cfg(feature = "MTLTypes")]
101 #[unsafe(method(setRequiredThreadsPerThreadgroup:))]
103 #[unsafe(method_family = none)]
104 pub fn setRequiredThreadsPerThreadgroup(&self, required_threads_per_threadgroup: MTLSize);
105
106 #[unsafe(method(supportBinaryLinking))]
108 #[unsafe(method_family = none)]
109 pub fn supportBinaryLinking(&self) -> bool;
110
111 #[unsafe(method(setSupportBinaryLinking:))]
113 #[unsafe(method_family = none)]
114 pub fn setSupportBinaryLinking(&self, support_binary_linking: bool);
115
116 #[cfg(feature = "MTL4LinkingDescriptor")]
117 #[unsafe(method(staticLinkingDescriptor))]
119 #[unsafe(method_family = none)]
120 pub fn staticLinkingDescriptor(&self) -> Option<Retained<MTL4StaticLinkingDescriptor>>;
121
122 #[cfg(feature = "MTL4LinkingDescriptor")]
123 #[unsafe(method(setStaticLinkingDescriptor:))]
127 #[unsafe(method_family = none)]
128 pub fn setStaticLinkingDescriptor(
129 &self,
130 static_linking_descriptor: Option<&MTL4StaticLinkingDescriptor>,
131 );
132
133 #[unsafe(method(supportIndirectCommandBuffers))]
135 #[unsafe(method_family = none)]
136 pub fn supportIndirectCommandBuffers(&self) -> MTL4IndirectCommandBufferSupportState;
137
138 #[unsafe(method(setSupportIndirectCommandBuffers:))]
140 #[unsafe(method_family = none)]
141 pub fn setSupportIndirectCommandBuffers(
142 &self,
143 support_indirect_command_buffers: MTL4IndirectCommandBufferSupportState,
144 );
145
146 #[unsafe(method(reset))]
148 #[unsafe(method_family = none)]
149 pub fn reset(&self);
150 );
151}
152
153#[cfg(feature = "MTL4PipelineState")]
155impl MTL4ComputePipelineDescriptor {
156 extern_methods!(
157 #[unsafe(method(init))]
158 #[unsafe(method_family = init)]
159 pub fn init(this: Allocated<Self>) -> Retained<Self>;
160
161 #[unsafe(method(new))]
162 #[unsafe(method_family = new)]
163 pub fn new() -> Retained<Self>;
164 );
165}
166
167#[cfg(feature = "MTL4PipelineState")]
168impl DefaultRetained for MTL4ComputePipelineDescriptor {
169 #[inline]
170 fn default_retained() -> Retained<Self> {
171 Self::new()
172 }
173}