[Mesa-dev] [PATCH v2 00/32] vulkan/wsi: Rework WSI to look a lot more like a layer

Jason Ekstrand jason at jlekstrand.net
Wed Nov 29 00:28:12 UTC 2017


This patch series is a v2 of the one I sent out a couple weeks ago to
rewrite Vulkan window system integration.  The original patch series can be
found on patchwork here:

https://patchwork.freedesktop.org/series/33961/

This series can be found as a git branch here:

https://cgit.freedesktop.org/~jekstrand/mesa/log/?h=review/vulkan-wsi-rewrite-v2

Notable changes in v2:

 - Added implementations of VK_EXT_external_memory_dma_buf to both drivers
   and use that for WSI images instead of assuming that OPAQUE_FD means you
   always get a prime fd.

 - Tweaked the WSI "extension" used by the two drivers so that it explicitly
   enables implicit sync through a chain-in to vkAllocateMemory.

 - Reworked the ANV implementation of the WSI "extension" to use modifiers
   internally.  This reduces some of the code churn when trying to add
   modifiers to the WSI stack.

 - Made ANV require a dedicated allocation for modified images (now
   includes all WSI images) and switched us to setting the BO tiling in
   vkAllocateMemory.

 - Rebased part-way on top of my series to rework CCS and resolves in ANV.
   This fixes some issues when you hack things up to enable Y-tiling and is
   required for modifiers.

 - Implemented VK_KHR_get_surface_capabilities2 in radv because it was easy.

Cc: Dave Airlie <airlied at redhat.com>
Cc: Daniel Stone <daniels at collabora.com>
Cc: Chad Versace <chadversary at chromium.org>

Daniel Stone (1):
  vulkan/wsi: Add a wsi_image structure

Dave Airlie (3):
  radv/wsi: drop allocate memory special case
  radv/wsi: Move the guts of QueuePresent to wsi common
  vulkan/wsi: move swapchain create/destroy to common code

Jason Ekstrand (28):
  vulkan/wsi/x11: Handle the geometry check earlier in create_swapchain
  vulkan/wsi: Add a wsi_device_init function
  vulkan/wsi: Add wsi_swapchain_init/finish functions
  vulkan/wsi: Add a mock image creation extension
  anv: Implement VK_EXT_external_memory_dma_buf
  radv: Implement VK_EXT_external_memory_dma_buf
  anv/image: Add a drm_format_mod field
  anv: Require a dedicated allocation for modified images
  anv/image: Implement the wsi "extension"
  radv/image: Implement the wsi "extension"
  radv: Move wsi initialization later in physical_device_init
  vulkan/wsi: Implement prime in a completely generic way
  vulkan/wsi: Do image creation in common code
  vulkan/wsi: Add a WSI_FROM_HANDLE macro
  vulkan/wsi: Refactor result handling in queue_present
  vulkan/wsi: Only wait on semaphores on the first swapchain
  vulkan/wsi: Set a proper pWaitDstStageMask on the dummy submit
  anv/wsi: Use the common QueuePresent code
  anv/wsi: Enable prime support
  vulkan/wsi: Move get_images into common code
  vulkan/wsi: Move prime blitting into queue_present
  vulkan/wsi: Add a helper for AcquireNextImage
  vulkan/wsi: Move wsi_swapchain to wsi_common_private.h
  vulkan/wsi: Drop the can_handle_different_gpu parameter from
    get_support
  vulkan/wsi: Add wrappers for all of the surface queries
  vulkan/wsi: Drop some unneeded cruft from the API
  vulkan/wsi: Initialize individual WSI interfaces in wsi_device_init
  radv: Implement VK_KHR_get_surface_capabilities2

 src/amd/vulkan/radv_device.c        |  43 +-
 src/amd/vulkan/radv_extensions.py   |   2 +
 src/amd/vulkan/radv_formats.c       |   8 +-
 src/amd/vulkan/radv_image.c         |   8 +-
 src/amd/vulkan/radv_private.h       |  10 -
 src/amd/vulkan/radv_wsi.c           | 495 ++++-------------------
 src/intel/vulkan/anv_device.c       |  77 +++-
 src/intel/vulkan/anv_extensions.py  |   1 +
 src/intel/vulkan/anv_formats.c      |   8 +-
 src/intel/vulkan/anv_image.c        |  30 +-
 src/intel/vulkan/anv_private.h      |   5 +
 src/intel/vulkan/anv_wsi.c          | 348 +++-------------
 src/vulkan/Makefile.sources         |   2 +
 src/vulkan/wsi/meson.build          |   2 +
 src/vulkan/wsi/wsi_common.c         | 772 ++++++++++++++++++++++++++++++++++++
 src/vulkan/wsi/wsi_common.h         | 227 ++++++-----
 src/vulkan/wsi/wsi_common_private.h | 157 ++++++++
 src/vulkan/wsi/wsi_common_wayland.c |  90 ++---
 src/vulkan/wsi/wsi_common_x11.c     | 150 ++-----
 19 files changed, 1411 insertions(+), 1024 deletions(-)
 create mode 100644 src/vulkan/wsi/wsi_common.c
 create mode 100644 src/vulkan/wsi/wsi_common_private.h

-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list