[Mesa-dev] [PATCH] intel/blorp_blit: Simplify uncompressed level0 extent assignment
Nanley Chery
nanleychery at gmail.com
Mon Sep 26 18:52:58 UTC 2016
These values are the same. Avoid the extra computation.
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/intel/blorp/blorp_blit.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
index af46389..1c878e8 100644
--- a/src/intel/blorp/blorp_blit.c
+++ b/src/intel/blorp/blorp_blit.c
@@ -1774,15 +1774,12 @@ surf_convert_to_uncompressed(const struct isl_device *isl_dev,
*x /= fmtl->bw;
*y /= fmtl->bh;
- info->surf.logical_level0_px.width =
- DIV_ROUND_UP(info->surf.logical_level0_px.width, fmtl->bw);
- info->surf.logical_level0_px.height =
- DIV_ROUND_UP(info->surf.logical_level0_px.height, fmtl->bh);
-
assert(info->surf.phys_level0_sa.width % fmtl->bw == 0);
assert(info->surf.phys_level0_sa.height % fmtl->bh == 0);
info->surf.phys_level0_sa.width /= fmtl->bw;
info->surf.phys_level0_sa.height /= fmtl->bh;
+ info->surf.logical_level0_px.width = info->surf.phys_level0_sa.width;
+ info->surf.logical_level0_px.height = info->surf.phys_level0_sa.height;
assert(info->tile_x_sa % fmtl->bw == 0);
assert(info->tile_y_sa % fmtl->bh == 0);
--
2.10.0
More information about the mesa-dev
mailing list