Skip to content

Commit

Permalink
[vulkan] Query wine_vk{Acquire,Release}KeyedMutex
Browse files Browse the repository at this point in the history
Non-standard functions, but exposed by winevulkan to support keyed mutexes.

Co-authored-by: Paul Gofman <[email protected]>
  • Loading branch information
2 people authored and doitsujin committed Aug 23, 2023
1 parent 8226690 commit c26f402
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vulkan/vulkan_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
#define VULKAN_FN(name) \
::PFN_ ## name name = reinterpret_cast<::PFN_ ## name>(sym(#name))

using PFN_wine_vkAcquireKeyedMutex = VkResult (VKAPI_PTR *)(VkDevice device, VkDeviceMemory memory, uint64_t key, uint32_t timeout_ms);
using PFN_wine_vkReleaseKeyedMutex = VkResult (VKAPI_PTR *)(VkDevice device, VkDeviceMemory memory, uint64_t key);

namespace dxvk::vk {

/**
Expand Down Expand Up @@ -436,6 +439,12 @@ namespace dxvk::vk {
#ifdef VK_KHR_PRESENT_WAIT_EXTENSION_NAME
VULKAN_FN(vkWaitForPresentKHR);
#endif

#ifdef VK_KHR_win32_keyed_mutex
// Wine additions to actually use this extension.
VULKAN_FN(wine_vkAcquireKeyedMutex);
VULKAN_FN(wine_vkReleaseKeyedMutex);
#endif
};

}

0 comments on commit c26f402

Please sign in to comment.