diff --git a/examples/common/bounds.cpp b/examples/common/bounds.cpp index 51c17b1a3..ccc291d4c 100644 --- a/examples/common/bounds.cpp +++ b/examples/common/bounds.cpp @@ -2077,7 +2077,7 @@ bool overlap(const Triangle& _triangle, const Cone& _cone) _cone.end, }; - float ta0, tb0; + float ta0 = 0.0f, tb0 = 0.0f; const bool i0 = intersect(ta0, tb0, ab, line); float ta1, tb1; diff --git a/src/renderer_vk.cpp b/src/renderer_vk.cpp index 711209b2c..a8a781a81 100644 --- a/src/renderer_vk.cpp +++ b/src/renderer_vk.cpp @@ -2310,20 +2310,17 @@ VK_IMPORT_DEVICE pi.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; pi.pNext = NULL; pi.waitSemaphoreCount = 0; - pi.pWaitSemaphores = NULL; //&m_presentDone[0]; + pi.pWaitSemaphores = NULL; pi.swapchainCount = 1; pi.pSwapchains = &m_swapchain; pi.pImageIndices = &m_backBufferColorIdx; pi.pResults = NULL; VkResult result = vkQueuePresentKHR(m_queueGraphics, &pi); - if (VK_ERROR_OUT_OF_DATE_KHR == result || VK_SUBOPTIMAL_KHR == result) + if (VK_ERROR_OUT_OF_DATE_KHR == result + || VK_SUBOPTIMAL_KHR == result) { m_needToRefreshSwapchain = true; } - else - { - VK_CHECK(result); - } } } @@ -5719,7 +5716,7 @@ VK_DESTROY uint8_t primIndex = uint8_t(primType >> BGFX_STATE_PT_SHIFT); PrimInfo prim = s_primInfo[primIndex]; - bool wasCompute = false; + bool wasCompute = false; bool viewHasScissor = false; bool restoreScissor = false; Rect viewScissorRect; @@ -5735,22 +5732,21 @@ VK_DESTROY uint32_t statsKeyType[2] = {}; VkSemaphore renderWait = m_presentDone[m_backBufferColorIdx]; - VkResult result = vkAcquireNextImageKHR(m_device - , m_swapchain - , UINT64_MAX - , renderWait - , VK_NULL_HANDLE - , &m_backBufferColorIdx - ); - if (VK_ERROR_OUT_OF_DATE_KHR == result || VK_SUBOPTIMAL_KHR == result) + VkResult result = vkAcquireNextImageKHR( + m_device + , m_swapchain + , UINT64_MAX + , renderWait + , VK_NULL_HANDLE + , &m_backBufferColorIdx + ); + + if (VK_ERROR_OUT_OF_DATE_KHR == result + || VK_SUBOPTIMAL_KHR == result) { m_needToRefreshSwapchain = true; return; } - else - { - VK_CHECK(result); - } // const uint64_t f0 = BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_FACTOR, BGFX_STATE_BLEND_FACTOR); // const uint64_t f1 = BGFX_STATE_BLEND_FUNC(BGFX_STATE_BLEND_INV_FACTOR, BGFX_STATE_BLEND_INV_FACTOR);