From fd68ae73fbd6c50bbf6a02277d0fe5f5f5bb7d89 Mon Sep 17 00:00:00 2001 From: Mike Schuchardt Date: Fri, 21 Feb 2025 08:20:49 -0800 Subject: [PATCH] build: Update to header 1.4.309 --- .github/workflows/ci.yml | 2 +- BUILD.md | 2 +- CMakeLists.txt | 2 +- include/vulkan/utility/vk_safe_struct.hpp | 34 +++++++ include/vulkan/utility/vk_struct_helper.hpp | 2 + include/vulkan/vk_enum_string_helper.h | 6 ++ scripts/known_good.json | 2 +- src/vulkan/vk_safe_struct_utils.cpp | 24 +++++ src/vulkan/vk_safe_struct_vendor.cpp | 98 +++++++++++++++++++++ 9 files changed, 168 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d71374..2828f5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: if: matrix.os == 'ubuntu-20.04' uses: lukka/get-cmake@latest with: - cmakeVersion: 3.17.2 + cmakeVersion: 3.22.1 - run: cmake -S. -B build -D VUL_WERROR=ON -D BUILD_TESTS=ON -D CMAKE_BUILD_TYPE=${{matrix.config}} -D UPDATE_DEPS=ON - run: cmake --build build --config ${{matrix.config}} --verbose - run: ctest -C ${{matrix.config}} --output-on-failure diff --git a/BUILD.md b/BUILD.md index 85e420a..8b57327 100644 --- a/BUILD.md +++ b/BUILD.md @@ -16,7 +16,7 @@ This document contains the instructions for building this repository on Linux, m ## Requirements -1. CMake >= 3.17.2 +1. CMake >= 3.22.1 2. C++ >= c++17 compiler. See platform-specific sections below for supported compiler versions. 3. Python >= 3.8 diff --git a/CMakeLists.txt b/CMakeLists.txt index 674dcfe..6dc4f23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ # Copyright 2023 LunarG, Inc. # # SPDX-License-Identifier: Apache-2.0 -cmake_minimum_required(VERSION 3.17.2) +cmake_minimum_required(VERSION 3.22.1) project(VUL LANGUAGES CXX) diff --git a/include/vulkan/utility/vk_safe_struct.hpp b/include/vulkan/utility/vk_safe_struct.hpp index 9f44f69..f569902 100644 --- a/include/vulkan/utility/vk_safe_struct.hpp +++ b/include/vulkan/utility/vk_safe_struct.hpp @@ -20291,6 +20291,40 @@ struct safe_VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT { return reinterpret_cast(this); } }; +struct safe_VkSetPresentConfigNV { + VkStructureType sType; + const void* pNext{}; + uint32_t numFramesPerBatch; + uint32_t presentConfigFeedback; + + safe_VkSetPresentConfigNV(const VkSetPresentConfigNV* in_struct, PNextCopyState* copy_state = {}, bool copy_pnext = true); + safe_VkSetPresentConfigNV(const safe_VkSetPresentConfigNV& copy_src); + safe_VkSetPresentConfigNV& operator=(const safe_VkSetPresentConfigNV& copy_src); + safe_VkSetPresentConfigNV(); + ~safe_VkSetPresentConfigNV(); + void initialize(const VkSetPresentConfigNV* in_struct, PNextCopyState* copy_state = {}); + void initialize(const safe_VkSetPresentConfigNV* copy_src, PNextCopyState* copy_state = {}); + VkSetPresentConfigNV* ptr() { return reinterpret_cast(this); } + VkSetPresentConfigNV const* ptr() const { return reinterpret_cast(this); } +}; +struct safe_VkPhysicalDevicePresentMeteringFeaturesNV { + VkStructureType sType; + void* pNext{}; + VkBool32 presentMetering; + + safe_VkPhysicalDevicePresentMeteringFeaturesNV(const VkPhysicalDevicePresentMeteringFeaturesNV* in_struct, + PNextCopyState* copy_state = {}, bool copy_pnext = true); + safe_VkPhysicalDevicePresentMeteringFeaturesNV(const safe_VkPhysicalDevicePresentMeteringFeaturesNV& copy_src); + safe_VkPhysicalDevicePresentMeteringFeaturesNV& operator=(const safe_VkPhysicalDevicePresentMeteringFeaturesNV& copy_src); + safe_VkPhysicalDevicePresentMeteringFeaturesNV(); + ~safe_VkPhysicalDevicePresentMeteringFeaturesNV(); + void initialize(const VkPhysicalDevicePresentMeteringFeaturesNV* in_struct, PNextCopyState* copy_state = {}); + void initialize(const safe_VkPhysicalDevicePresentMeteringFeaturesNV* copy_src, PNextCopyState* copy_state = {}); + VkPhysicalDevicePresentMeteringFeaturesNV* ptr() { return reinterpret_cast(this); } + VkPhysicalDevicePresentMeteringFeaturesNV const* ptr() const { + return reinterpret_cast(this); + } +}; struct safe_VkAccelerationStructureGeometryTrianglesDataKHR { VkStructureType sType; const void* pNext{}; diff --git a/include/vulkan/utility/vk_struct_helper.hpp b/include/vulkan/utility/vk_struct_helper.hpp index ea915c6..aed8928 100644 --- a/include/vulkan/utility/vk_struct_helper.hpp +++ b/include/vulkan/utility/vk_struct_helper.hpp @@ -1051,6 +1051,8 @@ template <> inline VkStructureType GetSType() template <> inline VkStructureType GetSType() { return VK_STRUCTURE_TYPE_MEMORY_GET_METAL_HANDLE_INFO_EXT; } #endif // VK_USE_PLATFORM_METAL_EXT template <> inline VkStructureType GetSType() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT; } +template <> inline VkStructureType GetSType() { return VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV; } +template <> inline VkStructureType GetSType() { return VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV; } template <> inline VkStructureType GetSType() { return VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_TRIANGLES_DATA_KHR; } template <> inline VkStructureType GetSType() { return VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_AABBS_DATA_KHR; } template <> inline VkStructureType GetSType() { return VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_INSTANCES_DATA_KHR; } diff --git a/include/vulkan/vk_enum_string_helper.h b/include/vulkan/vk_enum_string_helper.h index 3e3b6bd..ece5b97 100644 --- a/include/vulkan/vk_enum_string_helper.h +++ b/include/vulkan/vk_enum_string_helper.h @@ -2128,6 +2128,12 @@ static inline const char* string_VkStructureType(VkStructureType input_value) { return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLAMP_ZERO_ONE_FEATURES_KHR"; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT: return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT"; +#ifdef VK_ENABLE_BETA_EXTENSIONS + case VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV: + return "VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV"; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV: + return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV"; +#endif // VK_ENABLE_BETA_EXTENSIONS default: return "Unhandled VkStructureType"; } diff --git a/scripts/known_good.json b/scripts/known_good.json index 9bed905..604ac77 100644 --- a/scripts/known_good.json +++ b/scripts/known_good.json @@ -7,7 +7,7 @@ "sub_dir": "Vulkan-Headers", "build_dir": "Vulkan-Headers/build", "install_dir": "Vulkan-Headers/build/install", - "commit": "v1.4.307" + "commit": "v1.4.309" }, { "name": "googletest", diff --git a/src/vulkan/vk_safe_struct_utils.cpp b/src/vulkan/vk_safe_struct_utils.cpp index 4790801..4dc27fe 100644 --- a/src/vulkan/vk_safe_struct_utils.cpp +++ b/src/vulkan/vk_safe_struct_utils.cpp @@ -1719,6 +1719,12 @@ void *SafePnextCopy(const void *pNext, PNextCopyState* copy_state) { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_LINEAR_SWEPT_SPHERES_FEATURES_NV: safe_pNext = new safe_VkPhysicalDeviceRayTracingLinearSweptSpheresFeaturesNV(reinterpret_cast(pNext), copy_state, false); break; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_LINEAR_SWEPT_SPHERES_DATA_NV: + safe_pNext = new safe_VkAccelerationStructureGeometryLinearSweptSpheresDataNV(reinterpret_cast(pNext), copy_state, false); + break; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_SPHERES_DATA_NV: + safe_pNext = new safe_VkAccelerationStructureGeometrySpheresDataNV(reinterpret_cast(pNext), copy_state, false); + break; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV: safe_pNext = new safe_VkPhysicalDeviceLinearColorAttachmentFeaturesNV(reinterpret_cast(pNext), copy_state, false); break; @@ -2019,6 +2025,12 @@ void *SafePnextCopy(const void *pNext, PNextCopyState* copy_state) { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT: safe_pNext = new safe_VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT(reinterpret_cast(pNext), copy_state, false); break; + case VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV: + safe_pNext = new safe_VkSetPresentConfigNV(reinterpret_cast(pNext), copy_state, false); + break; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV: + safe_pNext = new safe_VkPhysicalDevicePresentMeteringFeaturesNV(reinterpret_cast(pNext), copy_state, false); + break; case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: safe_pNext = new safe_VkWriteDescriptorSetAccelerationStructureKHR(reinterpret_cast(pNext), copy_state, false); break; @@ -3754,6 +3766,12 @@ void FreePnextChain(const void *pNext) { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_LINEAR_SWEPT_SPHERES_FEATURES_NV: delete reinterpret_cast(header); break; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_LINEAR_SWEPT_SPHERES_DATA_NV: + delete reinterpret_cast(header); + break; + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_GEOMETRY_SPHERES_DATA_NV: + delete reinterpret_cast(header); + break; case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV: delete reinterpret_cast(header); break; @@ -4054,6 +4072,12 @@ void FreePnextChain(const void *pNext) { case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT: delete reinterpret_cast(header); break; + case VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV: + delete reinterpret_cast(header); + break; + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV: + delete reinterpret_cast(header); + break; case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_KHR: delete reinterpret_cast(header); break; diff --git a/src/vulkan/vk_safe_struct_vendor.cpp b/src/vulkan/vk_safe_struct_vendor.cpp index 5d20575..6e7b5f6 100644 --- a/src/vulkan/vk_safe_struct_vendor.cpp +++ b/src/vulkan/vk_safe_struct_vendor.cpp @@ -17715,6 +17715,104 @@ void safe_VkPhysicalDevicePipelineOpacityMicromapFeaturesARM::initialize( pNext = SafePnextCopy(copy_src->pNext); } +safe_VkSetPresentConfigNV::safe_VkSetPresentConfigNV(const VkSetPresentConfigNV* in_struct, + [[maybe_unused]] PNextCopyState* copy_state, bool copy_pnext) + : sType(in_struct->sType), + numFramesPerBatch(in_struct->numFramesPerBatch), + presentConfigFeedback(in_struct->presentConfigFeedback) { + if (copy_pnext) { + pNext = SafePnextCopy(in_struct->pNext, copy_state); + } +} + +safe_VkSetPresentConfigNV::safe_VkSetPresentConfigNV() + : sType(VK_STRUCTURE_TYPE_SET_PRESENT_CONFIG_NV), pNext(nullptr), numFramesPerBatch(), presentConfigFeedback() {} + +safe_VkSetPresentConfigNV::safe_VkSetPresentConfigNV(const safe_VkSetPresentConfigNV& copy_src) { + sType = copy_src.sType; + numFramesPerBatch = copy_src.numFramesPerBatch; + presentConfigFeedback = copy_src.presentConfigFeedback; + pNext = SafePnextCopy(copy_src.pNext); +} + +safe_VkSetPresentConfigNV& safe_VkSetPresentConfigNV::operator=(const safe_VkSetPresentConfigNV& copy_src) { + if (©_src == this) return *this; + + FreePnextChain(pNext); + + sType = copy_src.sType; + numFramesPerBatch = copy_src.numFramesPerBatch; + presentConfigFeedback = copy_src.presentConfigFeedback; + pNext = SafePnextCopy(copy_src.pNext); + + return *this; +} + +safe_VkSetPresentConfigNV::~safe_VkSetPresentConfigNV() { FreePnextChain(pNext); } + +void safe_VkSetPresentConfigNV::initialize(const VkSetPresentConfigNV* in_struct, [[maybe_unused]] PNextCopyState* copy_state) { + FreePnextChain(pNext); + sType = in_struct->sType; + numFramesPerBatch = in_struct->numFramesPerBatch; + presentConfigFeedback = in_struct->presentConfigFeedback; + pNext = SafePnextCopy(in_struct->pNext, copy_state); +} + +void safe_VkSetPresentConfigNV::initialize(const safe_VkSetPresentConfigNV* copy_src, [[maybe_unused]] PNextCopyState* copy_state) { + sType = copy_src->sType; + numFramesPerBatch = copy_src->numFramesPerBatch; + presentConfigFeedback = copy_src->presentConfigFeedback; + pNext = SafePnextCopy(copy_src->pNext); +} + +safe_VkPhysicalDevicePresentMeteringFeaturesNV::safe_VkPhysicalDevicePresentMeteringFeaturesNV( + const VkPhysicalDevicePresentMeteringFeaturesNV* in_struct, [[maybe_unused]] PNextCopyState* copy_state, bool copy_pnext) + : sType(in_struct->sType), presentMetering(in_struct->presentMetering) { + if (copy_pnext) { + pNext = SafePnextCopy(in_struct->pNext, copy_state); + } +} + +safe_VkPhysicalDevicePresentMeteringFeaturesNV::safe_VkPhysicalDevicePresentMeteringFeaturesNV() + : sType(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_METERING_FEATURES_NV), pNext(nullptr), presentMetering() {} + +safe_VkPhysicalDevicePresentMeteringFeaturesNV::safe_VkPhysicalDevicePresentMeteringFeaturesNV( + const safe_VkPhysicalDevicePresentMeteringFeaturesNV& copy_src) { + sType = copy_src.sType; + presentMetering = copy_src.presentMetering; + pNext = SafePnextCopy(copy_src.pNext); +} + +safe_VkPhysicalDevicePresentMeteringFeaturesNV& safe_VkPhysicalDevicePresentMeteringFeaturesNV::operator=( + const safe_VkPhysicalDevicePresentMeteringFeaturesNV& copy_src) { + if (©_src == this) return *this; + + FreePnextChain(pNext); + + sType = copy_src.sType; + presentMetering = copy_src.presentMetering; + pNext = SafePnextCopy(copy_src.pNext); + + return *this; +} + +safe_VkPhysicalDevicePresentMeteringFeaturesNV::~safe_VkPhysicalDevicePresentMeteringFeaturesNV() { FreePnextChain(pNext); } + +void safe_VkPhysicalDevicePresentMeteringFeaturesNV::initialize(const VkPhysicalDevicePresentMeteringFeaturesNV* in_struct, + [[maybe_unused]] PNextCopyState* copy_state) { + FreePnextChain(pNext); + sType = in_struct->sType; + presentMetering = in_struct->presentMetering; + pNext = SafePnextCopy(in_struct->pNext, copy_state); +} + +void safe_VkPhysicalDevicePresentMeteringFeaturesNV::initialize(const safe_VkPhysicalDevicePresentMeteringFeaturesNV* copy_src, + [[maybe_unused]] PNextCopyState* copy_state) { + sType = copy_src->sType; + presentMetering = copy_src->presentMetering; + pNext = SafePnextCopy(copy_src->pNext); +} + } // namespace vku // NOLINTEND