mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 19:00:13 +01:00
v3dv: use div_round_up for division by block size
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>
This commit is contained in:
parent
a1fda29bd1
commit
599e76617d
1 changed files with 2 additions and 2 deletions
|
|
@ -703,8 +703,8 @@ gather_image_to_buffer_info(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue