pub struct VisibleFunctionTable(/* private fields */);Expand description
A table of visible functions for shader function pointers.
C++ equivalent: MTL::VisibleFunctionTable
Inherits from Resource.
Implementations§
Source§impl VisibleFunctionTable
impl VisibleFunctionTable
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a VisibleFunctionTable from a raw pointer.
§Safety
The pointer must be a valid Metal visible function table object.
Sourcepub fn gpu_resource_id(&self) -> ResourceID
pub fn gpu_resource_id(&self) -> ResourceID
Get the GPU resource ID for bindless access.
C++ equivalent: ResourceID gpuResourceID() const
Sourcepub fn set_function(&self, function: &FunctionHandle, index: UInteger)
pub fn set_function(&self, function: &FunctionHandle, index: UInteger)
Set a function at the specified index.
C++ equivalent: void setFunction(const MTL::FunctionHandle* function, NS::UInteger index)
Sourcepub fn set_functions(&self, functions: &[&FunctionHandle], range: Range)
pub fn set_functions(&self, functions: &[&FunctionHandle], range: Range)
Set multiple functions at a range of indices.
C++ equivalent: void setFunctions(const MTL::FunctionHandle* const functions[], NS::Range range)
Trait Implementations§
Source§impl Clone for VisibleFunctionTable
impl Clone for VisibleFunctionTable
Source§impl Debug for VisibleFunctionTable
impl Debug for VisibleFunctionTable
Source§impl Drop for VisibleFunctionTable
impl Drop for VisibleFunctionTable
Source§impl Referencing for VisibleFunctionTable
impl Referencing for VisibleFunctionTable
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Get the raw mutable pointer to the Objective-C object.
Source§fn retain(&self) -> Selfwhere
Self: Clone,
fn retain(&self) -> Selfwhere
Self: Clone,
Retain the object, incrementing its reference count. Read more
Source§fn autorelease(&self) -> Selfwhere
Self: Clone,
fn autorelease(&self) -> Selfwhere
Self: Clone,
Autorelease the object. Read more
Source§fn retain_count(&self) -> usize
fn retain_count(&self) -> usize
Get the retain count of the object. Read more
impl Send for VisibleFunctionTable
impl Sync for VisibleFunctionTable
Auto Trait Implementations§
impl Freeze for VisibleFunctionTable
impl RefUnwindSafe for VisibleFunctionTable
impl Unpin for VisibleFunctionTable
impl UnwindSafe for VisibleFunctionTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more