From: Alexis Hetu Date: Tue, 22 Jan 2019 22:17:27 +0000 (-0500) Subject: Support for device groups X-Git-Tag: android-x86-9.0-r1~402 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5ebd2c0fafca2f0d570ca25605092b5c7aaadd42;p=android-x86%2Fexternal-swiftshader.git 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 Reviewed-by: Nicolas Capens --- diff --git a/src/Vulkan/libVulkan.cpp b/src/Vulkan/libVulkan.cpp index 926a5c376..628565314 100644 --- a/src/Vulkan/libVulkan.cpp +++ b/src/Vulkan/libVulkan.cpp @@ -288,6 +288,17 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateDevice(VkPhysicalDevice physicalDevice, c } } break; + case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: + { + const VkDeviceGroupDeviceCreateInfo* groupDeviceCreateInfo = reinterpret_cast(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.