Commit 4907ffdf authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

winevulkan: Check if device extensions are supported.

Return VK_ERROR_EXTENSION_NOT_PRESENT for unsupported extensions. Signed-off-by: 's avatarJózef Kucia <jkucia@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 931299bd
......@@ -278,10 +278,16 @@ static VkResult wine_vk_device_convert_create_info(const VkDeviceCreateInfo *src
dst->enabledLayerCount = 0;
dst->ppEnabledLayerNames = NULL;
TRACE("Enabled extensions: %u.\n", dst->enabledExtensionCount);
TRACE("Enabled %u extensions.\n", dst->enabledExtensionCount);
for (i = 0; i < dst->enabledExtensionCount; i++)
{
TRACE("Extension %u: %s.\n", i, debugstr_a(dst->ppEnabledExtensionNames[i]));
const char *extension_name = dst->ppEnabledExtensionNames[i];
TRACE("Extension %u: %s.\n", i, debugstr_a(extension_name));
if (!wine_vk_device_extension_supported(extension_name))
{
WARN("Extension %s is not supported.\n", debugstr_a(extension_name));
return VK_ERROR_EXTENSION_NOT_PRESENT;
}
}
return VK_SUCCESS;
......@@ -632,7 +638,8 @@ VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev,
res = wine_vk_device_convert_create_info(create_info, &create_info_host);
if (res != VK_SUCCESS)
{
ERR("Failed to convert VkDeviceCreateInfo, res=%d.\n", res);
if (res != VK_ERROR_EXTENSION_NOT_PRESENT)
ERR("Failed to convert VkDeviceCreateInfo, res=%d.\n", res);
wine_vk_device_free(object);
return res;
}
......
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