<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jul 18, 2017 at 1:46 AM, Topi Pohjolainen <span dir="ltr"><<a href="mailto:topi.pohjolainen@gmail.com" target="_blank">topi.pohjolainen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Topi Pohjolainen <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>><br>
---<br>
src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c | 9 +++++++++<br>
1 file changed, 9 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
index a0b129adb4..1b8c0da80d 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_mipmap_tree.c<br>
@@ -1462,6 +1462,15 @@ intel_miptree_get_image_<wbr>offset(const struct intel_mipmap_tree *mt,<br>
isl_surf_get_image_offset_sa(&<wbr>mt->surf, level, slice, z,<br>
&x_offset_sa, &y_offset_sa);<br>
<br>
+ /* In case of compressed formats offsets are expected as blocks. */<br>
+ if (mt->compressed) {<br>
+ const struct isl_format_layout *fmtl =<br>
+ isl_format_get_layout(mt-><wbr>surf.format);<br>
+<br>
+ x_offset_sa /= fmtl->bw;<br>
+ y_offset_sa /= fmtl->bh;<br>
+ }<br></blockquote><div><br></div><div>I think what you probably want is to just to switch to isl_surf_get_image_offset_el()<br><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+<br>
*x = x_offset_sa;<br>
*y = y_offset_sa;<br>
return;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.11.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>
</font></span></blockquote></div><br></div></div>