<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Reviewed-by: Antia Puentes <a class="moz-txt-link-rfc2396E"
href="mailto:apuentes@igalia.com"><apuentes@igalia.com></a></p>
<br>
<div class="moz-cite-prefix">On 09/10/17 16:37, Lionel Landwerlin
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:20171009143701.11411-1-lionel.g.landwerlin@intel.com">
<pre wrap="">CID: 1418616, 1418607
Signed-off-by: Lionel Landwerlin <a class="moz-txt-link-rfc2396E" href="mailto:lionel.g.landwerlin@intel.com"><lionel.g.landwerlin@intel.com></a>
---
src/intel/blorp/blorp_blit.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index 11c2116a758..84e46d7d31b 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -2343,23 +2343,29 @@ blorp_surf_convert_to_uncompressed(const struct isl_device *isl_dev,
*/
blorp_surf_convert_to_single_slice(isl_dev, info);
- if (width || height) {
+ if (width) {
#ifndef NDEBUG
uint32_t right_edge_px = info->tile_x_sa + *x + *width;
- uint32_t bottom_edge_px = info->tile_y_sa + *y + *height;
assert(*width % fmtl->bw == 0 ||
right_edge_px == info->surf.logical_level0_px.width);
+#endif
+ *width = DIV_ROUND_UP(*width, fmtl->bw);
+ }
+ if (height) {
+#ifndef NDEBUG
+ uint32_t bottom_edge_px = info->tile_y_sa + *y + *height;
assert(*height % fmtl->bh == 0 ||
bottom_edge_px == info->surf.logical_level0_px.height);
#endif
- *width = DIV_ROUND_UP(*width, fmtl->bw);
*height = DIV_ROUND_UP(*height, fmtl->bh);
}
- if (x || y) {
+ if (x) {
assert(*x % fmtl->bw == 0);
- assert(*y % fmtl->bh == 0);
*x /= fmtl->bw;
+ }
+ if (y) {
+ assert(*y % fmtl->bh == 0);
*y /= fmtl->bh;
}
</pre>
</blockquote>
<br>
</body>
</html>