radv: Remove redundant radv_QueuePresentKHR.
authorBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Mon, 29 Aug 2022 11:21:59 +0000 (13:21 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 31 Aug 2022 03:25:52 +0000 (03:25 +0000)
Does the same thing as the wsi function.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18293>

src/amd/vulkan/layers/radv_sqtt_layer.c
src/amd/vulkan/meson.build
src/amd/vulkan/radv_wsi.c
src/vulkan/wsi/meson.build

index 917d27c..be2094b 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 #include "vk_common_entrypoints.h"
+#include "wsi_common_entrypoints.h"
 #include "radv_private.h"
 #include "radv_shader.h"
 
@@ -404,7 +405,7 @@ sqtt_QueuePresentKHR(VkQueue _queue, const VkPresentInfoKHR *pPresentInfo)
 {
    VkResult result;
 
-   result = radv_QueuePresentKHR(_queue, pPresentInfo);
+   result = wsi_QueuePresentKHR(_queue, pPresentInfo);
    if (result != VK_SUCCESS)
       return result;
 
index 0074b32..499719e 100644 (file)
@@ -177,7 +177,7 @@ libvulkan_radeon = shared_library(
     dep_valgrind, radv_deps, idep_aco,
     idep_mesautil, idep_nir, idep_vulkan_util, idep_vulkan_wsi,
     idep_vulkan_runtime, idep_amdgfxregs_h, idep_xmlconfig,
-    idep_vulkan_common_entrypoints_h
+    idep_vulkan_common_entrypoints_h, idep_vulkan_wsi_entrypoints_h
   ],
   c_args : [no_override_init_args, radv_flags, c_msvc_compat_args],
   cpp_args : [radv_flags, cpp_msvc_compat_args],
index 8d72865..511d0b8 100644 (file)
@@ -113,12 +113,3 @@ radv_finish_wsi(struct radv_physical_device *physical_device)
    physical_device->vk.wsi_device = NULL;
    wsi_device_finish(&physical_device->wsi_device, &physical_device->instance->vk.alloc);
 }
-
-VKAPI_ATTR VkResult VKAPI_CALL
-radv_QueuePresentKHR(VkQueue _queue, const VkPresentInfoKHR *pPresentInfo)
-{
-   RADV_FROM_HANDLE(radv_queue, queue, _queue);
-   return wsi_common_queue_present(&queue->device->physical_device->wsi_device,
-                                   radv_device_to_handle(queue->device), _queue,
-                                   queue->vk.queue_family_index, pPresentInfo);
-}
index fd48474..75a8025 100644 (file)
@@ -71,6 +71,10 @@ idep_vulkan_wsi_headers = declare_dependency(
   include_directories : include_directories('.')
 )
 
+idep_vulkan_wsi_entrypoints_h = declare_dependency(
+  sources : [wsi_entrypoints[0]]
+)
+
 # This is likely a bug in the Meson VS backend, as MSVC with ninja works fine.
 # See this discussion here:
 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10506