<div dir="ltr"><div>1-4 are<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 17, 2017 at 6:34 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_tex_image.c    | 6 ++++--<br>
 src/mesa/drivers/dri/i965/<wbr>intel_tex_subimage.c | 6 ++++--<br>
 2 files changed, 8 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c b/src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c<br>
index 68d0a57667..ba5d099fb4 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_tex_image.c<br>
@@ -484,8 +484,10 @@ intel_gettexsubimage_tiled_<wbr>memcpy(struct gl_context *ctx,<br>
        packing->SkipRows);<br>
<br>
    /* Adjust x and y offset based on miplevel */<br>
-   xoffset += image->mt->level[level].level_<wbr>x;<br>
-   yoffset += image->mt->level[level].level_<wbr>y;<br>
+   unsigned level_x, level_y;<br>
+   intel_miptree_get_image_<wbr>offset(image->mt, level, 0, &level_x, &level_y);<br>
+   xoffset += level_x;<br>
+   yoffset += level_y;<br>
<br>
    tiled_to_linear(<br>
       xoffset * cpp, (xoffset + width) * cpp,<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_tex_subimage.c b/src/mesa/drivers/dri/i965/<wbr>intel_tex_subimage.c<br>
index da5b3f0d30..b498b2e1c0 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_tex_subimage.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_tex_subimage.c<br>
@@ -181,8 +181,10 @@ intel_texsubimage_tiled_<wbr>memcpy(struct gl_context * ctx,<br>
        packing->SkipRows, for_glTexImage);<br>
<br>
    /* Adjust x and y offset based on miplevel */<br>
-   xoffset += image->mt->level[level].level_<wbr>x;<br>
-   yoffset += image->mt->level[level].level_<wbr>y;<br>
+   unsigned level_x, level_y;<br>
+   intel_miptree_get_image_<wbr>offset(image->mt, level, 0, &level_x, &level_y);<br>
+   xoffset += level_x;<br>
+   yoffset += level_y;<br>
<br>
    linear_to_tiled(<br>
       xoffset * cpp, (xoffset + width) * cpp,<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>