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:
parent
b06e82591e
commit
f50f5bc9bc
@ -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() { }
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user