diff --git a/CMakePresets.json b/CMakePresets.json index 90b680e..7b94cb2 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -47,6 +47,15 @@ "cacheVariables": { "DXMATH_ARCHITECTURE": "arm64" }, "hidden": true }, + { + "name": "ARM64EC", + "architecture": { + "value": "arm64ec", + "strategy": "external" + }, + "cacheVariables": { "DXMATH_ARCHITECTURE": "arm64ec" }, + "hidden": true + }, { "name": "Debug", @@ -149,6 +158,8 @@ { "name": "arm-Release" , "description": "MSVC for ARM (Release) - ARM-NEON", "inherits": [ "base", "ARM", "Release", "MSVC" ] }, { "name": "arm64-Debug" , "description": "MSVC for ARM64 (Debug) - ARM-NEON", "inherits": [ "base", "ARM64", "Debug", "MSVC" ] }, { "name": "arm64-Release", "description": "MSVC for ARM64 (Release) - ARM-NEON", "inherits": [ "base", "ARM64", "Release", "MSVC" ] }, + { "name": "arm64ec-Debug" , "description": "MSVC for ARM64EC (Debug) - ARM-NEON", "inherits": [ "base", "ARM64EC", "Debug", "MSVC" ], "environment": { "CXXFLAGS": "/arm64EC" } }, + { "name": "arm64ec-Release", "description": "MSVC for ARM64EC (Release) - ARM-NEON", "inherits": [ "base", "ARM64EC", "Release", "MSVC" ], "environment": { "CXXFLAGS": "/arm64EC" } }, { "name": "x64-Debug-Clang" , "description": "Clang/LLVM for x64 (Debug) - SSE/SSE2", "inherits": [ "base", "x64", "Debug", "Clang" ] }, { "name": "x64-Release-Clang" , "description": "Clang/LLVM for x64 (Release) - SSE/SSE2", "inherits": [ "base", "x64", "Release", "Clang" ] }, diff --git a/Extensions/DirectXMathAVX.h b/Extensions/DirectXMathAVX.h index 9eaf9eb..24bc9aa 100644 --- a/Extensions/DirectXMathAVX.h +++ b/Extensions/DirectXMathAVX.h @@ -9,7 +9,7 @@ #pragma once -#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__ +#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #error AVX not supported on ARM platform #endif diff --git a/Extensions/DirectXMathAVX2.h b/Extensions/DirectXMathAVX2.h index afcb5f0..27ec70f 100644 --- a/Extensions/DirectXMathAVX2.h +++ b/Extensions/DirectXMathAVX2.h @@ -9,7 +9,7 @@ #pragma once -#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__ +#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #error AVX2 not supported on ARM platform #endif diff --git a/Extensions/DirectXMathBE.h b/Extensions/DirectXMathBE.h index b41d9fe..574785f 100644 --- a/Extensions/DirectXMathBE.h +++ b/Extensions/DirectXMathBE.h @@ -9,7 +9,7 @@ #pragma once -#if (defined(_M_IX86) || defined(_M_X64) || __i386__ || __x86_64__) && !defined(_M_HYBRID_X86_ARM64) +#if (defined(_M_IX86) || defined(_M_X64) || __i386__ || __x86_64__) && !defined(_M_HYBRID_X86_ARM64) && !defined(_M_ARM64EC) #include #endif diff --git a/Extensions/DirectXMathF16C.h b/Extensions/DirectXMathF16C.h index 726a894..f61ddbf 100644 --- a/Extensions/DirectXMathF16C.h +++ b/Extensions/DirectXMathF16C.h @@ -9,7 +9,7 @@ #pragma once -#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__ +#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #error F16C not supported on ARM platform #endif diff --git a/Extensions/DirectXMathFMA3.h b/Extensions/DirectXMathFMA3.h index 03ce1a2..e92f695 100644 --- a/Extensions/DirectXMathFMA3.h +++ b/Extensions/DirectXMathFMA3.h @@ -9,7 +9,7 @@ #pragma once -#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__ +#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #error FMA3 not supported on ARM platform #endif diff --git a/Extensions/DirectXMathFMA4.h b/Extensions/DirectXMathFMA4.h index ad29ad4..7a162ee 100644 --- a/Extensions/DirectXMathFMA4.h +++ b/Extensions/DirectXMathFMA4.h @@ -9,7 +9,7 @@ #pragma once -#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__ +#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #error FMA4 not supported on ARM platform #endif diff --git a/Extensions/DirectXMathSSE3.h b/Extensions/DirectXMathSSE3.h index 963ba38..c4e26f2 100644 --- a/Extensions/DirectXMathSSE3.h +++ b/Extensions/DirectXMathSSE3.h @@ -9,7 +9,7 @@ #pragma once -#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__ +#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #error SSE3 not supported on ARM platform #endif diff --git a/Extensions/DirectXMathSSE4.h b/Extensions/DirectXMathSSE4.h index 58b7a4d..f07cd52 100644 --- a/Extensions/DirectXMathSSE4.h +++ b/Extensions/DirectXMathSSE4.h @@ -9,7 +9,7 @@ #pragma once -#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || __arm__ || __aarch64__ +#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #error SSE4 not supported on ARM platform #endif diff --git a/build/DirectXMath-GitHub-Dev17.yml b/build/DirectXMath-GitHub-Dev17.yml index fede0dc..5bdceaf 100644 --- a/build/DirectXMath-GitHub-Dev17.yml +++ b/build/DirectXMath-GitHub-Dev17.yml @@ -52,6 +52,7 @@ pool: variables: Codeql.Enabled: false + VC_PATH: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC' GITHUB_PAT: $(GITHUBPUBLICTOKEN) jobs: @@ -345,3 +346,179 @@ jobs: platform: x64 configuration: Release msbuildArchitecture: x64 + +- job: CMAKE_BUILD_X64 + displayName: 'CMake for X64 BUILD_TESTING=ON' + timeoutInMinutes: 60 + workspace: + clean: all + steps: + - checkout: self + clean: true + fetchTags: false + - task: DeleteFiles@1 + displayName: Delete files from Tests + inputs: + SourceFolder: Tests + Contents: '**' + RemoveSourceFolder: true + RemoveDotFiles: true + - task: CmdLine@2 + displayName: Fetch Tests + inputs: + script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + workingDirectory: $(Build.SourcesDirectory) + failOnStderr: true + - task: CmdLine@2 + displayName: Setup environment for CMake to use VS + inputs: + script: | + call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat" + echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% + echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja + echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin + echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 + echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 + echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64 + echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE% + echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% + echo ##vso[task.setvariable variable=LIB;]%LIB% + + - task: CMake@1 + displayName: CMake (MSVC; x64-Debug) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=x64-Debug + - task: CMake@1 + displayName: CMake (MSVC; x64-Debug) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/x64-Debug -v + - task: CMake@1 + displayName: CMake (MSVC; x64-Release) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=x64-Release + - task: CMake@1 + displayName: CMake (MSVC; x64-Release) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/x64-Release -v + - task: CMake@1 + displayName: CMake (clang/LLVM; x64-Debug) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=x64-Debug-Clang + - task: CMake@1 + displayName: CMake (clang/LLVM; x64-Debug) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/x64-Debug-Clang -v + - task: CMake@1 + displayName: CMake (clang/LLVM; x64-Release) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=x64-Release-Clang + - task: CMake@1 + displayName: CMake (clang/LLVM; x64-Release) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/x64-Release-Clang -v + +- job: CMAKE_BUILD_ARM64 + displayName: 'CMake for ARM64 BUILD_TESTING=ON' + timeoutInMinutes: 60 + workspace: + clean: all + steps: + - checkout: self + clean: true + fetchTags: false + - task: DeleteFiles@1 + displayName: Delete files from Tests + inputs: + SourceFolder: Tests + Contents: '**' + RemoveSourceFolder: true + RemoveDotFiles: true + - task: CmdLine@2 + displayName: Fetch Tests + inputs: + script: git clone --quiet --no-tags https://%GITHUB_PAT%@github.com/walbourn/directxmathtest.git Tests + workingDirectory: $(Build.SourcesDirectory) + failOnStderr: true + - task: CmdLine@2 + displayName: Setup environment for CMake to use VS + inputs: + script: | + call "$(VC_PATH)\Auxiliary\Build\vcvarsamd64_arm64.bat" + echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% + echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja + echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin + echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 + echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 + echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\arm64 + echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE% + echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% + echo ##vso[task.setvariable variable=LIB;]%LIB% + + - task: CMake@1 + displayName: CMake (MSVC; arm64-Debug) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=arm64-Debug + - task: CMake@1 + displayName: CMake (MSVC; arm64-Debug) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/arm64-Debug -v + - task: CMake@1 + displayName: CMake (MSVC; arm64-Release) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=arm64-Release + - task: CMake@1 + displayName: CMake (MSVC; arm64-Release) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/arm64-Release -v + - task: CMake@1 + displayName: CMake (clang/LLVM; arm64-Debug) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=arm64-Debug-Clang + - task: CMake@1 + displayName: CMake (clang/LLVM; arm64-Debug) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/arm64-Debug-Clang -v + - task: CMake@1 + displayName: CMake (clang/LLVM; arm64-Release) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=arm64-Release-Clang + - task: CMake@1 + displayName: CMake (clang/LLVM; arm64-Release) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/arm64-Release-Clang -v + - task: CMake@1 + displayName: CMake (MSVC; arm64ec-Debug) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=arm64ec-Debug + - task: CMake@1 + displayName: CMake (MSVC; arm64ec-Debug) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/arm64ec-Debug -v + - task: CMake@1 + displayName: CMake (MSVC; arm64ec-Release) Config + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --preset=arm64ec-Release + - task: CMake@1 + displayName: CMake (MSVC; arm64ec-Release) Build + inputs: + cwd: '$(Build.SourcesDirectory)' + cmakeArgs: --build out/build/arm64ec-Release -v