winevulkan: Check if device extensions are supported.
Return VK_ERROR_EXTENSION_NOT_PRESENT for unsupported extensions. Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
931299bd33
commit
4907ffdf2a
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue