Open bigPillowOMG opened 10 months ago
Do you want to obtain the VkExternalMemoryProperties, VkExternalSemaphoreProperties, and VkExternalFenceProperties for these three extensions?
Thanks for bringing this up. That code is auto-generated from the spec and I'll have to check if this is actually correct or not.
Thanks for bringing this up. That code is auto-generated from the spec and I'll have to check if this is actually correct or not.
The aforementioned code is from the VulkanDeviceInfoExtensions::readPhysicalProperties_KHR() function within VulkanDeviceInfoExtensions.cpp. The function aims to acquire the corresponding properties based on the extensions supported by the device. However, I have noticed that within the function, for the three extensions - VK_KHR_external_memory_capabilities, VK_KHR_external_semaphore_capabilities, and VK_KHR_external_fence_capabilities - it seems to query the VkPhysicalDeviceIDProperties. Therefore, I suspect there might be an issue with the code, as it appears that these extensions should respectively be querying the VkExternalMemoryProperties, VkExternalSemaphoreProperties, and VkExternalFenceProperties structures.
Yeah, I changed my comment. That code is auto-generated from the spec, so I need to check if and why it looks like that first.
Just took a look at this. The current code doesn't make much sense, so I'll probably remove it. Adding in the VkExternal*Properties queries won't work here either, due to how that information needs to be queried which is kinda complex and would also require some additions to the database itself.
Just took a look at this. The current code doesn't make much sense, so I'll probably remove it. Adding in the VkExternal*Properties queries won't work here either, due to how that information needs to be queried which is kinda complex and would also require some additions to the database itself.
Thank you for your reply, I am very happy that you can pay attention to this issue. I understand that your code is automatically generated according to the specification, there may be some unnecessary repetition. I also agree with what you said, adding VkExternal*Properties queries may be more complicated, and require some changes to the database itself. I wonder if you have any other ideas or plans to optimize this feature, so that each extension can display its own unique attributes. If you need my help, I am happy to provide you with some suggestions or tests. Looking forward to your next version, your project is very useful and interesting to me. 😊
Is there an issue with the code here? file:VulkanDeviceInfoExtensions.cpp
if (extensionSupported("VK_KHR_external_memory_capabilities")) { const char extension("VK_KHR_external_memory_capabilities"); VkPhysicalDeviceIDProperties extProps = new VkPhysicalDeviceIDProperties{}; extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES; deviceProps2 = initDeviceProperties2(extProps); vulkanContext.vkGetPhysicalDeviceProperties2KHR(device, &deviceProps2); pushProperty2(extension, "deviceUUID", QVariant::fromValue(arrayToQVariantList(extProps->deviceUUID, 16))); pushProperty2(extension, "driverUUID", QVariant::fromValue(arrayToQVariantList(extProps->driverUUID, 16))); pushProperty2(extension, "deviceLUID", QVariant::fromValue(arrayToQVariantList(extProps->deviceLUID, 8))); pushProperty2(extension, "deviceNodeMask", QVariant(extProps->deviceNodeMask)); pushProperty2(extension, "deviceLUIDValid", QVariant(bool(extProps->deviceLUIDValid))); delete extProps; } if (extensionSupported("VK_KHR_external_semaphore_capabilities")) { const char extension("VK_KHR_external_semaphore_capabilities"); VkPhysicalDeviceIDProperties extProps = new VkPhysicalDeviceIDProperties{}; extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES; deviceProps2 = initDeviceProperties2(extProps); vulkanContext.vkGetPhysicalDeviceProperties2KHR(device, &deviceProps2); pushProperty2(extension, "deviceUUID", QVariant::fromValue(arrayToQVariantList(extProps->deviceUUID, 16))); pushProperty2(extension, "driverUUID", QVariant::fromValue(arrayToQVariantList(extProps->driverUUID, 16))); pushProperty2(extension, "deviceLUID", QVariant::fromValue(arrayToQVariantList(extProps->deviceLUID, 8))); pushProperty2(extension, "deviceNodeMask", QVariant(extProps->deviceNodeMask)); pushProperty2(extension, "deviceLUIDValid", QVariant(bool(extProps->deviceLUIDValid))); delete extProps; }
if (extensionSupported("VK_KHR_external_fence_capabilities")) { const char extension("VK_KHR_external_fence_capabilities"); VkPhysicalDeviceIDProperties extProps = new VkPhysicalDeviceIDProperties{}; extProps->sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES; deviceProps2 = initDeviceProperties2(extProps); vulkanContext.vkGetPhysicalDeviceProperties2KHR(device, &deviceProps2); pushProperty2(extension, "deviceUUID", QVariant::fromValue(arrayToQVariantList(extProps->deviceUUID, 16))); pushProperty2(extension, "driverUUID", QVariant::fromValue(arrayToQVariantList(extProps->driverUUID, 16))); pushProperty2(extension, "deviceLUID", QVariant::fromValue(arrayToQVariantList(extProps->deviceLUID, 8))); pushProperty2(extension, "deviceNodeMask", QVariant(extProps->deviceNodeMask)); pushProperty2(extension, "deviceLUIDValid", QVariant(bool(extProps->deviceLUIDValid))); delete extProps; }