Additional changes to Vulkan 1.1 API updates
This commit includes the following:
- Make new/Vulkan 1.1 core commands be optional in codegen. Before this
change, the loader crashed when starting with a 1.0 app, and using a 1.0 ICD.
That's because the loader couldn't find "required" 1.1 entrypoints. This
change makes those entrypoints "optional" with a new annotation in the api
file.
- Changes from internal reviews, including a fix for the algorithm of
EnumeratePhysicalDeviceGroups.
Test: Run with a 1.0 app with a 1.0 driver and make sure the loader works
Change-Id: I55914b680a1601cb9f3f2cc0257091a0a34ae7f2
diff --git a/vulkan/libvulkan/driver.cpp b/vulkan/libvulkan/driver.cpp
index dfe6793..ade0bde 100644
--- a/vulkan/libvulkan/driver.cpp
+++ b/vulkan/libvulkan/driver.cpp
@@ -1053,9 +1053,13 @@
instance, pPhysicalDeviceGroupCount, pPhysicalDeviceGroupProperties);
if ((result == VK_SUCCESS || result == VK_INCOMPLETE) &&
*pPhysicalDeviceGroupCount && pPhysicalDeviceGroupProperties) {
- for (uint32_t i = 0;
- i < pPhysicalDeviceGroupProperties->physicalDeviceCount; i++)
- SetData(pPhysicalDeviceGroupProperties->physicalDevices[i], data);
+ for (uint32_t i = 0; i < *pPhysicalDeviceGroupCount; i++) {
+ for (uint32_t j = 0;
+ j < pPhysicalDeviceGroupProperties->physicalDeviceCount; j++) {
+ SetData(pPhysicalDeviceGroupProperties->physicalDevices[j],
+ data);
+ }
+ }
}
return result;