Open Nv7-GitHub opened 2 years ago
Using SetDefaultGetInstanceProcAddr on MacOS just causes the error vulkan: error loading default getProcAddr. This is because:
SetDefaultGetInstanceProcAddr
vulkan: error loading default getProcAddr
setDefaultProcAddr
getDefaultProcAddr
NULL
isProcAddrSet
Therefore, on MacOS, isProcAddrSet will always return false. Why is it like this? Is there a way to get around this error? If you ignore it, you just get an error about proc addr not being set in Init.
Init
Using
SetDefaultGetInstanceProcAddr
on MacOS just causes the errorvulkan: error loading default getProcAddr
. This is because:setDefaultProcAddr
https://github.com/vulkan-go/vulkan/blob/956e3850d8f9d2e617caf5a60622c638ff729c2b/init.go#L22setDefaultProcAddr
, it callsgetDefaultProcAddr
https://github.com/vulkan-go/vulkan/blob/956e3850d8f9d2e617caf5a60622c638ff729c2b/vk_wrapper_desktop.c#L14getDefaultProcAddr
, for MacOS, it just returnsNULL
https://github.com/vulkan-go/vulkan/blob/956e3850d8f9d2e617caf5a60622c638ff729c2b/vk_default_loader.c#L35-L37SetDefaultGetInstanceProcAddr
, it checks forisProcAddrSet
https://github.com/vulkan-go/vulkan/blob/956e3850d8f9d2e617caf5a60622c638ff729c2b/init.go#L23-L25isProcAddrSet
, it checks if it is equal toNULL
https://github.com/vulkan-go/vulkan/blob/956e3850d8f9d2e617caf5a60622c638ff729c2b/vk_wrapper_desktop.c#L18Therefore, on MacOS,
isProcAddrSet
will always return false. Why is it like this? Is there a way to get around this error? If you ignore it, you just get an error about proc addr not being set inInit
.