<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, May 3, 2017 at 2:22 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 | 12 ++++++++++++<br>
 1 file changed, 12 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 3a4ac14..55f6027 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>
@@ -1012,6 +1012,18 @@ intel_miptree_match_image(<wbr>struct intel_mipmap_tree *mt,<br>
    if (mt->target == GL_TEXTURE_CUBE_MAP)<br>
       depth = 6;<br>
<br>
+   if (mt->surf.size > 0) {<br>
+      const unsigned level_depth =<br>
+         mt->surf.dim_layout == ISL_DIM_LAYOUT_GEN4_3D ?<br></blockquote><div><br></div><div>I'm fairly sure you want mt->surf.dim == ISL_DIM_3D here instead.  There are two potential layouts for 3D surfaces and they will both have the "depth" in the depth field.  I'm a bit surprised that this passed Jenkins though I guess you've just done it for depth for now.  This comment applies to a good chunk of the next 15 patches or so.<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">
+            minify(mt->surf.logical_<wbr>level0_px.depth, level) :<br>
+            mt->surf.logical_level0_px.<wbr>array_len;<br>
+<br>
+      return width == minify(mt->surf.logical_<wbr>level0_px.width, level) &&<br>
+             height == minify(mt->surf.logical_<wbr>level0_px.height, level) &&<br>
+             depth == level_depth &&<br>
+             MAX2(image->NumSamples, 1) == mt->surf.samples;<br>
+   }<br>
+<br>
    int level_depth = mt->level[level].depth;<br>
    if (mt->num_samples > 1) {<br>
       switch (mt->msaa_layout) {<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.3<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>