mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
LibCore: Print error code returned by vkCreateInstance()
Good to have at least some information about instance creation failure.
This commit is contained in:
parent
e1c61d654f
commit
172e080b07
Notes:
sideshowbarker
2024-07-17 05:21:12 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/172e080b07 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/460 Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Format.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibCore/VulkanContext.h>
|
||||
|
||||
|
@ -25,7 +26,9 @@ ErrorOr<VkInstance> create_instance(uint32_t api_version)
|
|||
create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
|
||||
create_info.pApplicationInfo = &app_info;
|
||||
|
||||
if (vkCreateInstance(&create_info, nullptr, &instance) != VK_SUCCESS) {
|
||||
auto result = vkCreateInstance(&create_info, nullptr, &instance);
|
||||
if (result != VK_SUCCESS) {
|
||||
dbgln("vkCreateInstance returned {}", to_underlying(result));
|
||||
return Error::from_string_view("Application instance creation failed"sv);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue