We always want to round up when we divide by the block size.
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23919>
vk_format_get_blockwidth(image->planes[plane].vk_format);
uint32_t block_height =
vk_format_get_blockheight(image->planes[plane].vk_format);
- buf_width = buf_width / block_width;
- buf_height = buf_height / block_height;
+ buf_width = DIV_ROUND_UP(buf_width, block_width);
+ buf_height = DIV_ROUND_UP(buf_height, block_height);
out_info->src_format = src_format;
out_info->dst_format = dst_format;