Skip to main content

ComputePipelineDescriptor

Struct ComputePipelineDescriptor 

Source
pub struct ComputePipelineDescriptor(/* private fields */);

Implementations§

Source§

impl ComputePipelineDescriptor

Source

pub fn alloc() -> Option<Self>

Allocate a new compute pipeline descriptor.

C++ equivalent: static ComputePipelineDescriptor* alloc()

Source

pub fn init(self) -> Option<Self>

Initialize the descriptor.

C++ equivalent: ComputePipelineDescriptor* init()

Source

pub fn new() -> Option<Self>

Create a new compute pipeline descriptor.

Source

pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>

Create from a raw pointer.

§Safety

The pointer must be a valid compute pipeline descriptor object.

Source

pub fn as_raw(&self) -> *mut c_void

Get the raw pointer.

Source

pub fn reset(&self)

Reset the descriptor to default values.

C++ equivalent: void reset()

Source

pub fn label(&self) -> Option<String>

Get the label.

C++ equivalent: NS::String* label() const

Source

pub fn set_label(&self, label: &str)

Set the label.

C++ equivalent: void setLabel(const NS::String* label)

Source

pub fn compute_function(&self) -> Option<Function>

Get the compute function.

C++ equivalent: Function* computeFunction() const

Source

pub fn set_compute_function(&self, function: Option<&Function>)

Set the compute function.

C++ equivalent: void setComputeFunction(const MTL::Function* computeFunction)

Source

pub fn max_total_threads_per_threadgroup(&self) -> UInteger

Get the maximum total threads per threadgroup.

C++ equivalent: NS::UInteger maxTotalThreadsPerThreadgroup() const

Source

pub fn set_max_total_threads_per_threadgroup(&self, count: UInteger)

Set the maximum total threads per threadgroup.

C++ equivalent: void setMaxTotalThreadsPerThreadgroup(NS::UInteger maxTotalThreadsPerThreadgroup)

Source

pub fn required_threads_per_threadgroup(&self) -> Size

Get the required threads per threadgroup.

C++ equivalent: Size requiredThreadsPerThreadgroup() const

Source

pub fn set_required_threads_per_threadgroup(&self, size: Size)

Set the required threads per threadgroup.

C++ equivalent: void setRequiredThreadsPerThreadgroup(MTL::Size requiredThreadsPerThreadgroup)

Source

pub fn thread_group_size_is_multiple_of_thread_execution_width(&self) -> bool

Check if thread group size is multiple of thread execution width.

C++ equivalent: bool threadGroupSizeIsMultipleOfThreadExecutionWidth() const

Source

pub fn set_thread_group_size_is_multiple_of_thread_execution_width( &self, value: bool, )

Set thread group size is multiple of thread execution width.

C++ equivalent: void setThreadGroupSizeIsMultipleOfThreadExecutionWidth(bool threadGroupSizeIsMultipleOfThreadExecutionWidth)

Source

pub fn max_call_stack_depth(&self) -> UInteger

Get the maximum call stack depth.

C++ equivalent: NS::UInteger maxCallStackDepth() const

Source

pub fn set_max_call_stack_depth(&self, depth: UInteger)

Set the maximum call stack depth.

C++ equivalent: void setMaxCallStackDepth(NS::UInteger maxCallStackDepth)

Source

pub fn support_indirect_command_buffers(&self) -> bool

Check if the pipeline supports indirect command buffers.

C++ equivalent: bool supportIndirectCommandBuffers() const

Source

pub fn set_support_indirect_command_buffers(&self, support: bool)

Set indirect command buffer support.

C++ equivalent: void setSupportIndirectCommandBuffers(bool supportIndirectCommandBuffers)

Source

pub fn support_adding_binary_functions(&self) -> bool

Check if support adding binary functions is enabled.

C++ equivalent: bool supportAddingBinaryFunctions() const

Source

