[Mesa-dev] [PATCH] anv/wsi: Allocate enough memory for the entire image

Lionel Landwerlin lionel.g.landwerlin at intel.com
Sat Oct 7 23:20:46 UTC 2017


On 07/10/17 23:23, Jason Ekstrand wrote:
> On Sat, Oct 7, 2017 at 3:10 PM, Lionel Landwerlin 
> <lionel.g.landwerlin at intel.com <mailto:lionel.g.landwerlin at intel.com>> 
> wrote:
>
>     On 07/10/17 22:44, Jason Ekstrand wrote:
>
>         Previously, we allocated memory for
>         image->plane[0].surface.isl.si <http://surface.isl.si>ze
>         which is great if there is no compression.  However, on BDW,
>         we can do
>         CCS_D on X-tiled images so we also have to allocate space for the
>         auxiliary buffer.  This fixes hangs in some of the WSI CTS
>         tests and
>         should also reduce hangs in real applications.  In particular,
>         it fixes
>         the dEQP-VK.wsi.*.incremental_present.* test group.
>
>         When we hand the image off to X11 or Wayland, it will ignore
>         the CCS
>         entirely which is ok because we do a resolve when it's
>         transitioned to
>         VK_IMAGE_LAYOUT_PRESENT_SRC_KHR.
>
>         Cc: mesa-stable at lists.freedesktop.org
>         <mailto:mesa-stable at lists.freedesktop.org>
>         ---
>           src/intel/vulkan/anv_wsi.c | 2 +-
>           1 file changed, 1 insertion(+), 1 deletion(-)
>
>         diff --git a/src/intel/vulkan/anv_wsi.c
>         b/src/intel/vulkan/anv_wsi.c
>         index 776f3c3..d0b9099 100644
>         --- a/src/intel/vulkan/anv_wsi.c
>         +++ b/src/intel/vulkan/anv_wsi.c
>         @@ -221,7 +221,7 @@ anv_wsi_image_create(VkDevice device_h,
>              result = anv_AllocateMemory(anv_device_to_handle(device),
>                 &(VkMemoryAllocateInfo) {
>                    .sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO,
>         -         .allocationSize = image->planes[0].surface.isl.size,
>         +         .allocationSize = image->size,
>
>
>     Do we also need to return the size including the compressed buffer
>     further down this function?
>     Right now it's still : *size = image->planes[0].surface.isl.size.
>
>
> 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.

I can't figure if anything actually uses this size :/

Either way, this actually fixes an issue :

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171008/cfc314f5/attachment.html>


More information about the mesa-dev mailing list