<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 07/10/17 23:23, Jason Ekstrand
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAOFGe9513g1g4Vm9A-6FhkXVMGWQJ6kFfusfo=3-_BD2OLhXTg@mail.gmail.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Sat, Oct 7, 2017 at 3:10 PM,
            Lionel Landwerlin <span dir="ltr"><<a
                href="mailto:lionel.g.landwerlin@intel.com"
                target="_blank" moz-do-not-send="true">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"><span
                class="">On 07/10/17 22:44, Jason Ekstrand wrote:<br>
                <blockquote class="gmail_quote" style="margin:0 0 0
                  .8ex;border-left:1px #ccc solid;padding-left:1ex">
                  Previously, we allocated memory for
                  image->plane[0].<a href="http://surface.isl.si"
                    moz-do-not-send="true">surface.isl.si</a><wbr>ze<br>
                  which is great if there is no compression.  However,
                  on BDW, we can do<br>
                  CCS_D on X-tiled images so we also have to allocate
                  space for the<br>
                  auxiliary buffer.  This fixes hangs in some of the WSI
                  CTS tests and<br>
                  should also reduce hangs in real applications.  In
                  particular, it fixes<br>
                  the dEQP-VK.wsi.*.incremental_pres<wbr>ent.* test
                  group.<br>
                  <br>
                  When we hand the image off to X11 or Wayland, it will
                  ignore the CCS<br>
                  entirely which is ok because we do a resolve when it's
                  transitioned to<br>
                  VK_IMAGE_LAYOUT_PRESENT_SRC_KH<wbr>R.<br>
                  <br>
                  Cc: <a
                    href="mailto:mesa-stable@lists.freedesktop.org"
                    target="_blank" moz-do-not-send="true">mesa-stable@lists.freedesktop.<wbr>org</a><br>
                  ---<br>
                    src/intel/vulkan/anv_wsi.c | 2 +-<br>
                    1 file changed, 1 insertion(+), 1 deletion(-)<br>
                  <br>
                  diff --git a/src/intel/vulkan/anv_wsi.c
                  b/src/intel/vulkan/anv_wsi.c<br>
                  index 776f3c3..d0b9099 100644<br>
                  --- a/src/intel/vulkan/anv_wsi.c<br>
                  +++ b/src/intel/vulkan/anv_wsi.c<br>
                  @@ -221,7 +221,7 @@ anv_wsi_image_create(VkDevice
                  device_h,<br>
                       result = anv_AllocateMemory(anv_device_<wbr>to_handle(device),<br>
                          &(VkMemoryAllocateInfo) {<br>
                             .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOC<wbr>ATE_INFO,<br>
                  -         .allocationSize =
                  image->planes[0].surface.isl.s<wbr>ize,<br>
                  +         .allocationSize = image->size,<br>
                </blockquote>
                <br>
              </span>
              Do we also need to return the size including the
              compressed buffer further down this function?<br>
              Right now it's still : *size =
              image->planes[0].surface.isl.s<wbr>ize.<br>
            </blockquote>
            <div><br>
            </div>
            <div>Maybe?  It's used by X11 I guess to pass it off to the
              X server.  I doubt it matters so long as the size we pass
              off a size big enough to contain the normal part of the
              image.  I'm happy to return it in size as well. <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <p>I can't figure if anything actually uses this size :/</p>
    <p>Either way, this actually fixes an issue :<br>
    </p>
    <p>Reviewed-by: Lionel Landwerlin
      <a class="moz-txt-link-rfc2396E" href="mailto:lionel.g.landwerlin@intel.com"><lionel.g.landwerlin@intel.com></a></p>
    <p><br>
    </p>
  </body>
</html>