pub struct CommandEncoder {
pub(crate) device: Arc<Device>,
pub(crate) label: String,
pub(crate) data: Mutex<CommandEncoderStatus>,
}Fields§
§device: Arc<Device>§label: String§data: Mutex<CommandEncoderStatus>The mutable state of this command encoder.
Implementations§
Source§impl CommandEncoder
impl CommandEncoder
Sourcepub unsafe fn as_hal_mut<A: Api, F: FnOnce(Option<&mut A::CommandEncoder>) -> R, R>(
self: &Arc<Self>,
hal_command_encoder_callback: F,
) -> R
pub unsafe fn as_hal_mut<A: Api, F: FnOnce(Option<&mut A::CommandEncoder>) -> R, R>( self: &Arc<Self>, hal_command_encoder_callback: F, ) -> R
Source§impl CommandEncoder
impl CommandEncoder
fn clear_buffer_inner( self: &Arc<Self>, dst: Arc<Buffer>, offset: BufferAddress, size: Option<BufferAddress>, ) -> Result<(), EncoderStateError>
pub fn clear_buffer( self: &Arc<Self>, dst: Arc<Buffer>, offset: BufferAddress, size: Option<BufferAddress>, )
fn clear_texture_inner( self: &Arc<Self>, dst: Arc<Texture>, subresource_range: &ImageSubresourceRange, ) -> Result<(), EncoderStateError>
pub fn clear_texture( self: &Arc<Self>, dst: Arc<Texture>, subresource_range: &ImageSubresourceRange, )
Source§impl CommandEncoder
impl CommandEncoder
fn begin_compute_pass_inner( self: &Arc<Self>, desc: &ComputePassDescriptor<'_, PassTimestampWrites<Arc<QuerySet>>>, ) -> (ComputePass, Option<CommandEncoderError>)
pub fn begin_compute_pass( self: &Arc<Self>, desc: &ComputePassDescriptor<'_, PassTimestampWrites<Arc<QuerySet>>>, ) -> ComputePass
Source§impl CommandEncoder
impl CommandEncoder
fn write_timestamp_inner( self: &Arc<Self>, query_set: Arc<QuerySet>, query_index: u32, ) -> Result<(), EncoderStateError>
pub fn write_timestamp( self: &Arc<Self>, query_set: Arc<QuerySet>, query_index: u32, )
fn resolve_query_set_inner( self: &Arc<Self>, query_set: Arc<QuerySet>, start_query: u32, query_count: u32, destination: Arc<Buffer>, destination_offset: BufferAddress, ) -> Result<(), EncoderStateError>
pub fn resolve_query_set( self: &Arc<Self>, query_set: Arc<QuerySet>, start_query: u32, query_count: u32, destination: Arc<Buffer>, destination_offset: BufferAddress, )
Source§impl CommandEncoder
impl CommandEncoder
fn mark_acceleration_structures_built_inner( self: &Arc<Self>, blases: &[Arc<Blas>], tlases: &[Arc<Tlas>], ) -> Result<(), EncoderStateError>
pub fn mark_acceleration_structures_built( self: &Arc<Self>, blases: &[Arc<Blas>], tlases: &[Arc<Tlas>], )
fn build_acceleration_structures_inner<'a>( self: &Arc<Self>, blas_iter: impl Iterator<Item = BlasBuildEntry<'a, Arc<Blas>, Arc<Buffer>>>, tlases: Vec<ArcTlasPackage>, ) -> Result<(), EncoderStateError>
pub fn build_acceleration_structures<'a>( self: &Arc<Self>, blas_iter: impl Iterator<Item = BlasBuildEntry<'a, Arc<Blas>, Arc<Buffer>>>, tlases: Vec<ArcTlasPackage>, )
Source§impl CommandEncoder
impl CommandEncoder
fn begin_render_pass_inner( self: &Arc<Self>, desc: ResolvedRenderPassDescriptor<'_>, ) -> (RenderPass, Option<CommandEncoderError>)
pub fn begin_render_pass( self: &Arc<Self>, desc: ResolvedRenderPassDescriptor<'_>, ) -> RenderPass
Source§impl CommandEncoder
impl CommandEncoder
fn copy_buffer_to_buffer_inner( self: &Arc<Self>, source: Arc<Buffer>, source_offset: BufferAddress, destination: Arc<Buffer>, destination_offset: BufferAddress, size: Option<BufferAddress>, ) -> Result<(), EncoderStateError>
pub fn copy_buffer_to_buffer( self: &Arc<Self>, source: Arc<Buffer>, source_offset: BufferAddress, destination: Arc<Buffer>, destination_offset: BufferAddress, size: Option<BufferAddress>, )
fn copy_buffer_to_texture_inner( self: &Arc<Self>, source: &TexelCopyBufferInfo<Arc<Buffer>>, destination: &TexelCopyTextureInfo<Arc<Texture>>, copy_size: &Extent3d, ) -> Result<(), EncoderStateError>
pub fn copy_buffer_to_texture( self: &Arc<Self>, source: &TexelCopyBufferInfo<Arc<Buffer>>, destination: &TexelCopyTextureInfo<Arc<Texture>>, copy_size: &Extent3d, )
fn copy_texture_to_buffer_inner( self: &Arc<Self>, source: &TexelCopyTextureInfo<Arc<Texture>>, destination: &TexelCopyBufferInfo<Arc<Buffer>>, copy_size: &Extent3d, ) -> Result<(), EncoderStateError>
pub fn copy_texture_to_buffer( self: &Arc<Self>, source: &TexelCopyTextureInfo<Arc<Texture>>, destination: &TexelCopyBufferInfo<Arc<Buffer>>, copy_size: &Extent3d, )
fn copy_texture_to_texture_inner( self: &Arc<Self>, source: &TexelCopyTextureInfo<Arc<Texture>>, destination: &TexelCopyTextureInfo<Arc<Texture>>, copy_size: &Extent3d, ) -> Result<(), EncoderStateError>
pub fn copy_texture_to_texture( self: &Arc<Self>, source: &TexelCopyTextureInfo<Arc<Texture>>, destination: &TexelCopyTextureInfo<Arc<Texture>>, copy_size: &Extent3d, )
Source§impl CommandEncoder
impl CommandEncoder
fn transition_resources_inner( self: &Arc<Self>, buffer_transitions: impl Iterator<Item = BufferTransition<Arc<Buffer>>>, texture_transitions: impl Iterator<Item = TextureTransition<Arc<Texture>>>, ) -> Result<(), EncoderStateError>
pub fn transition_resources( self: &Arc<Self>, buffer_transitions: impl Iterator<Item = BufferTransition<Arc<Buffer>>>, texture_transitions: impl Iterator<Item = TextureTransition<Arc<Texture>>>, )
Source§impl CommandEncoder
impl CommandEncoder
pub(crate) fn new( encoder: Box<dyn DynCommandEncoder>, device: &Arc<Device>, label: &Label<'_>, ) -> Self
pub(crate) fn new_invalid( device: &Arc<Device>, label: &Label<'_>, err: CommandEncoderError, ) -> Arc<Self>
pub(crate) fn validate_pass_timestamp_writes<E>(
device: &Device,
timestamp_writes: &PassTimestampWrites<Arc<QuerySet>>,
) -> Result<PassTimestampWrites, E>where
E: From<TimestampWritesError> + From<QueryUseError> + From<DeviceError> + From<MissingFeatures> + From<InvalidResourceError>,
pub(crate) fn insert_barriers_from_tracker( raw: &mut dyn DynCommandEncoder, base: &mut Tracker, head: &Tracker, snatch_guard: &SnatchGuard<'_>, )
pub(crate) fn insert_barriers_from_scope( raw: &mut dyn DynCommandEncoder, base: &mut Tracker, head: &UsageScope<'_>, snatch_guard: &SnatchGuard<'_>, )
pub(crate) fn drain_barriers( raw: &mut dyn DynCommandEncoder, base: &mut Tracker, snatch_guard: &SnatchGuard<'_>, )
pub(crate) fn insert_barriers_from_device_tracker( raw: &mut dyn DynCommandEncoder, base: &mut DeviceTracker, head: &Tracker, snatch_guard: &SnatchGuard<'_>, )
fn encode_commands( device: &Arc<Device>, cmd_buf_data: &mut CommandBufferMutable, ) -> Result<(), CommandEncoderError>
Sourcefn finish_inner(
self: &Arc<Self>,
desc: &CommandBufferDescriptor<Label<'_>>,
) -> (Arc<CommandBuffer>, Option<CommandEncoderError>)
fn finish_inner( self: &Arc<Self>, desc: &CommandBufferDescriptor<Label<'_>>, ) -> (Arc<CommandBuffer>, Option<CommandEncoderError>)
Finishes a command encoder, creating a command buffer and returning errors that were deferred until now.
pub fn finish( self: &Arc<Self>, desc: &CommandBufferDescriptor<Label<'_>>, ) -> Arc<CommandBuffer>
Source§impl CommandEncoder
impl CommandEncoder
fn push_debug_group_inner( self: &Arc<Self>, label: &str, ) -> Result<(), EncoderStateError>
pub fn push_debug_group(self: &Arc<Self>, label: &str)
fn insert_debug_marker_inner( self: &Arc<Self>, label: &str, ) -> Result<(), EncoderStateError>
pub fn insert_debug_marker(self: &Arc<Self>, label: &str)
fn pop_debug_group_inner(self: &Arc<Self>) -> Result<(), EncoderStateError>
pub fn pop_debug_group(self: &Arc<Self>)
Trait Implementations§
Source§impl Drop for CommandEncoder
impl Drop for CommandEncoder
Source§impl Labeled for CommandEncoder
impl Labeled for CommandEncoder
Source§fn label(&self) -> &str
fn label(&self) -> &str
Returns a string identifying this resource for logging and errors. Read more
fn error_ident(&self) -> ResourceErrorIdent
Source§impl ParentDevice for CommandEncoder
impl ParentDevice for CommandEncoder
Source§impl ResourceType for CommandEncoder
impl ResourceType for CommandEncoder
Auto Trait Implementations§
impl !Freeze for CommandEncoder
impl !RefUnwindSafe for CommandEncoder
impl Send for CommandEncoder
impl Sync for CommandEncoder
impl Unpin for CommandEncoder
impl !UnwindSafe for CommandEncoder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more