pub struct ArgumentTable(/* private fields */);Expand description
Argument table for GPU resource binding.
C++ equivalent: MTL4::ArgumentTable
ArgumentTable provides a way to bind resources (buffers, textures, samplers) at specific indices for use in shaders.
Implementations§
Source§impl ArgumentTable
impl ArgumentTable
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create an ArgumentTable from a raw pointer.
Sourcepub fn device(&self) -> Option<Device>
pub fn device(&self) -> Option<Device>
Get the device.
C++ equivalent: MTL::Device* device() const
Sourcepub fn set_address(&self, gpu_address: u64, binding_index: UInteger)
pub fn set_address(&self, gpu_address: u64, binding_index: UInteger)
Set a GPU address at the specified binding index.
C++ equivalent: void setAddress(MTL::GPUAddress, NS::UInteger)
Sourcepub fn set_address_with_stride(
&self,
gpu_address: u64,
stride: UInteger,
binding_index: UInteger,
)
pub fn set_address_with_stride( &self, gpu_address: u64, stride: UInteger, binding_index: UInteger, )
Set a GPU address with stride at the specified binding index.
C++ equivalent: void setAddress(MTL::GPUAddress, NS::UInteger, NS::UInteger)
Sourcepub fn set_resource(&self, resource_id: u64, binding_index: UInteger)
pub fn set_resource(&self, resource_id: u64, binding_index: UInteger)
Set a resource at the specified buffer index.
C++ equivalent: void setResource(MTL::ResourceID, NS::UInteger)
Sourcepub fn set_texture(&self, resource_id: u64, binding_index: UInteger)
pub fn set_texture(&self, resource_id: u64, binding_index: UInteger)
Set a texture at the specified binding index.
C++ equivalent: void setTexture(MTL::ResourceID, NS::UInteger)
Sourcepub fn set_sampler_state(&self, resource_id: u64, binding_index: UInteger)
pub fn set_sampler_state(&self, resource_id: u64, binding_index: UInteger)
Set a sampler state at the specified binding index.
C++ equivalent: void setSamplerState(MTL::ResourceID, NS::UInteger)