Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetDefaultGetInstanceProcAddr doesn't work on MacOS #58

Open
Nv7-GitHub opened this issue Jan 12, 2022 · 0 comments
Open

SetDefaultGetInstanceProcAddr doesn't work on MacOS #58

Nv7-GitHub opened this issue Jan 12, 2022 · 0 comments

Comments

@Nv7-GitHub
Copy link

Nv7-GitHub commented Jan 12, 2022

Using SetDefaultGetInstanceProcAddr on MacOS just causes the error vulkan: error loading default getProcAddr. This is because:

  1. First, this function calls setDefaultProcAddr

    vulkan/init.go

    Line 22 in 956e385

    C.setDefaultProcAddr()
  2. In setDefaultProcAddr, it calls getDefaultProcAddr
    getInstanceProcAddress = getDefaultProcAddr();
  3. In getDefaultProcAddr, for MacOS, it just returns NULL
    #elif defined(__APPLE__) && defined(__MACH__)
    // return &loaderWrap;
    return NULL;
  4. In SetDefaultGetInstanceProcAddr, it checks for isProcAddrSet

    vulkan/init.go

    Lines 23 to 25 in 956e385

    if C.isProcAddrSet() == 0 {
    return errors.New("vulkan: error loading default getProcAddr")
    }
  5. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant