mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 16:24:29 +01:00
[vulkan] Allow importing existing Vulkan dispatch tables
This commit is contained in:
parent
b06e82591e
commit
f50f5bc9bc
@ -45,8 +45,13 @@ namespace dxvk::vk {
|
||||
std::tie(m_library, m_getInstanceProcAddr) = loadVulkanLibrary();
|
||||
}
|
||||
|
||||
LibraryLoader::LibraryLoader(PFN_vkGetInstanceProcAddr loaderProc) {
|
||||
m_getInstanceProcAddr = loaderProc;
|
||||
}
|
||||
|
||||
LibraryLoader::~LibraryLoader() {
|
||||
FreeLibrary(m_library);
|
||||
if (m_library)
|
||||
FreeLibrary(m_library);
|
||||
}
|
||||
|
||||
PFN_vkVoidFunction LibraryLoader::sym(VkInstance instance, const char* name) const {
|
||||
@ -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