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

Support for MoltenVK (MacOs)? #40

Closed
adamarbour opened this issue Apr 2, 2018 · 8 comments
Closed

Support for MoltenVK (MacOs)? #40

adamarbour opened this issue Apr 2, 2018 · 8 comments

Comments

@adamarbour
Copy link

Does this currently support MoltenVK? I've added the components to my path and can run vulkaninfo but cannot get the example to run.

raise OSError('Cannot find Vulkan SDK version. Please ensure that it is '
OSError: Cannot find Vulkan SDK version. Please ensure that it is installed and that the <sdk_root>/<version>/lib/ folder is in the library path

When I run vulkaninfo from the command line.

===========
VULKAN INFO
===========

Vulkan API Version: 1.0.69



Instance Extensions:
====================
Instance Extensions	count = 3
	VK_KHR_surface                      : extension revision 25
	VK_MVK_macos_surface                : extension revision  2
	VK_EXT_debug_report                 : extension revision  9
Layers: count = 0
=======
Presentable Surfaces:
=====================
None found
@realitix
Copy link
Owner

realitix commented Apr 2, 2018

Hello @aarbour,
Thanks for opening this issue.
Sadly, I can't test on IOS but I can upgrade this wrapper to the last Vulkan version.

I let you know when it's done, and then you will be able to test again.

@realitix
Copy link
Owner

realitix commented Apr 2, 2018

I have updated the wrapper to the 1.1.71 version, can you try again please ?

@realitix
Copy link
Owner

realitix commented Apr 2, 2018

Ok I understand the problem, I don't load the MoltenVK shared library.
Can you give me the name of the MoltenVk Shared library ?

@adamarbour
Copy link
Author

So under the mac SDK download it is under the MoltenVK folder for both IOS and macOS. I am trying to use the macOS libs which has a:

  • libMoltenVK.dylib
  • MoltenVK.framework
  • MoltenVK_icd.json

These are specific to macOs purely because of Apple's lockdown of Metal. Let me know if you need more information.

@realitix
Copy link
Owner

realitix commented Apr 2, 2018

We are going to update the code as is to check if it works.
Can you try the following test on your computer and let me know if it's working:

  • Localize loaded version of vulkan (in your terminal):
python -c "import vulkan; print(vulkan)"

You should see the path to the __init__ file.

  • Open the file _vulkan.py next to the __init__ file.
  • Line ~97:
    Replace
_lib_names = ('libvulkan.so.1', 'vulkan-1.dll')

by

_lib_names = ('libvulkan.so.1', 'vulkan-1.dll', 'libMoltenVK.dylib')

It should work, and you can test it.
Let me know !

@adamarbour
Copy link
Author

Worked just fine. I followed the getting_started from the vulkan docs and put the libs in the appropriate folders. I am sure adding them to the path would render the same result.

image

@adamarbour
Copy link
Author

One note that I'll need to figure out is that running one of the examples, I get:

raise Exception("validation layers requested, but not available!")
Exception: validation layers requested, but not available!

I'll need to do some research but for now, the package loags.

@realitix
Copy link
Owner

realitix commented Apr 2, 2018

Ok, I'm adding it to the source code. Thanks!

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

2 participants