mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Error handling for vkCreateInstance()
Cry in log if initialization failed.
This commit is contained in:
parent
397007cf8b
commit
f5817cb430
1 changed files with 8 additions and 1 deletions
|
@ -2511,8 +2511,15 @@ public:
|
|||
instance_info.ppEnabledExtensionNames = fast ? nullptr : extensions.data();
|
||||
|
||||
VkInstance instance;
|
||||
if (vkCreateInstance(&instance_info, nullptr, &instance) != VK_SUCCESS)
|
||||
VkResult result = vkCreateInstance(&instance_info, nullptr, &instance);
|
||||
if (result == VK_ERROR_LAYER_NOT_PRESENT)
|
||||
{
|
||||
LOG_FATAL(RSX,"Could not initialize VK_LAYER_KHRONOS_validation layer");
|
||||
}
|
||||
if (result != VK_SUCCESS)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
m_vk_instances.push_back(instance);
|
||||
return (u32)m_vk_instances.size();
|
||||
|
|
Loading…
Add table
Reference in a new issue