<div dir="ltr">Right.  It's just a very generically named function for a fairly specific task. :-)  Maybe we should just inline in at it's one use.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 12, 2018 at 2:17 PM, 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">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_8997567114767393144moz-cite-prefix">It's supposed to depend on how many
      aspects you've selected for creating the image view (not always
      correlate to the image).<div><div class="h5"><br>
      <br>
      On 12/04/18 14:15, Jason Ekstrand wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      
      <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><wbr>></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" target="_blank">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/s<wbr>how_bug.cgi?id=105994</a><br>
            ---<br>
             src/intel/vulkan/anv_private.<wbr>h | 4 ++++<br>
             1 file changed, 4 insertions(+)<br>
            <br>
            diff --git a/src/intel/vulkan/anv_private<wbr>.h
            b/src/intel/vulkan/anv_private<wbr>.h<br>
            index 53115ae470f..a4297511bbb 100644<br>
            --- a/src/intel/vulkan/anv_private<wbr>.h<br>
            +++ b/src/intel/vulkan/anv_private<wbr>.h<br>
            @@ -2356,6 +2356,10 @@ anv_image_aspect_get_planes(Vk<wbr>ImageAspectFlags
            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="m_8997567114767393144HOEnZb"><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" target="_blank">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>
    </blockquote>
    <p><br>
    </p>
  </div></div></div>

</blockquote></div><br></div>