1. 05 Feb, 2021 1 commit
    • Joseph Jenner-Bailey's avatar
      layer: improve how layer handles Vulkan extensions · 950cdd40
      Joseph Jenner-Bailey authored
      
      
      In vkCreateInstance:
      
      - ppEnabledExtensionNames is checked to determine which window-system
        platforms the layer should enable support for.
      - support in the layer is always enabled if possible, even if this may
        be provided by the ICDs. Platforms not supported by the layer should
        still be correctly supported by the ICDs (untested.)
      - pApplicationInfo is changed to bump the Vulkan API version
        in order to enable instance extensions that are necessary for some
        of the platforms implemented in the layer.
      
      In vkCreateDevice:
      
      - ppEnabledExtensionNames is extended with device extensions required
        by the layer.
      - if the extensions are not supported by the physical device, the
        layer fails to initialize the device.
      
      Change-Id: Ibdd69fca38e7909d5b8f0ac7698805ea5f425ac6
      Signed-off-by: Joseph Jenner-Bailey's avatarJoe Jenner-Bailey <joe.jenner-bailey@arm.com>
      Signed-off-by: Matteo Franchin's avatarMatteo Franchin <matteo.franchin@arm.com>
      950cdd40
  2. 18 Jan, 2021 1 commit
  3. 10 Dec, 2020 1 commit
    • Matteo Franchin's avatar
      Use util::allocator in swapchain object · f0b541a4
      Matteo Franchin authored
      
      
      Change util::allocator's create and destroy methods so that they can
      allocate multiple objects, in line with the allocate and deallocate
      methods of std::allocator.
      
      Also add documentation for util::allocator and its methods.
      
      Finally, use util::allocator in swapchain.cpp, rather than allocating
      memory directly via VkAllocationCallbacks.
      
      Change-Id: I0bc25abe3cbc3af9608218411da8d70e04dd9749
      Signed-off-by: Matteo Franchin's avatarMatteo Franchin <matteo.franchin@arm.com>
      f0b541a4
  4. 03 Dec, 2020 1 commit
  5. 30 Nov, 2020 1 commit
    • Joseph Jenner-Bailey's avatar
      Implement a vector utility that uses a custom allocator · 9585b28b
      Joseph Jenner-Bailey authored
      
      
      Add util::vector to provide functionality similar to std::vector,
      i.e. growable arrays. util::vector does its allocations via a custom
      allocator provided via VkAllocationCallbacks and provides methods to
      check whether the allocation fails, e.g. try_push_back() returns false
      when the allocation fails and replaces std::vector's push_back() method
      that would rather raise an exception to report an allocation failure.
      
      Note that this commit switches on exceptions in the layer by removing
      the flag -fno-exceptions.
      
      util::vector is also used to store swapchain images.
      
      Change-Id: I2bf2b24bd06e198c198c4f4aedd8f7fced96a346
      Signed-off-by: Joseph Jenner-Bailey's avatarJoe Jenner-Bailey <joe.jenner-bailey@arm.com>
      Signed-off-by: Matteo Franchin's avatarMatteo Franchin <matteo.franchin@arm.com>
      9585b28b
  6. 26 Nov, 2020 1 commit
  7. 27 Oct, 2020 1 commit
    • Dennis Tsiang's avatar
      Fix failing assert in swapchain_base.cpp · f782eab9
      Dennis Tsiang authored
      
      
      Erroneous assert was left in swapchain_base.cpp after some refactoring
      was done. This commit removes the assert and updates the CMakeLists.txt
      file to turn on compiler warnings so that developers can spot these
      leftover code earlier.
      
      Change-Id: I7f4051c89a86f21f66f20b0e92f01bc101436c71
      Signed-off-by: Dennis Tsiang's avatarDennis Tsiang <dennis.tsiang@arm.com>
      f782eab9
  8. 29 Jun, 2020 1 commit
  9. 01 May, 2020 1 commit
    • Dennis Tsiang's avatar
      Remove use of pthread_cancel in the swapchain page flip thread · 81544d04
      Dennis Tsiang authored
      
      
      The WSI layer may call pthread_cancel and kill the page flip
      thread while it's still being used in Vulkan-API calls. This can cause the
      layer to fail to clean up internal resources of the associated device,
      leading to memory leaks. To resolve this, the layer now instead checks
      if the page flip thread needs to end on every loop iteration. The
      m_page_flip_semaphore has also been changed to a timed_semaphore to avoid
      hanging indefinitely. In addition, m_page_flip_thread is now type
      std::thread, which follows the gradual move towards C++ standard code
      and moved to a private member function of the class.
      
      Change-Id: Iefbdd0d68e1f92fdf79bcebb7eaf33429fc61fd3
      Signed-off-by: Dennis Tsiang's avatarDennis Tsiang <dennis.tsiang@arm.com>
      81544d04
  10. 21 Nov, 2019 1 commit
    • Rosen's avatar
      Move WSI type specific calls · 32623418
      Rosen authored
      
      
      Move all WSI type specific calls to WSI factory methods. This
      removes headless references in layer/ and allows for simpler
      support of multiple windowing systems.
      
      Change-Id: I757a7a3bb4267783420b52cceb3bde8ce233297e
      Signed-off-by: Rosen's avatarRosen Zhelev <rosen.zhelev@arm.com>
      32623418
  11. 30 Sep, 2019 1 commit
  12. 11 Sep, 2019 1 commit
  13. 31 May, 2019 1 commit
    • Matteo Franchin's avatar
      Initial sources for the vulkan-wsi-layer project · 9b698b4a
      Matteo Franchin authored
      
      
      This commit adds the initial sources for the vulkan-wsi-layer project:
      a Vulkan layer which implements some of the Vulkan window system
      integration extensions such as VK_KHR_swapchain.
      The layer is designed to be GPU vendor agnostic when used as part of the
      Vulkan ICD/loader architecture.
      
      The project currently implements support for VK_EXT_headless_surface and
      its dependencies. We hope to extend support for further platforms such
      as Wayland and direct-to-display rendering in the future.
      
      This initial commit collects contributions from different individuals
      employed by Arm.
      
      More information on the project (building instructions, how to
      contribute, etc.) can be found on the README.md file at the top of the
      project tree.
      Signed-off-by: Matteo Franchin's avatarMatteo Franchin <matteo.franchin@arm.com>
      9b698b4a