realitix / vulkan

The ultimate Python binding for Vulkan API
Apache License 2.0
505 stars 46 forks source link

Compatibility flag is not available #85

Closed cdelacruzpinto closed 10 months ago

cdelacruzpinto commented 2 years ago

In the following Vulkan documentation (https://vulkan.lunarg.com/doc/sdk/1.3.216.0/mac/getting_started.html) ,the following instance flag is referenced: "VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR", which is not available to be imported in the python wrapper library.

This is to solve the following issue under OS X:

Encountered VK_ERROR_INCOMPATIBLE_DRIVER:
Beginning with the 1.3.216 Vulkan SDK, the Vulkan Loader is strictly enforcing the new VK_KHR_PORTABILITY_subset extension. The most likely cause of this error message on instance creation is failure to adhear to this extension, which prevents applications on all platforms from selecting by default a non-conformant Vulkan implementaton without opting in. MoltenVK is currently not fully conformant, and thus supporting this extension is necessary for building robust and portable Vulkan based applications that are good citizens in the Vulkan ecosystem.

Opting in is simple. First add the VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR bit to your VkInstanceCreateInfo structures .flags member, then add two instance extensions to your instance extensions list: VK_KHR_portability_enumeration, and VK_KHR_get_physical_device_properties2.

I take the opportunity to thank you for your awesome work of creating/maintaining this Python wrapper! :-)

realitix commented 10 months ago

It's available now

ravishankarkumar commented 5 months ago

@cdelacruzpinto : I am new to Vulkan and python as well. Can you please attach a snippet of the working code of vkCreateInstance?