<p dir="ltr">I think this is correct given that this function is never called on a multisampled image. We should add an assert(samples == 1) somewhere just to be clear.</p>
<div class="gmail_extra"><br><div class="gmail_quote">On Sep 26, 2016 11:53 AM, "Nanley Chery" <<a href="mailto:nanleychery@gmail.com">nanleychery@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">These values are the same. Avoid the extra computation.<br>
<br>
Signed-off-by: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
---<br>
src/intel/blorp/blorp_blit.c | 7 ++-----<br>
1 file changed, 2 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c<br>
index af46389..1c878e8 100644<br>
--- a/src/intel/blorp/blorp_blit.c<br>
+++ b/src/intel/blorp/blorp_blit.c<br>
@@ -1774,15 +1774,12 @@ surf_convert_to_uncompressed(<wbr>const struct isl_device *isl_dev,<br>
*x /= fmtl->bw;<br>
*y /= fmtl->bh;<br>
<br>
- info->surf.logical_level0_px.<wbr>width =<br>
- DIV_ROUND_UP(info->surf.<wbr>logical_level0_px.width, fmtl->bw);<br>
- info->surf.logical_level0_px.<wbr>height =<br>
- DIV_ROUND_UP(info->surf.<wbr>logical_level0_px.height, fmtl->bh);<br>
-<br>
assert(info->surf.phys_level0_<wbr>sa.width % fmtl->bw == 0);<br>
assert(info->surf.phys_level0_<wbr>sa.height % fmtl->bh == 0);<br>
info->surf.phys_level0_sa.<wbr>width /= fmtl->bw;<br>
info->surf.phys_level0_sa.<wbr>height /= fmtl->bh;<br>
+ info->surf.logical_level0_px.<wbr>width = info->surf.phys_level0_sa.<wbr>width;<br>
+ info->surf.logical_level0_px.<wbr>height = info->surf.phys_level0_sa.<wbr>height;<br>
<br>
assert(info->tile_x_sa % fmtl->bw == 0);<br>
assert(info->tile_y_sa % fmtl->bh == 0);<br>
--<br>
2.10.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</blockquote></div></div>