mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2025-12-20 16:10:09 +01:00
Fix failing assert in swapchain_base.cpp
Erroneous assert was left in swapchain_base.cpp after some refactoring was done. This commit removes the assert and updates the CMakeLists.txt file to turn on compiler warnings so that developers can spot these leftover code earlier. Change-Id: I7f4051c89a86f21f66f20b0e92f01bc101436c71 Signed-off-by: Dennis Tsiang <dennis.tsiang@arm.com>
This commit is contained in:
parent
7ff864e502
commit
f782eab921
2 changed files with 2 additions and 9 deletions
|
|
@ -27,7 +27,7 @@ find_package(PkgConfig REQUIRED)
|
|||
pkg_check_modules(VULKAN_PKG_CONFIG vulkan)
|
||||
|
||||
# Disable C++ exceptions.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -Wall")
|
||||
|
||||
if(NOT DEFINED VULKAN_CXX_INCLUDE)
|
||||
set(VULKAN_CXX_INCLUDE ${VULKAN_PKG_CONFIG_INCLUDEDIR})
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ void swapchain_base::unpresent_image(uint32_t presented_index)
|
|||
|
||||
swapchain_base::swapchain_base(layer::device_private_data &dev_data, const VkAllocationCallbacks *allocator)
|
||||
: m_device_data(dev_data)
|
||||
, m_page_flip_thread_run(true)
|
||||
, m_thread_sem_defined(false)
|
||||
, m_first_present(true)
|
||||
, m_pending_buffer_pool{ nullptr, 0, 0, 0 }
|
||||
|
|
@ -148,7 +149,6 @@ swapchain_base::swapchain_base(layer::device_private_data &dev_data, const VkAll
|
|||
, m_ancestor(VK_NULL_HANDLE)
|
||||
, m_device(VK_NULL_HANDLE)
|
||||
, m_queue(VK_NULL_HANDLE)
|
||||
, m_page_flip_thread_run(true)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -283,13 +283,6 @@ VkResult swapchain_base::init(VkDevice device, const VkSwapchainCreateInfoKHR *s
|
|||
return result;
|
||||
}
|
||||
|
||||
/* Only programming error can cause this to fail. */
|
||||
assert(res == 0);
|
||||
if (res != 0)
|
||||
{
|
||||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
}
|
||||
|
||||
res = sem_init(&m_start_present_semaphore, 0, 0);
|
||||
/* Only programming error can cause this to fail. */
|
||||
assert(res == 0);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue