radv: Remove dependencies on vk_common entrypoints.

Fixes: 91fe0b5629 ("radv: Delete lots of sync code.")
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14366>
This commit is contained in:
Bas Nieuwenhuizen 2021-12-31 17:27:18 +01:00
parent 8c4c63a6ed
commit 46c59e8fd6
2 changed files with 13 additions and 13 deletions

View file

@ -22,16 +22,17 @@
*/ */
#include "radv_private.h" #include "radv_private.h"
#include "vk_common_entrypoints.h"
VKAPI_ATTR VkResult VKAPI_CALL VKAPI_ATTR VkResult VKAPI_CALL
metro_exodus_GetSemaphoreCounterValue(VkDevice _device, VkSemaphore _semaphore, uint64_t *pValue) metro_exodus_GetSemaphoreCounterValue(VkDevice _device, VkSemaphore _semaphore, uint64_t *pValue)
{ {
VK_FROM_HANDLE(vk_device, device, _device);
/* See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5119. */ /* See https://gitlab.freedesktop.org/mesa/mesa/-/issues/5119. */
if (_semaphore == VK_NULL_HANDLE) { if (_semaphore == VK_NULL_HANDLE) {
fprintf(stderr, "RADV: Ignoring vkGetSemaphoreCounterValue() with NULL semaphore (game bug)!\n"); fprintf(stderr, "RADV: Ignoring vkGetSemaphoreCounterValue() with NULL semaphore (game bug)!\n");
return VK_SUCCESS; return VK_SUCCESS;
} }
return vk_common_GetSemaphoreCounterValue(_device, _semaphore, pValue); return device->dispatch_table.GetSemaphoreCounterValue(_device, _semaphore, pValue);
} }

View file

@ -37,7 +37,6 @@
#include "util/os_file.h" #include "util/os_file.h"
#include "radv_private.h" #include "radv_private.h"
#include "vk_common_entrypoints.h"
#include "vk_util.h" #include "vk_util.h"
#ifdef ANDROID #ifdef ANDROID
@ -427,7 +426,7 @@ radv_AcquireImageANDROID(VkDevice device_h, VkImage image_h, int nativeFenceFd,
.handleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, .handleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT,
.fd = semaphore_fd, .fd = semaphore_fd,
}; };
result = vk_common_ImportSemaphoreFdKHR(device_h, &info); result = device->vk.dispatch_table.ImportSemaphoreFdKHR(device_h, &info);
if (result == VK_SUCCESS) if (result == VK_SUCCESS)
semaphore_fd = -1; /* RADV took ownership */ semaphore_fd = -1; /* RADV took ownership */
} }
@ -440,7 +439,7 @@ radv_AcquireImageANDROID(VkDevice device_h, VkImage image_h, int nativeFenceFd,
.handleType = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT, .handleType = VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT,
.fd = fence_fd, .fd = fence_fd,
}; };
result = vk_common_ImportFenceFdKHR(device_h, &info); result = device->vk.dispatch_table.ImportFenceFdKHR(device_h, &info);
if (result == VK_SUCCESS) if (result == VK_SUCCESS)
fence_fd = -1; /* RADV took ownership */ fence_fd = -1; /* RADV took ownership */
} }
@ -471,8 +470,8 @@ radv_QueueSignalReleaseImageANDROID(VkQueue _queue, uint32_t waitSemaphoreCount,
for (uint32_t i = 0; i < waitSemaphoreCount; ++i) { for (uint32_t i = 0; i < waitSemaphoreCount; ++i) {
int tmp_fd; int tmp_fd;
result = result = queue->device->vk.dispatch_table.GetSemaphoreFdKHR(
vk_common_GetSemaphoreFdKHR(radv_device_to_handle(queue->device), radv_device_to_handle(queue->device),
&(VkSemaphoreGetFdInfoKHR){ &(VkSemaphoreGetFdInfoKHR){
.sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR, .sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR,
.handleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT, .handleType = VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT,