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 bdac404 commit 8038247Copy full SHA for 8038247
examples/app/headless_renderer.rs
@@ -493,6 +493,8 @@ fn update(
493
let img_bytes = images.get_mut(image.id()).unwrap();
494
495
// We need to ensure that this works regardless of the image dimensions
496
+ // If the image became wider when copying from the texture to the buffer,
497
+ // then the data is reduced to its original size when copying from the buffer to the image.
498
let row_bytes = img_bytes.width() as usize
499
* img_bytes.texture_descriptor.format.pixel_size();
500
let aligned_row_bytes = RenderDevice::align_copy_bytes_per_row(row_bytes);
0 commit comments