Skip to main content

Queue

Struct Queue 

Source
pub struct Queue { /* private fields */ }
Expand description

the device’s queue

Implementations§

Source§

impl Queue

Source

pub fn submit<'a, I: IntoIterator<Item = CommandBuffer<'a>>>( &self, cmds: I, ) -> Result<SubmitId>

run command buffers in order -> their number

Source

pub fn flush(&self) -> Result<SubmitId>

nothing waits for a submission here

Source

pub fn write_buffer<T: Pod>( &self, buf: &Buffer, offset: u64, data: &[T], ) -> Result<()>

write data into a buffer at offset, before the next submission

Source

pub fn write_texture( &self, dst: &TextureRegion<'_>, data: &[u8], layout: DataLayout, _before: Layout, _after: Layout, ) -> Result<()>

write texels into a texture region, before the next submission (no layouts here)

Source

pub fn write_texture_rects( &self, t: &Texture, rects: &[[i32; 4]], data: &[u8], stride: u32, before: Layout, after: Layout, ) -> Result<()>

write rectangles (x, y, w, h; clipped to the texture, empty ones skipped) of mip 0, layer 0 from data, an image of the texture’s size in rows of stride bytes (a framebuffer)

Source

pub fn write_texture_rects_at( &self, t: &Texture, rects: &[[i32; 4]], origin: (i32, i32), data: &[u8], stride: u32, _before: Layout, _after: Layout, ) -> Result<()>

write_texture_rects from an image of another size: rectangles of data go to (x - origin.0, y - origin.1) of the texture; what lies outside the image or the texture is skipped

Source

pub fn read_buffer<T: Pod>( &self, _buf: &Buffer, _offset: u64, _out: &mut [T], ) -> Result<()>

the worker cannot wait for the GPU: a Readback buffer and Buffer::read

Trait Implementations§

Source§

impl Clone for Queue

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Queue

§

impl !Send for Queue

§

impl !Sync for Queue

§

impl !UnwindSafe for Queue

§

impl Forget for Queue

§

impl Freeze for Queue

§

impl Unpin for Queue

§

impl UnsafeUnpin for Queue

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.