<div dir="ltr">9-12  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 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_screen.c | 11 +++++++++--<br>
 1 file changed, 9 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
index 7a92ef601b..9c74d2aa54 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
@@ -412,8 +412,15 @@ intel_setup_image_from_mipmap_<wbr>tree(struct brw_context *brw, __DRIimage *image,<br>
<br>
    intel_miptree_check_level_<wbr>layer(mt, level, zoffset);<br>
<br>
-   image->width = minify(mt->physical_width0, level - mt->first_level);<br>
-   image->height = minify(mt->physical_height0, level - mt->first_level);<br>
+   if (mt->surf.size > 0) {<br>
+      image->width = minify(mt->surf.phys_level0_<wbr>sa.width,<br>
+                            level - mt->first_level);<br>
+      image->height = minify(mt->surf.phys_level0_<wbr>sa.height,<br>
+                             level - mt->first_level);<br>
+   } else {<br>
+      image->width = minify(mt->physical_width0, level - mt->first_level);<br>
+      image->height = minify(mt->physical_height0, level - mt->first_level);<br>
+   }<br>
    image->pitch = mt->surf.row_pitch;<br>
<br>
    image->offset = intel_miptree_get_tile_<wbr>offsets(mt, level, zoffset,<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>