configure: add option to statically link to libvulkan
This may be useful in weird setups and on platforms where static linking to libvulkan is supported. libplacebo also has this fallback.
This commit is contained in:
parent
8fbecfd1a0
commit
1b8cd00da6
2 changed files with 15 additions and 1 deletions
|
|
@ -533,11 +533,19 @@ static int vkfmt_from_pixfmt2(AVHWDeviceContext *dev_ctx, enum AVPixelFormat p,
|
|||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
#if CONFIG_VULKAN_STATIC
|
||||
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance,
|
||||
const char *pName);
|
||||
#endif
|
||||
|
||||
static int load_libvulkan(AVHWDeviceContext *ctx)
|
||||
{
|
||||
VulkanDevicePriv *p = ctx->hwctx;
|
||||
AVVulkanDeviceContext *hwctx = &p->p;
|
||||
|
||||
#if CONFIG_VULKAN_STATIC
|
||||
hwctx->get_proc_addr = vkGetInstanceProcAddr;
|
||||
#else
|
||||
static const char *lib_names[] = {
|
||||
#if defined(_WIN32)
|
||||
"vulkan-1.dll",
|
||||
|
|
@ -563,6 +571,7 @@ static int load_libvulkan(AVHWDeviceContext *ctx)
|
|||
}
|
||||
|
||||
hwctx->get_proc_addr = (PFN_vkGetInstanceProcAddr)dlsym(p->libvulkan, "vkGetInstanceProcAddr");
|
||||
#endif /* CONFIG_VULKAN_STATIC */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue