summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@collabora.com>2022-05-19 19:34:12 -0500
committerMarge Bot <emma+marge@anholt.net>2022-06-10 01:33:12 +0000
commita09e08ae955ee9c31338e865da744a4adb03f24c (patch)
treed84ebe6f26d18fa55b6c6c53596a8e0bc459bbfa
parentb03216de9cc8a9d22db69bf96d82b1898806e7e8 (diff)
panvk: 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: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4037>
-rw-r--r--src/panfrost/vulkan/panvk_wsi.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/panfrost/vulkan/panvk_wsi.c b/src/panfrost/vulkan/panvk_wsi.c
index 2af6f85ccc1..d48f9d2d2c9 100644
--- a/src/panfrost/vulkan/panvk_wsi.c
+++ b/src/panfrost/vulkan/panvk_wsi.c
@@ -27,9 +27,6 @@
#include "panvk_private.h"
-#include "vk_fence.h"
-#include "vk_semaphore.h"
-#include "vk_sync_dummy.h"
#include "vk_util.h"
#include "wsi_common.h"
@@ -68,42 +65,3 @@ panvk_wsi_finish(struct panvk_physical_device *physical_device)
wsi_device_finish(&physical_device->wsi_device,
&physical_device->instance->vk.alloc);
}
-
-VkResult
-panvk_AcquireNextImage2KHR(VkDevice _device,
- const VkAcquireNextImageInfoKHR *pAcquireInfo,
- uint32_t *pImageIndex)
-{
- VK_FROM_HANDLE(panvk_device, device, _device);
- VK_FROM_HANDLE(vk_fence, fence, pAcquireInfo->fence);
- VK_FROM_HANDLE(vk_semaphore, sem, pAcquireInfo->semaphore);
- struct panvk_physical_device *pdevice = device->physical_device;
-
- 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 */, 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;
-}