Commit f782eab9 authored by Dennis Tsiang's avatar Dennis Tsiang
Browse files

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's avatarDennis Tsiang <dennis.tsiang@arm.com>
parent 7ff864e5
Pipeline #234954 passed with stage
in 2 minutes and 38 seconds
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment