diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 52c2c30..eeaf883 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -495,6 +495,8 @@ Use these established guards — do not invent new ones: > `_M_ARM` / `__arm__` is legacy 32-bit ARM which is deprecated. +> GNU predefined architecture macros (`__aarch64__`, `__x86_64__`, `__i386__`, `__powerpc64__`, `__arm__`) are always defined to `1` by the compiler — they are **not** merely defined/undefined like MSVC's `_M_ARM64`. Use them **bare** (without `defined()`) in `#if` expressions: `#if __aarch64__`, not `#if defined(__aarch64__)`. Using `defined()` is technically valid but inconsistent with the project's convention and suppresses `-Wundef` unnecessarily. + ## Code Review Instructions When reviewing code, focus on the following aspects: diff --git a/.nuget/directxmath.nuspec b/.nuget/directxmath.nuspec index 6913985..adbac08 100644 --- a/.nuget/directxmath.nuspec +++ b/.nuget/directxmath.nuspec @@ -8,7 +8,7 @@ microsoft,directxtk DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps. The DirectXMath API provides SIMD-friendly C++ types and functions for common linear algebra and graphics math operations common to DirectX applications. The library provides optimized versions for Windows 32-bit (x86), Windows 64-bit (x64), and Windows on ARM through SSE2 and ARM-NEON intrinsics support in the Visual Studio compiler. - Matches the April 2025 release. + Matches the May 2026 release. http://go.microsoft.com/fwlink/?LinkID=615560 images\icon.jpg diff --git a/CHANGELOG.md b/CHANGELOG.md index 49a03ad..6098bd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ Release available for download on [GitHub](https://github.com/microsoft/DirectXM ## Release History +### May 2026 (3.21) +* Defaulted C++20 `operator==` and `operator<=>` added for `XMFLOAT3` +* Fix C++20 comparison operators for `XMFLOAT3X3`, `XMFLOAT4X3`, `XMFLOAT3X4`, and `XMFLOAT4X4` +* SIMD optimized implementations for `XMLoadFloat3SE` and `XMStoreFloat3SE` +* Minor SSE4.1 optimization for `XMLoadFloat3A`, `XMLoadFloat4x3`, and `XMLoadFloat4x3A` +* Fix `XMVectorSwizzle` and `XMVectorPermute` for GCC strict-aliasing optimizer +* C++17 and later use `inline constexpr` for `XMGLOBALCONST` to support C++20 Modules +* Improved clang for Windows usage of cpuid intrinsics +* CMake project updates including minimum version 3.21 and additional build switches + ### April 2025 (3.20b) * `XM_DEPRECATED` macro uses C++14 ``[[deprecated]]`` standard attribute when supported * Cmake project updates with build options for XDSP and SHMath diff --git a/CMakeLists.txt b/CMakeLists.txt index a728b6d..b8a66a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ if(POLICY CMP0162) cmake_policy(SET CMP0162 NEW) endif() -set(DIRECTXMATH_VERSION 3.20) +set(DIRECTXMATH_VERSION 3.21) if(WINDOWS_STORE OR (DEFINED XBOX_CONSOLE_TARGET)) set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY") diff --git a/Inc/DirectXMath.h b/Inc/DirectXMath.h index e2bb65b..ae3cce1 100644 --- a/Inc/DirectXMath.h +++ b/Inc/DirectXMath.h @@ -13,7 +13,7 @@ #error DirectX Math requires C++ #endif -#define DIRECTX_MATH_VERSION 320 +#define DIRECTX_MATH_VERSION 321 #if defined(_MSC_VER) && (_MSC_VER < 1910) #error DirectX Math requires Visual C++ 2017 or later. diff --git a/README.md b/README.md index fdfdf10..c74ef3e 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ https://github.com/Microsoft/DirectXMath Copyright (c) Microsoft Corporation. -## April 2025 +## May 2026 This package contains the DirectXMath library, an all inline SIMD C++ linear algebra library for use in games and graphics apps. -This code is designed to build with Visual Studio 2019 (16.11), Visual Studio 2022, or clang/LLVM for Windows. It is recommended that you make use of the latest updates. +This code is designed to build with Visual Studio 2019 (16.11), Visual Studio 2022, Visual Studio 2026, or clang/LLVM for Windows. It is recommended that you make use of the latest updates. These components are designed to work without requiring any content from the legacy DirectX SDK. For details, see [Where is the DirectX SDK?](https://aka.ms/dxsdk). diff --git a/SECURITY.md b/SECURITY.md index 167c4b4..e751608 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,41 +1,14 @@ - + ## Security -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below. - -## Reporting Security Issues +Microsoft takes the security of our software products and services seriously, which +includes all source code repositories in our GitHub organizations. **Please do not report security vulnerabilities through public GitHub issues.** -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - -* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) -* Full paths of source file(s) related to the manifestation of the issue -* The location of the affected source code (tag/branch/commit or direct URL) -* Any special configuration required to reproduce the issue -* Step-by-step instructions to reproduce the issue -* Proof-of-concept or exploit code (if possible) -* Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd). +For security reporting information, locations, contact information, and policies, +please review the latest guidance for Microsoft repositories at +[https://aka.ms/SECURITY.md](https://aka.ms/SECURITY.md). - + \ No newline at end of file