<div dir="ltr">I don't really get what this patch is doing.  Why not just use image->n_planes?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 12, 2018 at 11:37 AM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We're not counting correctly with depth & stencil images.<br>
<br>
Signed-off-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a><wbr>><br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=105994" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/<wbr>show_bug.cgi?id=105994</a><br>
---<br>
 src/intel/vulkan/anv_private.h | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>private.h b/src/intel/vulkan/anv_<wbr>private.h<br>
index 53115ae470f..a4297511bbb 100644<br>
--- a/src/intel/vulkan/anv_<wbr>private.h<br>
+++ b/src/intel/vulkan/anv_<wbr>private.h<br>
@@ -2356,6 +2356,10 @@ anv_image_aspect_get_planes(<wbr>VkImageAspectFlags aspect_mask)<br>
    if (aspect_mask & VK_IMAGE_ASPECT_PLANE_2_BIT)<br>
       planes++;<br>
<br>
+   if (aspect_mask & VK_IMAGE_ASPECT_DEPTH_BIT &&<br>
+       aspect_mask & VK_IMAGE_ASPECT_STENCIL_BIT)<br>
+      planes++;<br>
+<br>
    return planes;<br>
 }<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.17.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>