<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">I should start to remember to put
      someone in Cc...<br>
      <br>
      On 13/08/16 01:30, Jason Ekstrand wrote:<br>
    </div>
    <blockquote
cite="mid:CAOFGe95HAgHeGwYOR+5FV1-r8vTq_zZM7A-wvgYHVAa8RgEcYQ@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div>Much better. Thanks!<br>
          <br>
        </div>
        Reviewed-by: Jason Ekstrand <<a moz-do-not-send="true"
          href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Aug 12, 2016 at 5:00 PM, Lionel
          Landwerlin <span dir="ltr"><<a moz-do-not-send="true"
              href="mailto:llandwerlin@gmail.com" target="_blank">llandwerlin@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex"><span
              class="">We let the user believe we support some transfer
              formats which we don't.<br>
              This can lead to crashes when actually trying to use those
              formats for<br>
              example on dEQP-VK.api.copy_and_blit.<wbr>image_to_image.*
              tests.<br>
              <br>
              Let all formats we can render to or sample from as meta
              implements transfers<br>
              using attachments.<br>
              <br>
              Signed-off-by: Lionel Landwerlin <<a
                moz-do-not-send="true"
                href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a><wbr>><br>
              Cc: Jason Ekstrand <<a moz-do-not-send="true"
                href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
              ---<br>
            </span> src/intel/vulkan/anv_formats.c | 22
            ++++++----------------<br>
             1 file changed, 6 insertions(+), 16 deletions(-)<br>
            <br>
            diff --git a/src/intel/vulkan/anv_<wbr>formats.c
            b/src/intel/vulkan/anv_<wbr>formats.c<br>
            index b26e48a..b06e29b 100644<br>
            --- a/src/intel/vulkan/anv_<wbr>formats.c<br>
            +++ b/src/intel/vulkan/anv_<wbr>formats.c<br>
            @@ -507,25 +507,15 @@ VkResult anv_<wbr>GetPhysicalDeviceImageFormatPr<wbr>operties(<br>
                   sampleCounts = isl_device_get_sample_counts(&<wbr>physical_device->isl_dev);<br>
                }<br>
            <br>
            -   if (usage & VK_IMAGE_USAGE_TRANSFER_SRC_<wbr>BIT) {<br>
            -      /* Meta implements transfers by sampling from the
            source image. */<br>
            <span class="">-      if (!(format_feature_flags &
              VK_FORMAT_FEATURE_SAMPLED_<wbr>IMAGE_BIT)) {<br>
            </span>-         goto unsupported;<br>
            -      }<br>
            -   }<br>
            -<br>
            -#if 0<br>
            -   if (usage & VK_IMAGE_USAGE_TRANSFER_DST_<wbr>BIT) {<br>
            <span class="">-      if (anv_format_for_vk_format(<wbr>format)->has_stencil)
              {<br>
              -         /* Not yet implemented because copying to a
              W-tiled surface is crazy<br>
              -          * hard.<br>
              -          */<br>
              -         anv_finishme("support
              VK_IMAGE_USAGE_TRANSFER_DST_<wbr>BIT for "<br>
              -                      "stencil format");<br>
            </span>+   if (usage & (VK_IMAGE_USAGE_TRANSFER_SRC_<wbr>BIT
            |<br>
            +                VK_IMAGE_USAGE_TRANSFER_DST_<wbr>BIT)) {<br>
            +      /* Accept transfers on anything we can sample from or
            renderer to. */<br>
            <span class="im HOEnZb">+      if (!(format_feature_flags
              & (VK_FORMAT_FEATURE_COLOR_<wbr>ATTACHMENT_BIT |<br>
              +                                   
              VK_FORMAT_FEATURE_DEPTH_<wbr>STENCIL_ATTACHMENT_BIT |<br>
              +                                   
              VK_FORMAT_FEATURE_SAMPLED_<wbr>IMAGE_BIT))) {<br>
            </span>
            <div class="HOEnZb">
              <div class="h5">          goto unsupported;<br>
                       }<br>
                    }<br>
                -#endif<br>
                <br>
                    if (usage & VK_IMAGE_USAGE_SAMPLED_BIT) {<br>
                       if (!(format_feature_flags &
                VK_FORMAT_FEATURE_SAMPLED_<wbr>IMAGE_BIT)) {<br>
                --<br>
                2.8.1<br>
                <br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
mesa-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a>
</pre>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>