Skip to content

Commit 8038247

Browse files
committed
Missing suggestions
1 parent bdac404 commit 8038247

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/app/headless_renderer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,8 @@ fn update(
493493
let img_bytes = images.get_mut(image.id()).unwrap();
494494

495495
// 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.
496498
let row_bytes = img_bytes.width() as usize
497499
* img_bytes.texture_descriptor.format.pixel_size();
498500
let aligned_row_bytes = RenderDevice::align_copy_bytes_per_row(row_bytes);

0 commit comments

Comments
 (0)