Mesa (main): lavapipe: Use the common AcquireNextImage implementation

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jun 10 02:14:01 UTC 2022


Module: Mesa
Branch: main
Commit: 384c31425abb51b75cbb595008523461f6dbbd72
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=384c31425abb51b75cbb595008523461f6dbbd72

Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date:   Thu May 19 19:38:27 2022 -0500

lavapipe: Use the common AcquireNextImage implementation

The only reason for the wrapper was so that we could dummy signal the
semaphore and fence.  Now that the WSI code always dos this for us, we
can drop our wrapper.

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4037>

---

 src/gallium/frontends/lavapipe/lvp_wsi.c | 43 --------------------------------
 1 file changed, 43 deletions(-)

diff --git a/src/gallium/frontends/lavapipe/lvp_wsi.c b/src/gallium/frontends/lavapipe/lvp_wsi.c
index 333241ac97a..39d4f826fa8 100644
--- a/src/gallium/frontends/lavapipe/lvp_wsi.c
+++ b/src/gallium/frontends/lavapipe/lvp_wsi.c
@@ -23,10 +23,6 @@
 
 #include "lvp_wsi.h"
 
-#include "vk_fence.h"
-#include "vk_semaphore.h"
-#include "vk_sync_dummy.h"
-
 static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
 lvp_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
 {
@@ -59,42 +55,3 @@ lvp_finish_wsi(struct lvp_physical_device *physical_device)
    wsi_device_finish(&physical_device->wsi_device,
                      &physical_device->vk.instance->alloc);
 }
-
-VKAPI_ATTR VkResult VKAPI_CALL lvp_AcquireNextImage2KHR(
-   VkDevice                                     _device,
-   const VkAcquireNextImageInfoKHR*             pAcquireInfo,
-   uint32_t*                                    pImageIndex)
-{
-   LVP_FROM_HANDLE(lvp_device, device, _device);
-   struct lvp_physical_device *pdevice = device->physical_device;
-
-   VkResult result = wsi_common_acquire_next_image2(&pdevice->wsi_device,
-                                                    _device,
-                                                    pAcquireInfo,
-                                                    pImageIndex);
-
-   VK_FROM_HANDLE(vk_fence, fence, pAcquireInfo->fence);
-   VK_FROM_HANDLE(vk_semaphore, sem, pAcquireInfo->semaphore);
-   if (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR) {
-      VkResult sync_res;
-      if (fence) {
-         vk_fence_reset_temporary(&device->vk, fence);
-         sync_res = vk_sync_create(&device->vk, &vk_sync_dummy_type,
-                                   0 /* flags */, 0 /* initial_value */,
-                                   &fence->temporary);
-         if (sync_res != VK_SUCCESS)
-            return sync_res;
-      }
-
-      if (sem) {
-         vk_semaphore_reset_temporary(&device->vk, sem);
-         sync_res = vk_sync_create(&device->vk, &vk_sync_dummy_type,
-                                   0 /* flags */, 0 /* initial_value */,
-                                   &sem->temporary);
-         if (sync_res != VK_SUCCESS)
-            return sync_res;
-      }
-   }
-
-   return result;
-}



More information about the mesa-commit mailing list