Skip to content

Commit 11a3f04

Browse files
committed
Small Fix + update examples submodule
1 parent 4e9173a commit 11a3f04

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/nbl/video/CVulkanSwapchain.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,13 @@ ISwapchain::E_PRESENT_RESULT CVulkanSwapchain::present(IGPUQueue* queue, const S
139139
auto* vk = static_cast<const CVulkanLogicalDevice*>(logicalDevice)->getFunctionTable();
140140

141141
auto vk_queue = static_cast<const CVulkanQueue*>(queue)->getInternalObject();
142+
143+
constexpr uint32_t MaxWaitSemaphores = 100u;
142144

143-
if (info.waitSemaphoreCount > 100)
145+
if (info.waitSemaphoreCount > MaxWaitSemaphores)
144146
return ISwapchain::EPR_ERROR;
145147

146-
VkSemaphore vk_waitSemaphores[100];
148+
VkSemaphore vk_waitSemaphores[MaxWaitSemaphores];
147149
for (uint32_t i = 0u; i < info.waitSemaphoreCount; ++i)
148150
{
149151
if (info.waitSemaphores[i]->getAPIType() != EAT_VULKAN)
@@ -168,6 +170,8 @@ ISwapchain::E_PRESENT_RESULT CVulkanSwapchain::present(IGPUQueue* queue, const S
168170
return ISwapchain::EPR_SUCCESS;
169171
case VK_SUBOPTIMAL_KHR:
170172
return ISwapchain::EPR_SUBOPTIMAL;
173+
case VK_ERROR_OUT_OF_DATE_KHR:
174+
std::cout << "VK_ERROR_OUT_OF_DATE_KHR\n***\n***\n***\n" << std::endl;
171175
default:
172176
return ISwapchain::EPR_ERROR;
173177
}

0 commit comments

Comments
 (0)