Support for device groups
This cl properly parses VkDeviceGroupDeviceCreateInfo,
but only allows the already supported default case.
Fixes all tests in:
dEQP-VK.api.object_management.*.device_group
Bug b/117974925
Change-Id: I42851f10bb9fc94848414bbd09b65ab8b807ae0e
Reviewed-on: https://swiftshader-review.googlesource.com/c/23968
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Vulkan/libVulkan.cpp b/src/Vulkan/libVulkan.cpp
index 926a5c3..6285653 100644
--- a/src/Vulkan/libVulkan.cpp
+++ b/src/Vulkan/libVulkan.cpp
@@ -288,6 +288,17 @@
}
}
break;
+ case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO:
+ {
+ const VkDeviceGroupDeviceCreateInfo* groupDeviceCreateInfo = reinterpret_cast<const VkDeviceGroupDeviceCreateInfo*>(extensionCreateInfo);
+
+ if((groupDeviceCreateInfo->physicalDeviceCount != 1) ||
+ (groupDeviceCreateInfo->pPhysicalDevices[0] != physicalDevice))
+ {
+ return VK_ERROR_FEATURE_NOT_PRESENT;
+ }
+ }
+ break;
default:
// "the [driver] must skip over, without processing (other than reading the sType and pNext members) any structures in the chain with sType values not defined by [supported extenions]"
UNIMPLEMENTED(); // TODO(b/119321052): UNIMPLEMENTED() should be used only for features that must still be implemented. Use a more informational macro here.