mirror of
https://gitlab.freedesktop.org/mesa/vulkan-wsi-layer.git
synced 2026-05-05 01:48:04 +02:00
Merge 'Append WSI layer warning flags' into 'main'
See merge request mesa/vulkan-wsi-layer!187
This commit is contained in:
commit
467d6af310
3 changed files with 28 additions and 8 deletions
|
|
@ -33,8 +33,19 @@ if (NOT CLANG_TIDY STREQUAL "CLANG_TIDY-NOTFOUND")
|
|||
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY} -checks=bugprone-*,modernize-*)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -pthread -fPIC")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||
string(APPEND CMAKE_CXX_FLAGS
|
||||
" -Wall -Werror -Wextra"
|
||||
" -Wdouble-promotion -Wnon-virtual-dtor -Wdelete-non-virtual-dtor"
|
||||
" -Wcast-qual -Werror=return-type -Wmissing-format-attribute"
|
||||
" -pthread -fPIC"
|
||||
)
|
||||
|
||||
string(APPEND CMAKE_C_FLAGS
|
||||
" -Wall -Werror -Wextra"
|
||||
" -Wstrict-prototypes"
|
||||
" -fPIC"
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
|
|
@ -199,12 +210,17 @@ if(BUILD_WSI_WAYLAND)
|
|||
${CMAKE_CURRENT_BINARY_DIR}/presentation-time-client-protocol.h)
|
||||
add_dependencies(wayland_wsi wayland_generated_files)
|
||||
|
||||
target_include_directories(wayland_wsi PRIVATE
|
||||
${PROJECT_SOURCE_DIR}
|
||||
${VULKAN_CXX_INCLUDE}
|
||||
# Mark Wayland headers as system to suppress third-party warnings like -Wcast-qual
|
||||
target_include_directories(wayland_wsi SYSTEM PRIVATE
|
||||
${WAYLAND_CLIENT_INCLUDE_DIRS}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# Keep project and Vulkan includes normal for full warnings
|
||||
target_include_directories(wayland_wsi PRIVATE
|
||||
${PROJECT_SOURCE_DIR}
|
||||
${VULKAN_CXX_INCLUDE})
|
||||
|
||||
# Suppress cast-qual warnings coming from Wayland headers
|
||||
target_compile_options(wayland_wsi PRIVATE ${WAYLAND_CLIENT_CFLAGS})
|
||||
target_compile_options(wayland_wsi INTERFACE "-DBUILD_WSI_WAYLAND=1")
|
||||
if(NOT EXTERNAL_WSIALLOC_LIBRARY STREQUAL "")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Arm Limited.
|
||||
* Copyright (c) 2024-2025 Arm Limited.
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
|
|
@ -44,7 +44,7 @@ static uint64_t round_size_up_to_align(uint64_t size)
|
|||
}
|
||||
|
||||
static wsialloc_error calculate_format_properties(const wsialloc_format_descriptor *descriptor,
|
||||
const wsialloc_allocate_info *info, int *strides, uint32_t *offsets,
|
||||
const wsialloc_allocate_info *info, int *strides, int *offsets,
|
||||
uint64_t *total_size)
|
||||
{
|
||||
assert(descriptor != NULL);
|
||||
|
|
@ -54,7 +54,6 @@ static wsialloc_error calculate_format_properties(const wsialloc_format_descript
|
|||
assert(total_size != NULL);
|
||||
|
||||
const uint8_t *bits_per_pixel = descriptor->format_spec.bpp;
|
||||
const uint64_t flags = descriptor->format.flags;
|
||||
const uint64_t modifier = descriptor->format.modifier;
|
||||
const uint32_t num_planes = descriptor->format_spec.nr_planes;
|
||||
|
||||
|
|
|
|||
|
|
@ -123,6 +123,11 @@ public:
|
|||
VkPhysicalDevice physical_device, VkPresentTimingSurfaceCapabilitiesEXT *present_timing_surface_caps) = 0;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Virtual destructor.
|
||||
*/
|
||||
virtual ~surface_properties() = default;
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief Set which presentation modes are compatible with each other for a particular surface
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue