pub struct ReadbackBuffers {
texture_format: TextureFormat,
texture_width: u32,
texture_height: u32,
texture_depth_or_array_layers: u32,
buffer: Buffer,
buffer_stencil: Option<Buffer>,
}
Fields§
§texture_format: TextureFormat
texture format
texture_width: u32
texture width
texture_height: u32
texture height
texture_depth_or_array_layers: u32
texture depth or array layer count
buffer: Buffer
buffer for color or depth aspects
buffer_stencil: Option<Buffer>
buffer for stencil aspect
Implementations§
Source§impl ReadbackBuffers
impl ReadbackBuffers
pub fn new(device: &Device, texture: &Texture) -> Self
pub fn copy_from( &self, device: &Device, encoder: &mut CommandEncoder, texture: &Texture, )
async fn retrieve_buffer( &self, ctx: &TestingContext, buffer: &Buffer, aspect: Option<TextureAspect>, ) -> Vec<u8>
fn buffer_aspect(&self) -> Option<TextureAspect>
async fn is_zero( &self, ctx: &TestingContext, buffer: &Buffer, aspect: Option<TextureAspect>, ) -> bool
pub async fn are_zero(&self, ctx: &TestingContext) -> bool
pub async fn assert_buffer_contents( &self, ctx: &TestingContext, expected_data: &[u8], )
Auto Trait Implementations§
impl Freeze for ReadbackBuffers
impl !RefUnwindSafe for ReadbackBuffers
impl Send for ReadbackBuffers
impl Sync for ReadbackBuffers
impl Unpin for ReadbackBuffers
impl !UnwindSafe for ReadbackBuffers
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