From 6facc3b09b67593cf9151a44cc59afd490f2ea62 Mon Sep 17 00:00:00 2001 From: Alexander Pavlov Date: Tue, 26 Mar 2024 00:31:21 +0300 Subject: [PATCH] Adapter: Return if cannot create Vulkan instance --- SamTFE/Sources/Engine/Graphics/Adapter.cpp | 3 ++- SamTSE/Sources/Engine/Graphics/Adapter.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SamTFE/Sources/Engine/Graphics/Adapter.cpp b/SamTFE/Sources/Engine/Graphics/Adapter.cpp index afaae557..2f9b9c01 100644 --- a/SamTFE/Sources/Engine/Graphics/Adapter.cpp +++ b/SamTFE/Sources/Engine/Graphics/Adapter.cpp @@ -414,7 +414,8 @@ void CGfxLibrary::InitAPIs(void) VkResult r = vkCreateInstance(&instanceInfo, nullptr, &tempVkInstance); if (r != VK_SUCCESS) { - ASSERT(FALSE); + CPrintF("Cannot create Vulkan instance.\n"); + return;; } // get all physical devices diff --git a/SamTSE/Sources/Engine/Graphics/Adapter.cpp b/SamTSE/Sources/Engine/Graphics/Adapter.cpp index afaae557..2f9b9c01 100644 --- a/SamTSE/Sources/Engine/Graphics/Adapter.cpp +++ b/SamTSE/Sources/Engine/Graphics/Adapter.cpp @@ -414,7 +414,8 @@ void CGfxLibrary::InitAPIs(void) VkResult r = vkCreateInstance(&instanceInfo, nullptr, &tempVkInstance); if (r != VK_SUCCESS) { - ASSERT(FALSE); + CPrintF("Cannot create Vulkan instance.\n"); + return;; } // get all physical devices