Skip to content

Commit

Permalink
hal/gles: Fix minimum rows_per_image calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
cwfitzgerald committed Feb 25, 2022
1 parent 1391e23 commit ecb0b11
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wgpu-hal/src/gles/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,9 @@ impl super::Queue {
.map_or(copy.size.width * format_info.block_size as u32, |bpr| {
bpr.get()
});
let minimum_rows_per_image =
u32::max(1, copy.size.height / format_info.block_dimensions.1 as u32);
let block_height = format_info.block_dimensions.1 as u32;
let minimum_rows_per_image = (copy.size.height + block_height - 1)
/ format_info.block_dimensions.1 as u32;
let rows_per_image = copy
.buffer_layout
.rows_per_image
Expand Down

0 comments on commit ecb0b11

Please sign in to comment.