mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 04:50:11 +01:00
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:
parent
8c4c63a6ed
commit
46c59e8fd6
2 changed files with 13 additions and 13 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,14 +470,14 @@ 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,
|
||||||
.semaphore = pWaitSemaphores[i],
|
.semaphore = pWaitSemaphores[i],
|
||||||
},
|
},
|
||||||
&tmp_fd);
|
&tmp_fd);
|
||||||
if (result != VK_SUCCESS) {
|
if (result != VK_SUCCESS) {
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue