Commit f993de30 by Chris Forbes

Add support for querying device group present capabilities

These functions are part of the VK_KHR_swapchain + VK1.1 interaction. Test: dEQP-VK.wsi.xlib.* Bug: b/124265819 Change-Id: Ic79bb0c290e68ab73ddc589c95f979603ecd1a82 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29168 Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 1a9714a9
......@@ -264,6 +264,8 @@ static const std::unordered_map<std::string, PFN_vkVoidFunction> deviceFunctionP
MAKE_VULKAN_DEVICE_ENTRY(vkGetSwapchainImagesKHR),
MAKE_VULKAN_DEVICE_ENTRY(vkAcquireNextImageKHR),
MAKE_VULKAN_DEVICE_ENTRY(vkQueuePresentKHR),
MAKE_VULKAN_DEVICE_ENTRY(vkGetDeviceGroupPresentCapabilitiesKHR),
MAKE_VULKAN_DEVICE_ENTRY(vkGetDeviceGroupSurfacePresentModesKHR),
#endif
};
#undef MAKE_VULKAN_DEVICE_ENTRY
......
......@@ -2467,6 +2467,33 @@ VKAPI_ATTR VkResult VKAPI_CALL vkQueuePresentKHR(VkQueue queue, const VkPresentI
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupPresentCapabilitiesKHR(VkDevice device, VkDeviceGroupPresentCapabilitiesKHR *pDeviceGroupPresentCapabilities)
{
TRACE("(VkDevice device = 0x%X, VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities = 0x%X)",
device, pDeviceGroupPresentCapabilities);
for (int i = 0; i < VK_MAX_DEVICE_GROUP_SIZE; i++)
{
// The only real physical device in the presentation group is device 0,
// and it can present to itself.
pDeviceGroupPresentCapabilities->presentMask[i] = (i == 0) ? 1 : 0;
}
pDeviceGroupPresentCapabilities->modes = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR;
return VK_SUCCESS;
}
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModesKHR(VkDevice device, VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR *pModes)
{
TRACE("(VkDevice device = 0x%X, VkSurfaceKHR surface = 0x%X, VkDeviceGroupPresentModeFlagsKHR *pModes = 0x%X)",
device, surface, pModes);
*pModes = VK_DEVICE_GROUP_PRESENT_MODE_LOCAL_BIT_KHR;
return VK_SUCCESS;
}
#endif // ! __ANDROID__
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment