realitix / vulkan

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

VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME constant missing? #75

Closed jsfrancal closed 2 years ago

jsfrancal commented 2 years ago

Hi, Thank you so much for this great package, I'm using Vulkan with MacOS and the LunarG Vulkan over Metal.

On init the validation layer produces de warning message below (non-blocking). I try to include the constant VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME but it is undefined in the Vulkan namespace. Is there an easy way around this or something to be done at the package level to create the constant? Thanks! Best.

DEBUG: Validation Validation Error: [ VUID-VkDeviceCreateInfo-pProperties-04451 ] Object 0: handle = 0x7ffad4eed4a0, type = VK_OBJECT_TYPE_PHYSICAL_DEVICE; | MessageID = 0x3a3b6ca0 | vkCreateDevice: VK_KHR_portability_subset must be enabled because physical device VkPhysicalDevice 0x7ffad4eed4a0[] supports it The Vulkan spec states: If the [VK_KHR_portability_subset] extension is included in pProperties of vkEnumerateDeviceExtensionProperties, ppEnabledExtensions must include "VK_KHR_portability_subset". (https://vulkan.lunarg.com/doc/view/1.2.176.1/mac/1.2-extensions/vkspec.html#VUID-VkDeviceCreateInfo-pProperties-04451)

realitix commented 2 years ago

Hello @jsfrancal, thanks for your report. I think the VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME constant is not defined because the generator should be updated. Meanwhile you can create this constant yourself VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME = 164

jsfrancal commented 2 years ago

Thanks for your quick reply, I was able to get around this issue cleanly simply by using the intended string substitute of VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME which is 'VK_KHR_portability_subset'. That in turn resulted in the validator asking for the instance extension 'VK_KHR_get_physical_device_properties2'. Once both of these are activated all warnings disappear and the application works as intended.

realitix commented 2 years ago

Ok thanks