We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8038247 commit 423118eCopy full SHA for 423118e
examples/app/headless_renderer.rs
@@ -360,6 +360,10 @@ impl render_graph::Node for ImageCopyDriver {
360
let block_dimensions = src_image.texture_format.block_dimensions();
361
let block_size = src_image.texture_format.block_copy_size(None).unwrap();
362
363
+ // Calculating correct size of image row because
364
+ // copy_texture_to_buffer can copy image only by rows aligned wgpu::COPY_BYTES_PER_ROW_ALIGNMENT
365
+ // That's why image in buffer can be little bit wider
366
+ // This should be taken into account
367
let padded_bytes_per_row = RenderDevice::align_copy_bytes_per_row(
368
(src_image.size.x as usize / block_dimensions.0 as usize) * block_size as usize,
369
);
0 commit comments