pub struct Queue {
raw: Box<dyn DynQueue>,
pub(crate) pending_writes: Mutex<PendingWrites>,
life_tracker: Mutex<LifetimeTracker>,
pub(crate) device: Arc<Device>,
}
Fields§
§raw: Box<dyn DynQueue>
§pending_writes: Mutex<PendingWrites>
§life_tracker: Mutex<LifetimeTracker>
§device: Arc<Device>
Implementations§
source§impl Queue
impl Queue
pub(crate) fn new( device: Arc<Device>, raw: Box<dyn DynQueue>, ) -> Result<Self, DeviceError>
pub(crate) fn raw(&self) -> &dyn DynQueue
pub(crate) fn lock_life<'a>(&'a self) -> MutexGuard<'a, LifetimeTracker>
pub(crate) fn maintain( &self, submission_index: u64, snatch_guard: &SnatchGuard<'_>, ) -> (SmallVec<[SubmittedWorkDoneClosure; 1]>, Vec<BufferMapPendingClosure>, bool)
source§impl Queue
impl Queue
pub fn write_buffer( &self, buffer: Fallible<Buffer>, buffer_offset: BufferAddress, data: &[u8], ) -> Result<(), QueueWriteError>
pub fn create_staging_buffer( &self, buffer_size: BufferSize, ) -> Result<(StagingBuffer, NonNull<u8>), QueueWriteError>
pub fn write_staging_buffer( &self, buffer: Fallible<Buffer>, buffer_offset: BufferAddress, staging_buffer: StagingBuffer, ) -> Result<(), QueueWriteError>
pub fn validate_write_buffer( &self, buffer: Fallible<Buffer>, buffer_offset: u64, buffer_size: BufferSize, ) -> Result<(), QueueWriteError>
fn validate_write_buffer_impl( &self, buffer: &Buffer, buffer_offset: u64, buffer_size: BufferSize, ) -> Result<(), TransferError>
fn write_staging_buffer_impl( &self, pending_writes: &mut PendingWrites, staging_buffer: &FlushedStagingBuffer, buffer: Arc<Buffer>, buffer_offset: u64, ) -> Result<(), QueueWriteError>
pub fn write_texture( &self, destination: TexelCopyTextureInfo<Fallible<Texture>>, data: &[u8], data_layout: &TexelCopyBufferLayout, size: &Extent3d, ) -> Result<(), QueueWriteError>
pub fn submit( &self, command_buffers: &[Arc<CommandBuffer>], ) -> Result<SubmissionIndex, (SubmissionIndex, QueueSubmitError)>
pub fn get_timestamp_period(&self) -> f32
sourcepub fn on_submitted_work_done(
&self,
closure: SubmittedWorkDoneClosure,
) -> Option<SubmissionIndex>
pub fn on_submitted_work_done( &self, closure: SubmittedWorkDoneClosure, ) -> Option<SubmissionIndex>
closure
is guaranteed to be called.
Trait Implementations§
source§impl Labeled for Queue
impl Labeled for Queue
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 Queue
impl ParentDevice for Queue
Auto Trait Implementations§
impl !Freeze for Queue
impl !RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl !UnwindSafe for Queue
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