pub struct CommandEncoder(/* private fields */);Expand description
Base command encoder for MTL4.
C++ equivalent: MTL4::CommandEncoder
CommandEncoder provides the base interface for all MTL4 command encoders, including barrier operations, fence management, and debug groups.
Implementations§
Source§impl CommandEncoder
impl CommandEncoder
Sourcepub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
pub unsafe fn from_raw(ptr: *mut c_void) -> Option<Self>
Create a CommandEncoder 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_label(&self, label: &str)
pub fn set_label(&self, label: &str)
Set the label.
C++ equivalent: void setLabel(const NS::String*)
Sourcepub fn barrier_buffer(
&self,
buffer: *const c_void,
visibility: VisibilityOptions,
)
pub fn barrier_buffer( &self, buffer: *const c_void, visibility: VisibilityOptions, )
Insert a barrier for a specific buffer.
C++ equivalent: void barrier(const MTL::Buffer*, MTL4::VisibilityOptions)
Sourcepub fn barrier_buffers(
&self,
buffers: *const *const c_void,
count: UInteger,
visibility: VisibilityOptions,
)
pub fn barrier_buffers( &self, buffers: *const *const c_void, count: UInteger, visibility: VisibilityOptions, )
Insert a barrier for multiple buffers.
C++ equivalent: void barrier(const MTL::Buffer* const*, NS::UInteger, MTL4::VisibilityOptions)
Sourcepub fn barrier_texture(
&self,
texture: *const c_void,
visibility: VisibilityOptions,
)
pub fn barrier_texture( &self, texture: *const c_void, visibility: VisibilityOptions, )
Insert a barrier for a specific texture.
C++ equivalent: void barrier(const MTL::Texture*, MTL4::VisibilityOptions)
Sourcepub fn barrier_textures(
&self,
textures: *const *const c_void,
count: UInteger,
visibility: VisibilityOptions,
)
pub fn barrier_textures( &self, textures: *const *const c_void, count: UInteger, visibility: VisibilityOptions, )
Insert a barrier for multiple textures.
C++ equivalent: void barrier(const MTL::Texture* const*, NS::UInteger, MTL4::VisibilityOptions)
Sourcepub fn update_fence(&self, fence: *const c_void)
pub fn update_fence(&self, fence: *const c_void)
Update a fence.
C++ equivalent: void updateFence(const MTL::Fence*)
Sourcepub fn wait_for_fence(&self, fence: *const c_void)
pub fn wait_for_fence(&self, fence: *const c_void)
Wait for a fence.
C++ equivalent: void waitForFence(const MTL::Fence*)
Sourcepub fn push_debug_group(&self, name: &str)
pub fn push_debug_group(&self, name: &str)
Push a debug group.
C++ equivalent: void pushDebugGroup(const NS::String*)
Sourcepub fn pop_debug_group(&self)
pub fn pop_debug_group(&self)
Pop a debug group.
C++ equivalent: void popDebugGroup()
Sourcepub fn insert_debug_signpost(&self, name: &str)
pub fn insert_debug_signpost(&self, name: &str)
Insert a debug signpost.
C++ equivalent: void insertDebugSignpost(const NS::String*)
Sourcepub fn end_encoding(&self)
pub fn end_encoding(&self)
End encoding.
C++ equivalent: void endEncoding()