mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Improve BufferCopyView documentation
This commit is contained in:
@@ -77,7 +77,7 @@ async fn run() {
|
||||
buffer: &output_buffer,
|
||||
offset: 0,
|
||||
bytes_per_row: size_of::<u32>() as u32 * size,
|
||||
rows_per_image: size,
|
||||
rows_per_image: 0,
|
||||
},
|
||||
texture_extent,
|
||||
);
|
||||
|
||||
@@ -180,7 +180,7 @@ impl framework::Example for Example {
|
||||
buffer: &temp_buf,
|
||||
offset: 0,
|
||||
bytes_per_row: 4 * size,
|
||||
rows_per_image: size,
|
||||
rows_per_image: 0,
|
||||
},
|
||||
wgpu::TextureCopyView {
|
||||
texture: &texture,
|
||||
|
||||
@@ -268,7 +268,7 @@ impl framework::Example for Example {
|
||||
buffer: &temp_buf,
|
||||
offset: 0,
|
||||
bytes_per_row: 4 * size,
|
||||
rows_per_image: size,
|
||||
rows_per_image: 0,
|
||||
},
|
||||
wgpu::TextureCopyView {
|
||||
texture: &texture,
|
||||
|
||||
@@ -408,13 +408,16 @@ pub struct BufferCopyView<'a> {
|
||||
/// The buffer to be copied to or from.
|
||||
pub buffer: &'a Buffer,
|
||||
|
||||
/// The offset in bytes from the start of the buffer. This must be aligned to 512 bytes.
|
||||
/// The offset in bytes from the start of the buffer.
|
||||
/// In the future this must be aligned to 512 bytes, however the requirement is currently unimplemented.
|
||||
pub offset: BufferAddress,
|
||||
|
||||
/// The size in bytes of a single row of the texture. This must be a multiple of 256 bytes.
|
||||
/// The size in bytes of a single row of the texture.
|
||||
/// In the future this must be a multiple of 256 bytes, however the requirement is currently unimplemented.
|
||||
pub bytes_per_row: u32,
|
||||
|
||||
/// The height in texels of the imaginary texture view overlaid on the buffer.
|
||||
/// Must be zero for copies where `copy_size.depth == 1`.
|
||||
pub rows_per_image: u32,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user