<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Oct 7, 2017 at 3:23 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5">On Sat, Oct 7, 2017 at 3:10 PM, 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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><span>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" target="_blank">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">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></div></div>
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></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">Reading the DRI3 spec, I think passing the total size is probably best. It says it's supposed to be the size of the buffer.<br></div></div>