pub struct Queue { /* private fields */ }Expand description
the device’s queue (graphics, compute, copies, presentation)
Implementations§
Source§impl Queue
impl Queue
Sourcepub fn submit<'a, I: IntoIterator<Item = CommandBuffer<'a>>>(
&self,
cmds: I,
) -> Result<SubmitId>
pub fn submit<'a, I: IntoIterator<Item = CommandBuffer<'a>>>( &self, cmds: I, ) -> Result<SubmitId>
run command buffers in order (after the pending uploads) -> their timeline value
Sourcepub fn write_buffer<T: Pod>(
&self,
buf: &Buffer,
offset: u64,
data: &[T],
) -> Result<()>
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 (staged)
Sourcepub fn write_texture(
&self,
dst: &TextureRegion<'_>,
data: &[u8],
layout: DataLayout,
before: Layout,
after: Layout,
) -> Result<()>
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 (staged): the region
goes from before to CopyDst, gets the data, then goes to after
Sourcepub fn write_texture_rects(
&self,
t: &Texture,
rects: &[[i32; 4]],
data: &[u8],
stride: u32,
before: Layout,
after: Layout,
) -> Result<()>
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
of a 2D texture from data, an image of the texture’s size in rows of stride bytes (a
framebuffer), before the next submission; the staged bytes are those of the rectangles.
The whole level goes from before to CopyDst and then to after, once for all of them
Sourcepub fn write_texture_rects_at(
&self,
t: &Texture,
rects: &[[i32; 4]],
origin: (i32, i32),
data: &[u8],
stride: u32,
before: Layout,
after: Layout,
) -> Result<()>
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 (x, y, w, h) of data, an
image in rows of stride bytes, go to (x - origin.0, y - origin.1) of the texture; what
lies outside the image or the texture is skipped