use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(MTL4PipelineDescriptor, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "MTL4PipelineState")]
pub struct MTL4ComputePipelineDescriptor;
);
#[cfg(feature = "MTL4PipelineState")]
extern_conformance!(
unsafe impl NSCopying for MTL4ComputePipelineDescriptor {}
);
#[cfg(feature = "MTL4PipelineState")]
unsafe impl CopyingHelper for MTL4ComputePipelineDescriptor {
type Result = Self;
}
#[cfg(feature = "MTL4PipelineState")]
extern_conformance!(
unsafe impl NSObjectProtocol for MTL4ComputePipelineDescriptor {}
);
#[cfg(feature = "MTL4PipelineState")]
impl MTL4ComputePipelineDescriptor {
extern_methods!(
#[cfg(feature = "MTL4FunctionDescriptor")]
#[unsafe(method(computeFunctionDescriptor))]
#[unsafe(method_family = none)]
pub fn computeFunctionDescriptor(&self) -> Option<Retained<MTL4FunctionDescriptor>>;
#[cfg(feature = "MTL4FunctionDescriptor")]
#[unsafe(method(setComputeFunctionDescriptor:))]
#[unsafe(method_family = none)]
pub fn setComputeFunctionDescriptor(
&self,
compute_function_descriptor: Option<&MTL4FunctionDescriptor>,
);
#[unsafe(method(threadGroupSizeIsMultipleOfThreadExecutionWidth))]
#[unsafe(method_family = none)]
pub fn threadGroupSizeIsMultipleOfThreadExecutionWidth(&self) -> bool;
#[unsafe(method(setThreadGroupSizeIsMultipleOfThreadExecutionWidth:))]
#[unsafe(method_family = none)]
pub fn setThreadGroupSizeIsMultipleOfThreadExecutionWidth(
&self,
thread_group_size_is_multiple_of_thread_execution_width: bool,
);
#[unsafe(method(maxTotalThreadsPerThreadgroup))]
#[unsafe(method_family = none)]
pub fn maxTotalThreadsPerThreadgroup(&self) -> NSUInteger;
#[unsafe(method(setMaxTotalThreadsPerThreadgroup:))]
#[unsafe(method_family = none)]
pub fn setMaxTotalThreadsPerThreadgroup(
&self,
max_total_threads_per_threadgroup: NSUInteger,
);
#[cfg(feature = "MTLTypes")]
#[unsafe(method(requiredThreadsPerThreadgroup))]
#[unsafe(method_family = none)]
pub fn requiredThreadsPerThreadgroup(&self) -> MTLSize;
#[cfg(feature = "MTLTypes")]
#[unsafe(method(setRequiredThreadsPerThreadgroup:))]
#[unsafe(method_family = none)]
pub fn setRequiredThreadsPerThreadgroup(&self, required_threads_per_threadgroup: MTLSize);
#[unsafe(method(supportBinaryLinking))]
#[unsafe(method_family = none)]
pub fn supportBinaryLinking(&self) -> bool;
#[unsafe(method(setSupportBinaryLinking:))]
#[unsafe(method_family = none)]
pub fn setSupportBinaryLinking(&self, support_binary_linking: bool);
#[cfg(feature = "MTL4LinkingDescriptor")]
#[unsafe(method(staticLinkingDescriptor))]
#[unsafe(method_family = none)]
pub fn staticLinkingDescriptor(&self) -> Option<Retained<MTL4StaticLinkingDescriptor>>;
#[cfg(feature = "MTL4LinkingDescriptor")]
#[unsafe(method(setStaticLinkingDescriptor:))]
#[unsafe(method_family = none)]
pub fn setStaticLinkingDescriptor(
&self,
static_linking_descriptor: Option<&MTL4StaticLinkingDescriptor>,
);
#[unsafe(method(supportIndirectCommandBuffers))]
#[unsafe(method_family = none)]
pub fn supportIndirectCommandBuffers(&self) -> MTL4IndirectCommandBufferSupportState;
#[unsafe(method(setSupportIndirectCommandBuffers:))]
#[unsafe(method_family = none)]
pub fn setSupportIndirectCommandBuffers(
&self,
support_indirect_command_buffers: MTL4IndirectCommandBufferSupportState,
);
#[unsafe(method(reset))]
#[unsafe(method_family = none)]
pub fn reset(&self);
);
}
#[cfg(feature = "MTL4PipelineState")]
impl MTL4ComputePipelineDescriptor {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
#[cfg(feature = "MTL4PipelineState")]
impl DefaultRetained for MTL4ComputePipelineDescriptor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}