mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 14:50:11 +01:00
i965: Round copy size to the nearest block in intel_miptree_copy
The width and height of the copy don't have to be aligned to the block size if they specify the right or bottom edges of the image. (See also the comment and asserts right above). We need to round them up when we do the division in order to get it 100% right. Reviewed-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "17.0 17.1" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
79f2a5541f
commit
0901d0bc4c
1 changed files with 2 additions and 2 deletions
|
|
@ -411,8 +411,8 @@ intel_miptree_copy(struct brw_context *brw,
|
|||
|
||||
src_x /= (int)bw;
|
||||
src_y /= (int)bh;
|
||||
src_width /= (int)bw;
|
||||
src_height /= (int)bh;
|
||||
src_width = DIV_ROUND_UP(src_width, (int)bw);
|
||||
src_height = DIV_ROUND_UP(src_height, (int)bh);
|
||||
}
|
||||
src_x += src_image_x;
|
||||
src_y += src_image_y;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue