<div dir="ltr">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 Fri, Jul 21, 2017 at 8:00 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 | 6 +++++-<br>
1 file changed, 5 insertions(+), 1 deletion(-)<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 56f524abca..3cbdf3c938 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>
@@ -2197,7 +2197,11 @@ intel_miptree_has_color_<wbr>unresolved(const struct intel_mipmap_tree *mt,<br>
num_levels = last_level - start_level + 1;<br>
<br>
for (uint32_t level = start_level; level <= last_level; level++) {<br>
- const uint32_t level_layers = MIN2(num_layers, mt->level[level].depth);<br>
+ uint32_t level_layers = mt->surf.size > 0 ?<br>
+ get_num_phys_layers(&mt->surf, level) : mt->level[level].depth;<br>
+<br>
+ level_layers = MIN2(num_layers, level_layers);<br>
+<br>
for (unsigned a = 0; a < level_layers; a++) {<br>
enum isl_aux_state aux_state =<br>
intel_miptree_get_aux_state(<wbr>mt, level, start_layer + a);<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>