diff --git a/CMakeLists.txt b/CMakeLists.txt index 5fcb072..5fd1cd2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/wsi/swapchain_base.cpp b/wsi/swapchain_base.cpp index 5ef1654..a35efcf 100644 --- a/wsi/swapchain_base.cpp +++ b/wsi/swapchain_base.cpp @@ -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);