From 74ca0d6ba7bca591b8666e94d0b0dcc4da4ee3f5 Mon Sep 17 00:00:00 2001 From: kindem Date: Sat, 11 Jul 2026 21:29:29 +0800 Subject: [PATCH 1/3] ci: use windows-latest runners --- .github/workflows/build.yml | 2 +- .github/workflows/publish-conan-recipes.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6dff019b..23632c0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: # not yet verified -- keep a failing Linux leg from cancelling the others. fail-fast: false matrix: - os: ['windows-2022', 'macOS-latest', 'ubuntu-latest'] + os: ['windows-latest', 'macOS-latest', 'ubuntu-latest'] runs-on: ${{ matrix.os }} diff --git a/.github/workflows/publish-conan-recipes.yml b/.github/workflows/publish-conan-recipes.yml index 09d3b73b..317b2033 100644 --- a/.github/workflows/publish-conan-recipes.yml +++ b/.github/workflows/publish-conan-recipes.yml @@ -29,7 +29,7 @@ jobs: # cppstd is pinned per platform to match the binaries already on the remote; consumers on a # higher standard (the engine uses C++20) still match via Conan's default compatibility plugin. include: - - os: windows-2022 + - os: windows-latest cppstd: '17' - os: macOS-latest cppstd: gnu17 From a6b7e92b91288ceeac7f594c74eef53513c6a0b7 Mon Sep 17 00:00:00 2001 From: kindem Date: Sun, 12 Jul 2026 01:54:53 +0800 Subject: [PATCH 2/3] fix: build dxc with MSVC 19.51 --- ThirdParty/ConanRecipes/dxc/conandata.yml | 5 +++ ThirdParty/ConanRecipes/dxc/conanfile.py | 5 ++- .../0000-fix-small-vector-msvc-cxx20.patch | 36 +++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 ThirdParty/ConanRecipes/dxc/patches/0000-fix-small-vector-msvc-cxx20.patch diff --git a/ThirdParty/ConanRecipes/dxc/conandata.yml b/ThirdParty/ConanRecipes/dxc/conandata.yml index 745c782c..ba897445 100644 --- a/ThirdParty/ConanRecipes/dxc/conandata.yml +++ b/ThirdParty/ConanRecipes/dxc/conandata.yml @@ -5,3 +5,8 @@ platforms: sources: "1.8.2505.1-exp": commit: "b106a961d09221b3c5bdb37be45b679257da08b8" +patches: + "1.8.2505.1-exp": + - patch_file: patches/0000-fix-small-vector-msvc-cxx20.patch + patch_description: fix SmallVector comparison recursion with C++20 on MSVC + patch_type: backport diff --git a/ThirdParty/ConanRecipes/dxc/conanfile.py b/ThirdParty/ConanRecipes/dxc/conanfile.py index 98b2a1db..a169eeb4 100644 --- a/ThirdParty/ConanRecipes/dxc/conanfile.py +++ b/ThirdParty/ConanRecipes/dxc/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd, can_run from conan.tools.cmake import cmake_layout, CMakeToolchain, CMakeDeps, CMake -from conan.tools.files import apply_conandata_patches, copy +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches from conan.tools.scm import Git import os @@ -19,6 +19,9 @@ class DXCConan(ConanFile): options = {} default_options = {} + def export_sources(self): + export_conandata_patches(self) + def layout(self): cmake_layout(self, src_folder="src") diff --git a/ThirdParty/ConanRecipes/dxc/patches/0000-fix-small-vector-msvc-cxx20.patch b/ThirdParty/ConanRecipes/dxc/patches/0000-fix-small-vector-msvc-cxx20.patch new file mode 100644 index 00000000..2923f874 --- /dev/null +++ b/ThirdParty/ConanRecipes/dxc/patches/0000-fix-small-vector-msvc-cxx20.patch @@ -0,0 +1,36 @@ +From d3704262ce167a171d831856f8f561fc52553b61 Mon Sep 17 00:00:00 2001 +From: Steven Perron +Date: Tue, 16 Dec 2025 20:02:32 +0000 +Subject: [PATCH] spirv-tools: Fix infinite recursion in + SmallVector::operator== on MSVC (#6470) + +On MSVC, __cplusplus is not updated by default to reflect the C++ +standard version being used; it stays at 199711L unless the +/Zc:__cplusplus compiler option is used. Instead, _MSVC_LANG is defined +to the correct version. + +In C++20, the compiler generates rewritten candidates for operator== +(e.g., reversing arguments). If the explicit operator==(std::vector, +SmallVector) is present, it can lead to infinite recursion when the +compiler attempts to use it to satisfy a comparison, effectively calling +itself. + +This change updates the preprocessor check to use _MSVC_LANG when +defined, ensuring that the legacy operator== is properly disabled for +C++20 and later on MSVC, preventing the recursion. + +Fixes #6468 +--- + external/SPIRV-Tools/source/util/small_vector.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/external/SPIRV-Tools/source/util/small_vector.h b/external/SPIRV-Tools/source/util/small_vector.h +index b2ce8f4b6..8bbc8c1f5 100644 +--- a/external/SPIRV-Tools/source/util/small_vector.h ++++ b/external/SPIRV-Tools/source/util/small_vector.h +@@ -186,3 +186,4 @@ class SmallVector { + // Avoid infinite recursion from rewritten operators in C++20 +-#if __cplusplus <= 201703L ++#if (defined(_MSVC_LANG) && _MSVC_LANG <= 201703L) || \ ++ (!defined(_MSVC_LANG) && __cplusplus <= 201703L) + friend bool operator==(const std::vector& lhs, const SmallVector& rhs) { From e5a26914ef120cfd6ca919eaad053e47b6863b32 Mon Sep 17 00:00:00 2001 From: kindem Date: Sun, 12 Jul 2026 03:24:10 +0800 Subject: [PATCH 3/3] ci: upgrade cmake to 4.3.2 --- .github/workflows/build.yml | 2 +- .github/workflows/publish-conan-recipes.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23632c0a..0140e95f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,7 +13,7 @@ on: env: BUILD_TYPE: Release MAKE_THREAD_NUM: 16 - CMAKE_VERSION: '4.1.2' + CMAKE_VERSION: '4.3.2' jobs: build: diff --git a/.github/workflows/publish-conan-recipes.yml b/.github/workflows/publish-conan-recipes.yml index 317b2033..b36e72c4 100644 --- a/.github/workflows/publish-conan-recipes.yml +++ b/.github/workflows/publish-conan-recipes.yml @@ -14,7 +14,7 @@ concurrency: env: CONAN_REMOTE_NAME: explosion CONAN_REMOTE_URL: https://conan.kindem.online/artifactory/api/conan/conan - CMAKE_VERSION: '4.1.2' + CMAKE_VERSION: '4.3.2' jobs: publish: