Using SetDefaultGetInstanceProcAddr on MacOS just causes the error vulkan: error loading default getProcAddr. This is because:
- First, this function calls
setDefaultProcAddr
- In
setDefaultProcAddr, it calls getDefaultProcAddr
|
getInstanceProcAddress = getDefaultProcAddr(); |
- In
getDefaultProcAddr, for MacOS, it just returns NULL
|
#elif defined(__APPLE__) && defined(__MACH__) |
|
// return &loaderWrap; |
|
return NULL; |
- In
SetDefaultGetInstanceProcAddr, it checks for isProcAddrSet
|
if C.isProcAddrSet() == 0 { |
|
return errors.New("vulkan: error loading default getProcAddr") |
|
} |
- In
isProcAddrSet, it checks if it is equal to NULL
|
return getInstanceProcAddress == NULL ? 0 : 1; |
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.
Using
SetDefaultGetInstanceProcAddron MacOS just causes the errorvulkan: error loading default getProcAddr. This is because:setDefaultProcAddrvulkan/init.go
Line 22 in 956e385
setDefaultProcAddr, it callsgetDefaultProcAddrvulkan/vk_wrapper_desktop.c
Line 14 in 956e385
getDefaultProcAddr, for MacOS, it just returnsNULLvulkan/vk_default_loader.c
Lines 35 to 37 in 956e385
SetDefaultGetInstanceProcAddr, it checks forisProcAddrSetvulkan/init.go
Lines 23 to 25 in 956e385
isProcAddrSet, it checks if it is equal toNULLvulkan/vk_wrapper_desktop.c
Line 18 in 956e385
Therefore, on MacOS,
isProcAddrSetwill 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.