pub struct Queue { /* private fields */ }Implementations§
Source§impl Queue
impl Queue
Sourcepub fn submit(&self, command_buffer: CommandBuffer) -> Result<(), Error>
pub fn submit(&self, command_buffer: CommandBuffer) -> Result<(), Error>
Submits a CommandBuffer to the GPU queue and waits synchronously for execution to finish.
§Example
use lgpu::{CommandBuffer, Queue};
queue.submit(cmd).expect("GPU submission failed");Sourcepub fn submit_surface_work(
&self,
command_buffer: CommandBuffer,
surface_texture: &SurfaceTexture,
) -> Result<(), Error>
pub fn submit_surface_work( &self, command_buffer: CommandBuffer, surface_texture: &SurfaceTexture, ) -> Result<(), Error>
Submits command buffer work targeted to a swapchain surface without presenting.
The acquired surface can then be presented explicitly via SurfaceTexture::present.
Sourcepub fn submit_surface(
&self,
command_buffer: CommandBuffer,
surface_texture: SurfaceTexture,
) -> Result<(), Error>
pub fn submit_surface( &self, command_buffer: CommandBuffer, surface_texture: SurfaceTexture, ) -> Result<(), Error>
Submits command buffer work targeted to a swapchain surface and immediately queues presentation.
pub fn submit_batches( &self, command_buffers: Vec<CommandBuffer>, ) -> Result<(), Error>
pub fn submit_async( &self, command_buffer: CommandBuffer, wait_semaphores: &[(&TimelineSemaphore, u64)], signal_semaphores: &[(&TimelineSemaphore, u64)], ) -> Result<(), Error>
pub fn submit_batches_async( &self, command_buffers: Vec<CommandBuffer>, wait_semaphores: &[(&TimelineSemaphore, u64)], signal_semaphores: &[(&TimelineSemaphore, u64)], ) -> Result<(), Error>
pub fn write_texture(&self, texture: &Texture, data: &[u8]) -> Result<(), Error>
Auto Trait Implementations§
impl Freeze for Queue
impl RefUnwindSafe for Queue
impl Send for Queue
impl Sync for Queue
impl Unpin for Queue
impl UnsafeUnpin 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