1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[vulkan] Allow importing existing Vulkan dispatch tables

This commit is contained in:
Philip Rebohle 2023-03-14 13:01:34 +01:00
parent b06e82591e
commit f50f5bc9bc
2 changed files with 10 additions and 1 deletions

View File

@ -45,7 +45,12 @@ namespace dxvk::vk {
std::tie(m_library, m_getInstanceProcAddr) = loadVulkanLibrary();
}
LibraryLoader::LibraryLoader(PFN_vkGetInstanceProcAddr loaderProc) {
m_getInstanceProcAddr = loaderProc;
}
LibraryLoader::~LibraryLoader() {
if (m_library)
FreeLibrary(m_library);
}
@ -84,6 +89,8 @@ namespace dxvk::vk {
LibraryFn::LibraryFn() { }
LibraryFn::LibraryFn(PFN_vkGetInstanceProcAddr loaderProc)
: LibraryLoader(loaderProc) { }
LibraryFn::~LibraryFn() { }

View File

@ -20,6 +20,7 @@ namespace dxvk::vk {
*/
struct LibraryLoader : public RcObject {
LibraryLoader();
LibraryLoader(PFN_vkGetInstanceProcAddr loaderProc);
~LibraryLoader();
PFN_vkVoidFunction sym(VkInstance instance, const char* name) const;
PFN_vkVoidFunction sym(const char* name) const;
@ -75,6 +76,7 @@ namespace dxvk::vk {
*/
struct LibraryFn : LibraryLoader {
LibraryFn();
LibraryFn(PFN_vkGetInstanceProcAddr loaderProc);
~LibraryFn();
VULKAN_FN(vkCreateInstance);