Mesa (main): v3dv: 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: 3ed70d775c84c433d1b0612b094727b81d1510f2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ed70d775c84c433d1b0612b094727b81d1510f2

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

v3dv: 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: Iago Toral Quiroga <itoral at igalia.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4037>

---

 src/broadcom/vulkan/v3dv_wsi.c | 42 ------------------------------------------
 1 file changed, 42 deletions(-)

diff --git a/src/broadcom/vulkan/v3dv_wsi.c b/src/broadcom/vulkan/v3dv_wsi.c
index ad77d3970e9..5242bc20538 100644
--- a/src/broadcom/vulkan/v3dv_wsi.c
+++ b/src/broadcom/vulkan/v3dv_wsi.c
@@ -29,9 +29,6 @@
 #include "vk_util.h"
 #include "wsi_common.h"
 #include "wsi_common_drm.h"
-#include "vk_fence.h"
-#include "vk_semaphore.h"
-#include "vk_sync_dummy.h"
 
 static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
 v3dv_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
@@ -147,42 +144,3 @@ v3dv_wsi_get_image_from_swapchain(VkSwapchainKHR swapchain, uint32_t index)
    VkImage image = wsi_common_get_image(swapchain, index);
    return v3dv_image_from_handle(image);
 }
-
-VKAPI_ATTR VkResult VKAPI_CALL
-v3dv_AcquireNextImage2KHR(VkDevice _device,
-                          const VkAcquireNextImageInfoKHR *pAcquireInfo,
-                          uint32_t *pImageIndex)
-{
-   V3DV_FROM_HANDLE(v3dv_device, device, _device);
-   VK_FROM_HANDLE(vk_fence, fence, pAcquireInfo->fence);
-   VK_FROM_HANDLE(vk_semaphore, semaphore, pAcquireInfo->semaphore);
-
-   struct v3dv_physical_device *pdevice = device->pdevice;
-
-   VkResult result = wsi_common_acquire_next_image2(
-      &pdevice->wsi_device, _device, pAcquireInfo, pImageIndex);
-
-   /* signal fence/semaphore - image is available immediately */
-   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 */, 1 /* initial_value */,
-                                   &fence->temporary);
-         if (sync_res != VK_SUCCESS)
-            return sync_res;
-      }
-
-      if (semaphore) {
-         vk_semaphore_reset_temporary(&device->vk, semaphore);
-         sync_res = vk_sync_create(&device->vk, &vk_sync_dummy_type,
-                                   0 /* flags */, 1 /* initial_value */,
-                                   &semaphore->temporary);
-         if (sync_res != VK_SUCCESS)
-            return sync_res;
-      }
-   }
-
-   return result;
-}



More information about the mesa-commit mailing list