vulkan-wsi-layer/wsi/unsupported_surfaces.hpp
Maged Elnaggar 9608f70237 Add clang-tidy linting to merge requests CI
Introduce a new clang_tidy job that runs on merge requests
and the default branch. The job configures CMake to export
compile_commands.json and runs run-clang-tidy restricted to
repo files. Any warnings or errors cause the job to fail.

Artifacts include clang-tidy.log and compile_commands.json
to aid local reproduction. Shared Vulkan Loader setup was
factored into a YAML anchor for reuse across jobs.

Signed-off-by: Maged Elnaggar <maged.elnaggar@arm.com>
Change-Id: I61b48656e68e0e83725500ae1b37f8626f9a248c
2025-09-10 14:31:35 +01:00

56 lines
2.3 KiB
C++

/*
* Copyright (c) 2024-2025 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#include <vulkan/vulkan_core.h>
#include <vulkan/vulkan.h>
#include <array>
/* Define the patch version directly as macros */
#define WSI_LAYER_VK_PATCH 305
/* Convert macros to string */
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
#if VK_HEADER_VERSION > WSI_LAYER_VK_PATCH
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-W#pragma-messages"
#endif
#pragma message("The Vulkan header version is newer than the currently supported version.")
#pragma message("Current Vulkan header version: " TOSTRING(VK_HEADER_VERSION))
#pragma message("Supported Vulkan API version: " TOSTRING(WSI_LAYER_VK_PATCH))
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif
namespace wsi
{
/* A list of platform-specific unsupported surface extensions
Not using the extension macros and symbols due to missing definitions for native platform symbols. */
static constexpr std::array unsupported_surfaces_ext_array = { "VK_KHR_win32_surface", "VK_KHR_xlib_surface",
"VK_KHR_xcb_surface", "VK_EXT_metal_surface",
"VK_KHR_android_surface" };
} // namespace wsi