pub fn set_support_adding_binary_functions(&self, support: bool)

Set support adding binary functions.

C++ equivalent: void setSupportAddingBinaryFunctions(bool supportAddingBinaryFunctions)

Source

pub fn shader_validation(&self) -> ShaderValidation

Get the shader validation mode.

C++ equivalent: ShaderValidation shaderValidation() const

Source

pub fn set_shader_validation(&self, validation: ShaderValidation)

Set the shader validation mode.

C++ equivalent: void setShaderValidation(MTL::ShaderValidation shaderValidation)

Source

pub fn buffers(&self) -> Option<PipelineBufferDescriptorArray>

Get the buffer descriptors array.

C++ equivalent: PipelineBufferDescriptorArray* buffers() const

Source

pub fn stage_input_descriptor_raw(&self) -> *mut c_void

Get the stage input descriptor.

C++ equivalent: StageInputOutputDescriptor* stageInputDescriptor() const

Source

pub unsafe fn set_stage_input_descriptor_raw(&self, descriptor: *const c_void)

Set the stage input descriptor.

C++ equivalent: void setStageInputDescriptor(const StageInputOutputDescriptor*)

§Safety

The pointer must be a valid StageInputOutputDescriptor object.

Source

pub fn linked_functions(&self) -> Option<LinkedFunctions>

Get the linked functions.

C++ equivalent: LinkedFunctions* linkedFunctions() const

Source

pub fn set_linked_functions(&self, functions: Option<&LinkedFunctions>)

Set the linked functions.

C++ equivalent: void setLinkedFunctions(const LinkedFunctions*)

Source

pub fn binary_archives_raw(&self) -> *mut c_void

Get the binary archives (raw NSArray pointer).

C++ equivalent: NS::Array* binaryArchives() const

Source

pub unsafe fn set_binary_archives_raw(&self, archives: *const c_void)

Set the binary archives.

C++ equivalent: void setBinaryArchives(const NS::Array*)

§Safety

The pointer must be a valid NSArray of BinaryArchive objects.

Source

pub fn preloaded_libraries_raw(&self) -> *mut c_void

Get the preloaded libraries (raw NSArray pointer).

C++ equivalent: NS::Array* preloadedLibraries() const

Source

pub unsafe fn set_preloaded_libraries_raw(&self, libraries: *const c_void)

Set the preloaded libraries.

C++ equivalent: void setPreloadedLibraries(const NS::Array*)

§Safety

The pointer must be a valid NSArray of DynamicLibrary objects.

Source

pub fn insert_libraries_raw(&self) -> *mut c_void

Get the insert libraries (raw NSArray pointer).

C++ equivalent: NS::Array* insertLibraries() const

Source

pub unsafe fn set_insert_libraries_raw(&self, libraries: *const c_void)

Set the insert libraries.

C++ equivalent: void setInsertLibraries(const NS::Array*)

§Safety

The pointer must be a valid NSArray of DynamicLibrary objects.

Trait Implementations§

Source§

impl Clone for ComputePipelineDescriptor

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ComputePipelineDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ComputePipelineDescriptor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Drop for ComputePipelineDescriptor

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Referencing for ComputePipelineDescriptor

Source§

fn as_ptr(&self) -> *const c_void

Get the raw pointer to the Objective-C object.
Source§

fn as_mut_ptr(&self) -> *mut c_void

Get the raw mutable pointer to the Objective-C object.
Source§

fn retain(&self) -> Self
where Self: Clone,

Retain the object, incrementing its reference count. Read more
Source§

fn release(&self)

Release the object, decrementing its reference count. Read more
Source§

fn autorelease(&self) -> Self
where Self: Clone,

Autorelease the object. Read more
Source§

fn retain_count(&self) -> usize

Get the retain count of the object. Read more
Source§

impl Send for ComputePipelineDescriptor

Source§

impl Sync for ComputePipelineDescriptor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.