Add GitHub Action for super-lint (#618)

This commit is contained in:
Chuck Walbourn 2025-06-02 17:49:20 -07:00 committed by GitHub
parent c8959b2911
commit cb3be57e9c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
78 changed files with 5040 additions and 4816 deletions

View File

@ -6,361 +6,365 @@
# Builds the library using CMake with VS Generator (GitHub Actions covers Ninja). # Builds the library using CMake with VS Generator (GitHub Actions covers Ninja).
schedules: schedules:
- cron: "0 5 * * *" - cron: "0 5 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: trigger:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/OneFuzz*.json - build/OneFuzz*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/OneFuzz*.json - build/OneFuzz*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
drafts: false drafts: false
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
- repository: vcpkgRepo - repository: vcpkgRepo
name: Microsoft/vcpkg name: Microsoft/vcpkg
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/tags/$(VCPKG_TAG) ref: refs/tags/$(VCPKG_TAG)
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VCPKG_ROOT - name: VCPKG_ROOT
value: '$(Build.SourcesDirectory)/vcpkg' value: '$(Build.SourcesDirectory)/vcpkg'
- name: VCPKG_CMAKE_DIR - name: VCPKG_CMAKE_DIR
value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake' value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake'
- name: VCPKG_MANIFEST_DIR - name: VCPKG_MANIFEST_DIR
value: '$(Build.SourcesDirectory)/build' value: '$(Build.SourcesDirectory)/build'
- name: VS_GENERATOR - name: VS_GENERATOR
value: 'Visual Studio 17 2022' value: 'Visual Studio 17 2022'
- name: WIN10_SDK - name: WIN10_SDK
value: '10.0.19041.0' value: '10.0.19041.0'
- name: WIN11_SDK - name: WIN11_SDK
value: '10.0.22000.0' value: '10.0.22000.0'
pool: pool:
vmImage: windows-2022 vmImage: windows-2022
jobs: jobs:
- job: CMAKE_BUILD - job: CMAKE_BUILD
displayName: CMake using VS Generator displayName: CMake using VS Generator
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64' displayName: 'CMake (MSVC): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out -G "$(VS_GENERATOR)" -A x64 -B out
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=OFF -DBUILD_DX12=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug' displayName: 'CMake (MSVC): Build x64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out -v --config Debug cmakeArgs: --build out -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release' displayName: 'CMake (MSVC): Build x64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out -v --config RelWithDebInfo cmakeArgs: --build out -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x86' displayName: 'CMake (MSVC): Config x86'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A Win32 -B out2 -G "$(VS_GENERATOR)" -A Win32 -B out2
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=OFF -DBUILD_DX12=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x86 Debug' displayName: 'CMake (MSVC): Build x86 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out2 -v --config Debug cmakeArgs: --build out2 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x86 Release' displayName: 'CMake (MSVC): Build x86 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out2 -v --config RelWithDebInfo cmakeArgs: --build out2 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config ARM64' displayName: 'CMake (MSVC): Config ARM64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A ARM64 -B out3 -G "$(VS_GENERATOR)" -A ARM64 -B out3
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=OFF -DBUILD_DX12=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build ARM64 Debug' displayName: 'CMake (MSVC): Build ARM64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out3 -v --config Debug cmakeArgs: --build out3 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build ARM64 Release' displayName: 'CMake (MSVC): Build ARM64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out3 -v --config RelWithDebInfo cmakeArgs: --build out3 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (UWP): Config x64' displayName: 'CMake (UWP): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out4 -G "$(VS_GENERATOR)" -A x64 -B out4
-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0
- task: CMake@1 - task: CMake@1
displayName: 'CMake (UWP): Build x64' displayName: 'CMake (UWP): Build x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out4 -v cmakeArgs: --build out4 -v
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Config x64' displayName: 'CMake (ClangCl): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out5 -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out5
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Debug' displayName: 'CMake (ClangCl): Build x64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out5 -v --config Debug cmakeArgs: --build out5 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Release' displayName: 'CMake (ClangCl): Build x64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out5 -v --config RelWithDebInfo cmakeArgs: --build out5 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Config ARM64' displayName: 'CMake (ClangCl): Config ARM64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A ARM64 -T clangcl -B out6 -G "$(VS_GENERATOR)" -A ARM64 -T clangcl -B out6
-DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build ARM64' displayName: 'CMake (ClangCl): Build ARM64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out6 -v --config Debug cmakeArgs: --build out6 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Win10): Config' displayName: 'CMake (Win10): Config'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out7 -G "$(VS_GENERATOR)" -A x64 -B out7
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=ON -DBUILD_DX12=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Win10): Build' displayName: 'CMake (Win10): Build'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out7 -v --config Debug cmakeArgs: --build out7 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Config x64' displayName: 'CMake (MSVC Spectre): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out8 -G "$(VS_GENERATOR)" -A x64 -B out8
-DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=OFF -DBUILD_DX12=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Build x64 Debug' displayName: 'CMake (MSVC Spectre): Build x64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out8 -v --config Debug cmakeArgs: --build out8 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Build x64 Release' displayName: 'CMake (MSVC Spectre): Build x64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out8 -v --config RelWithDebInfo cmakeArgs: --build out8 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Config ARM64' displayName: 'CMake (MSVC Spectre): Config ARM64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A ARM64 -B out9 -G "$(VS_GENERATOR)" -A ARM64 -B out9
-DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=OFF -DBUILD_DX12=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Build ARM64 Debug' displayName: 'CMake (MSVC Spectre): Build ARM64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out9 -v --config Debug cmakeArgs: --build out9 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Build ARM64 Release' displayName: 'CMake (MSVC Spectre): Build ARM64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out9 -v --config RelWithDebInfo cmakeArgs: --build out9 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Win10 Spectre): Config' displayName: 'CMake (Win10 Spectre): Config'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out10 -G "$(VS_GENERATOR)" -A x64 -B out10
-DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=ON -DBUILD_DX12=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Win10 Spectre): Build' displayName: 'CMake (Win10 Spectre): Build'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out10 -v --config Debug cmakeArgs: --build out10 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (NO_WCHAR_T): Config' displayName: 'CMake (NO_WCHAR_T): Config'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out11 -G "$(VS_GENERATOR)" -A x64 -B out11
-DNO_WCHAR_T=ON -DNO_WCHAR_T=ON
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)
-DBUILD_DX12=ON -DBUILD_DX12=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (NO_WCHAR_T): Build' displayName: 'CMake (NO_WCHAR_T): Build'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out11 -v --config Debug cmakeArgs: --build out11 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Config x64' displayName: 'CMake (DLL): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out12 -G "$(VS_GENERATOR)" -A x64 -B out12
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=ON -DBUILD_DX12=ON
-DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build x64 Debug' displayName: 'CMake (DLL): Build x64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out12 -v --config Debug cmakeArgs: --build out12 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build x64 Release' displayName: 'CMake (DLL): Build x64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out12 -v --config RelWithDebInfo cmakeArgs: --build out12 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (UWP DLL): Config x64' displayName: 'CMake (UWP DLL): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out13 -G "$(VS_GENERATOR)" -A x64 -B out13
-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0
-DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (UWP DLL): Build x64' displayName: 'CMake (UWP DLL): Build x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out13 -v cmakeArgs: --build out13 -v
- job: CMAKE_BUILD_VCPKG - job: CMAKE_BUILD_VCPKG
displayName: CMake using VCPKG displayName: CMake using VCPKG
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: vcpkgRepo - checkout: vcpkgRepo
displayName: Fetch VCPKG displayName: Fetch VCPKG
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/vcpkg' path: 's/vcpkg'
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG Bootstrap displayName: VCPKG Bootstrap
inputs: inputs:
script: call bootstrap-vcpkg.bat script: call bootstrap-vcpkg.bat
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG install packages displayName: VCPKG install packages
inputs: inputs:
script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64' displayName: 'CMake (MSVC): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1 -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
displayName: 'CMake (MSVC): Build x64 Debug' - task: CMake@1
inputs: displayName: 'CMake (MSVC): Build x64 Debug'
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: --build out -v --config Debug cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: --build out -v --config Debug
displayName: 'CMake (MSVC): Config x64 w/ OpenEXR' - task: CMake@1
inputs: displayName: 'CMake (MSVC): Config x64 w/ OpenEXR'
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: > cwd: $(Build.SourcesDirectory)
-G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) cmakeArgs: >
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows -G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
- task: CMake@1 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR' -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR'
cmakeArgs: --build out2 -v --config Debug inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: 'CMake (MSVC): Config x64 w/ libjpeg' cmakeArgs: --build out2 -v --config Debug
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: 'CMake (MSVC): Config x64 w/ libjpeg'
cmakeArgs: > inputs:
-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) cwd: $(Build.SourcesDirectory)
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows cmakeArgs: >
- task: CMake@1 -G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg' -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
inputs: -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: --build out3 -v --config Debug displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg'
- task: CMake@1 inputs:
displayName: 'CMake (MSVC): Config x64 w/ libpng' cwd: $(Build.SourcesDirectory)
inputs: cmakeArgs: --build out3 -v --config Debug
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: > displayName: 'CMake (MSVC): Config x64 w/ libpng'
-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) inputs:
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: >
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng' -G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
inputs: -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
cwd: $(Build.SourcesDirectory) -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
cmakeArgs: --build out4 -v --config Debug - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng'
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out4 -v --config Debug

View File

@ -6,390 +6,392 @@
# Builds the library with Xbox extensions using CMake. # Builds the library with Xbox extensions using CMake.
schedules: schedules:
- cron: "0 4 * * *" - cron: "0 4 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-GitHub-CMake-Xbox-Dev17.yml' - '.azuredevops/pipelines/DirectXTex-GitHub-CMake-Xbox-Dev17.yml'
- CMake* - CMake*
- build/*.cmake - build/*.cmake
- build/*.in - build/*.in
- DirectXTex/Shaders/CompileShaders.cmd - DirectXTex/Shaders/CompileShaders.cmd
- Auxiliary/*Xbox* - Auxiliary/*Xbox*
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
trigger: none trigger: none
- repository: testRepo - repository: testRepo
name: walbourn/directxtextest name: walbourn/directxtextest
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VS_GENERATOR - name: VS_GENERATOR
value: 'Visual Studio 17 2022' value: 'Visual Studio 17 2022'
- name: WIN10_SDK - name: WIN10_SDK
value: '10.0.19041.0' value: '10.0.19041.0'
- name: EXTRACTED_FOLDER - name: EXTRACTED_FOLDER
value: '$(ExtractedFolder)' value: '$(ExtractedFolder)'
- name: URL_FEED - name: URL_FEED
value: $(ADOFeedURL) value: $(ADOFeedURL)
- name: VC_PATH - name: VC_PATH
value: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC' value: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
- name: GameDKLatest - name: GameDKLatest
value: '$(ExtractedFolder)\Microsoft.gdk.xbox.$(GDK_EDITION)\native\$(GDK_EDITION)\' value: '$(ExtractedFolder)\Microsoft.gdk.xbox.$(GDK_EDITION)\native\$(GDK_EDITION)\'
- name: skipNugetSecurityAnalysis - name: skipNugetSecurityAnalysis
value: true # We explicitly call this task so we don't need it to be auto-injected value: true # We explicitly call this task so we don't need it to be auto-injected
pool: pool:
vmImage: windows-2022 vmImage: windows-2022
jobs: jobs:
- job: CMAKE_BUILD - job: CMAKE_BUILD
displayName: CMake using VS Generator displayName: CMake using VS Generator
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install PGDK displayName: NuGet install PGDK
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install GDKX displayName: NuGet install GDKX
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64 (Xbox Series X|S)' displayName: 'CMake (MSVC): Config x64 (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out -G "$(VS_GENERATOR)" -A x64 -B out
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug (Xbox Series X|S)' displayName: 'CMake (MSVC): Build x64 Debug (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out -v --config Debug cmakeArgs: --build out -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release (Xbox Series X|S)' displayName: 'CMake (MSVC): Build x64 Release (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out -v --config RelWithDebInfo cmakeArgs: --build out -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Config x64 (Xbox Series X|S)' displayName: 'CMake (ClangCl): Config x64 (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out2 -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out2
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Debug (Xbox Series X|S)' displayName: 'CMake (ClangCl): Build x64 Debug (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out2 -v --config Debug cmakeArgs: --build out2 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Release (Xbox Series X|S)' displayName: 'CMake (ClangCl): Build x64 Release (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out2 -v --config RelWithDebInfo cmakeArgs: --build out2 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64 (Xbox One)' displayName: 'CMake (MSVC): Config x64 (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out3 -G "$(VS_GENERATOR)" -A x64 -B out3
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug (Xbox One)' displayName: 'CMake (MSVC): Build x64 Debug (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out3 -v --config Debug cmakeArgs: --build out3 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release (Xbox One)' displayName: 'CMake (MSVC): Build x64 Release (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out3 -v --config RelWithDebInfo cmakeArgs: --build out3 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Config x64 (Xbox One)' displayName: 'CMake (ClangCl): Config x64 (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out4 -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out4
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Debug (Xbox One)' displayName: 'CMake (ClangCl): Build x64 Debug (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out4 -v --config Debug cmakeArgs: --build out4 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Release (Xbox One)' displayName: 'CMake (ClangCl): Build x64 Release (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out4 -v --config RelWithDebInfo cmakeArgs: --build out4 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Config x64 (Xbox Series X|S)' displayName: 'CMake (DLL): Config x64 (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out5 -G "$(VS_GENERATOR)" -A x64 -B out5
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 -DBUILD_SHARED_LIBS=ON
displayName: 'CMake (DLL): Build x64 Debug (Xbox Series X|S)' - task: CMake@1
inputs: displayName: 'CMake (DLL): Build x64 Debug (Xbox Series X|S)'
cwd: '' inputs:
cmakeArgs: --build out5 -v --config Debug cwd: ''
- task: CMake@1 cmakeArgs: --build out5 -v --config Debug
displayName: 'CMake (DLL): Config x64 (Xbox One)' - task: CMake@1
inputs: displayName: 'CMake (DLL): Config x64 (Xbox One)'
cwd: '' inputs:
cmakeArgs: > cwd: ''
-G "$(VS_GENERATOR)" -A x64 -B out6 cmakeArgs: >
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -G "$(VS_GENERATOR)" -A x64 -B out6
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
- task: CMake@1 -DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF
displayName: 'CMake (DLL): Build x64 Debug (Xbox One)' -DBUILD_SHARED_LIBS=ON
inputs: - task: CMake@1
cwd: '' displayName: 'CMake (DLL): Build x64 Debug (Xbox One)'
cmakeArgs: --build out6 -v --config Debug inputs:
cwd: ''
cmakeArgs: --build out6 -v --config Debug
- job: BUILD_GDK_CMAKE_XS - job: BUILD_GDK_CMAKE_XS
displayName: 'Xbox Series X|S Extensions BUILD_TESTING=ON' displayName: 'Xbox Series X|S Extensions BUILD_TESTING=ON'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install PGDK displayName: NuGet install PGDK
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install GDKX displayName: NuGet install GDKX
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CmdLine@2 - task: CmdLine@2
displayName: Setup BWOI for GDK command-line displayName: Setup BWOI for GDK command-line
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64
call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) Scarlett call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) Scarlett
echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest% echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest%
echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest% echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest%
echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest% echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
echo ##vso[task.prependpath]%ADDBIN% echo ##vso[task.prependpath]%ADDBIN%
failOnStderr: true failOnStderr: true
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config Debug' displayName: 'CMake (MSVC): Config Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-GDKX-S cmakeArgs: --preset=x64-Debug-GDKX-S
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build Debug' displayName: 'CMake (MSVC): Build Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Debug-GDKX-S cmakeArgs: --build out\build\x64-Debug-GDKX-S
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config Release' displayName: 'CMake (MSVC): Config Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-GDKX-S cmakeArgs: --preset=x64-Release-GDKX-S
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build Release' displayName: 'CMake (MSVC): Build Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Release-GDKX-S cmakeArgs: --build out\build\x64-Release-GDKX-S
- job: BUILD_GDK_CMAKE_X - job: BUILD_GDK_CMAKE_X
displayName: 'Xbox One Extensions BUILD_TESTING=ON' displayName: 'Xbox One Extensions BUILD_TESTING=ON'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install PGDK displayName: NuGet install PGDK
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install GDKX displayName: NuGet install GDKX
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CmdLine@2 - task: CmdLine@2
displayName: Setup BWOI for GDK command-line displayName: Setup BWOI for GDK command-line
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64
call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) XboxOne call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) XboxOne
echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest% echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest%
echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest% echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest%
echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest% echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
echo ##vso[task.prependpath]%ADDBIN% echo ##vso[task.prependpath]%ADDBIN%
failOnStderr: true failOnStderr: true
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config Debug' displayName: 'CMake (MSVC): Config Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-GDKX cmakeArgs: --preset=x64-Debug-GDKX
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build Debug' displayName: 'CMake (MSVC): Build Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Debug-GDKX cmakeArgs: --build out\build\x64-Debug-GDKX
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config Release' displayName: 'CMake (MSVC): Config Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-GDKX cmakeArgs: --preset=x64-Release-GDKX
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build Release' displayName: 'CMake (MSVC): Build Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Release-GDKX cmakeArgs: --build out\build\x64-Release-GDKX

View File

@ -6,224 +6,224 @@
# Builds the library with Xbox extensions using CMake. # Builds the library with Xbox extensions using CMake.
schedules: schedules:
- cron: "0 4 * * *" - cron: "0 4 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: trigger:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/*.json - build/*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/*.json - build/*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
drafts: false drafts: false
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VS_GENERATOR - name: VS_GENERATOR
value: 'Visual Studio 16 2019' value: 'Visual Studio 16 2019'
- name: WIN10_SDK - name: WIN10_SDK
value: '10.0.19041.0' value: '10.0.19041.0'
- name: EXTRACTED_FOLDER - name: EXTRACTED_FOLDER
value: '$(ExtractedFolder)' value: '$(ExtractedFolder)'
- name: URL_FEED - name: URL_FEED
value: $(ADOFeedURL) value: $(ADOFeedURL)
- name: GameDKLatest - name: GameDKLatest
value: '$(ExtractedFolder)\Microsoft.gdk.xbox.$(GDK_EDITION)\native\$(GDK_EDITION)\' value: '$(ExtractedFolder)\Microsoft.gdk.xbox.$(GDK_EDITION)\native\$(GDK_EDITION)\'
- name: skipNugetSecurityAnalysis - name: skipNugetSecurityAnalysis
value: true # We explicitly call this task so we don't need it to be auto-injected value: true # We explicitly call this task so we don't need it to be auto-injected
pool: pool:
vmImage: windows-2019 vmImage: windows-2019
jobs: jobs:
- job: CMAKE_BUILD - job: CMAKE_BUILD
displayName: CMake using VS Generator displayName: CMake using VS Generator
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install PGDK displayName: NuGet install PGDK
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install GDKX displayName: NuGet install GDKX
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64 (Xbox Series X|S)' displayName: 'CMake (MSVC): Config x64 (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out -G "$(VS_GENERATOR)" -A x64 -B out
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug (Xbox Series X|S)' displayName: 'CMake (MSVC): Build x64 Debug (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out -v --config Debug cmakeArgs: --build out -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release (Xbox Series X|S)' displayName: 'CMake (MSVC): Build x64 Release (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out -v --config RelWithDebInfo cmakeArgs: --build out -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Config x64 (Xbox Series X|S)' displayName: 'CMake (ClangCl): Config x64 (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out2 -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out2
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Debug (Xbox Series X|S)' displayName: 'CMake (ClangCl): Build x64 Debug (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out2 -v --config Debug cmakeArgs: --build out2 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Release (Xbox Series X|S)' displayName: 'CMake (ClangCl): Build x64 Release (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out2 -v --config RelWithDebInfo cmakeArgs: --build out2 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64 (Xbox One)' displayName: 'CMake (MSVC): Config x64 (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out3 -G "$(VS_GENERATOR)" -A x64 -B out3
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug (Xbox One)' displayName: 'CMake (MSVC): Build x64 Debug (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out3 -v --config Debug cmakeArgs: --build out3 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release (Xbox One)' displayName: 'CMake (MSVC): Build x64 Release (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out3 -v --config RelWithDebInfo cmakeArgs: --build out3 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Config x64 (Xbox One)' displayName: 'CMake (ClangCl): Config x64 (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out4 -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out4
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Debug (Xbox One)' displayName: 'CMake (ClangCl): Build x64 Debug (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out4 -v --config Debug cmakeArgs: --build out4 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Release (Xbox One)' displayName: 'CMake (ClangCl): Build x64 Release (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out4 -v --config RelWithDebInfo cmakeArgs: --build out4 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Config x64 (Xbox Series X|S)' displayName: 'CMake (DLL): Config x64 (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out5 -G "$(VS_GENERATOR)" -A x64 -B out5
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_SCARLETT=ON -DBUILD_SAMPLE=OFF
-DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build x64 Debug (Xbox Series X|S)' displayName: 'CMake (DLL): Build x64 Debug (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out5 -v --config Debug cmakeArgs: --build out5 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build x64 Release (Xbox Series X|S)' displayName: 'CMake (DLL): Build x64 Release (Xbox Series X|S)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out5 -v --config RelWithDebInfo cmakeArgs: --build out5 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Config x64 (Xbox One)' displayName: 'CMake (DLL): Config x64 (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out6 -G "$(VS_GENERATOR)" -A x64 -B out6
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF -DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF
-DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build x64 Debug (Xbox One)' displayName: 'CMake (DLL): Build x64 Debug (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out6 -v --config Debug cmakeArgs: --build out6 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build x64 Release (Xbox One)' displayName: 'CMake (DLL): Build x64 Release (Xbox One)'
inputs: inputs:
cwd: '' cwd: ''
cmakeArgs: --build out6 -v --config RelWithDebInfo cmakeArgs: --build out6 -v --config RelWithDebInfo

View File

@ -6,312 +6,316 @@
# Builds the library using CMake with VS Generator (GitHub Actions covers Ninja). # Builds the library using CMake with VS Generator (GitHub Actions covers Ninja).
schedules: schedules:
- cron: "0 5 * * *" - cron: "0 5 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: trigger:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/OneFuzz*.json - build/OneFuzz*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/OneFuzz*.json - build/OneFuzz*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
drafts: false drafts: false
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
- repository: vcpkgRepo - repository: vcpkgRepo
name: Microsoft/vcpkg name: Microsoft/vcpkg
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/tags/$(VCPKG_TAG) ref: refs/tags/$(VCPKG_TAG)
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VCPKG_ROOT - name: VCPKG_ROOT
value: '$(Build.SourcesDirectory)/vcpkg' value: '$(Build.SourcesDirectory)/vcpkg'
- name: VCPKG_CMAKE_DIR - name: VCPKG_CMAKE_DIR
value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake' value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake'
- name: VCPKG_MANIFEST_DIR - name: VCPKG_MANIFEST_DIR
value: '$(Build.SourcesDirectory)/build' value: '$(Build.SourcesDirectory)/build'
- name: VS_GENERATOR - name: VS_GENERATOR
value: 'Visual Studio 16 2019' value: 'Visual Studio 16 2019'
- name: WIN10_SDK - name: WIN10_SDK
value: '10.0.19041.0' value: '10.0.19041.0'
- name: WIN11_SDK - name: WIN11_SDK
value: '10.0.22000.0' value: '10.0.22000.0'
pool: pool:
vmImage: windows-2019 vmImage: windows-2019
jobs: jobs:
- job: CMAKE_BUILD - job: CMAKE_BUILD
displayName: CMake using VS Generator displayName: CMake using VS Generator
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64' displayName: 'CMake (MSVC): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out -G "$(VS_GENERATOR)" -A x64 -B out
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=OFF -DBUILD_DX12=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug' displayName: 'CMake (MSVC): Build x64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out -v --config Debug cmakeArgs: --build out -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release' displayName: 'CMake (MSVC): Build x64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out -v --config RelWithDebInfo cmakeArgs: --build out -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x86' displayName: 'CMake (MSVC): Config x86'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A Win32 -B out2 -G "$(VS_GENERATOR)" -A Win32 -B out2
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=OFF -DBUILD_DX12=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x86 Debug' displayName: 'CMake (MSVC): Build x86 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out2 -v --config Debug cmakeArgs: --build out2 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build x86 Release' displayName: 'CMake (MSVC): Build x86 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out2 -v --config RelWithDebInfo cmakeArgs: --build out2 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (UWP): Config x64' displayName: 'CMake (UWP): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out3 -G "$(VS_GENERATOR)" -A x64 -B out3
-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0
- task: CMake@1 - task: CMake@1
displayName: 'CMake (UWP): Build x64' displayName: 'CMake (UWP): Build x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out3 -v cmakeArgs: --build out3 -v
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Config x64' displayName: 'CMake (ClangCl): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -T clangcl -B out4 -G "$(VS_GENERATOR)" -A x64 -T clangcl -B out4
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Debug' displayName: 'CMake (ClangCl): Build x64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out4 -v --config Debug cmakeArgs: --build out4 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (ClangCl): Build x64 Release' displayName: 'CMake (ClangCl): Build x64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out4 -v --config RelWithDebInfo cmakeArgs: --build out4 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Win10): Config' displayName: 'CMake (Win10): Config'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out5 -G "$(VS_GENERATOR)" -A x64 -B out5
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=ON -DBUILD_DX12=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Win10): Build' displayName: 'CMake (Win10): Build'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out5 -v --config Debug cmakeArgs: --build out5 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Config x64' displayName: 'CMake (MSVC Spectre): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out6 -G "$(VS_GENERATOR)" -A x64 -B out6
-DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=OFF -DBUILD_DX12=OFF
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Build x64 Debug' displayName: 'CMake (MSVC Spectre): Build x64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out6 -v --config Debug cmakeArgs: --build out6 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC Spectre): Build x64 Release' displayName: 'CMake (MSVC Spectre): Build x64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out6 -v --config RelWithDebInfo cmakeArgs: --build out6 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Win10 Spectre): Config' displayName: 'CMake (Win10 Spectre): Config'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out7 -G "$(VS_GENERATOR)" -A x64 -B out7
-DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DENABLE_SPECTRE_MITIGATION=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=ON -DBUILD_DX12=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Win10 Spectre): Build' displayName: 'CMake (Win10 Spectre): Build'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out7 -v --config Debug cmakeArgs: --build out7 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (NO_WCHAR_T): Config' displayName: 'CMake (NO_WCHAR_T): Config'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out8 -G "$(VS_GENERATOR)" -A x64 -B out8
-DNO_WCHAR_T=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DNO_WCHAR_T=ON -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
-DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK)
-DBUILD_DX12=ON -DBUILD_DX12=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (NO_WCHAR_T): Build' displayName: 'CMake (NO_WCHAR_T): Build'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out8 -v --config Debug cmakeArgs: --build out8 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Config x64' displayName: 'CMake (DLL): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out9 -G "$(VS_GENERATOR)" -A x64 -B out9
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_DX12=ON -DBUILD_DX12=ON
-DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build x64 Debug' displayName: 'CMake (DLL): Build x64 Debug'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out9 -v --config Debug cmakeArgs: --build out9 -v --config Debug
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build x64 Release' displayName: 'CMake (DLL): Build x64 Release'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out9 -v --config RelWithDebInfo cmakeArgs: --build out9 -v --config RelWithDebInfo
- task: CMake@1 - task: CMake@1
displayName: 'CMake (UWP DLL): Config x64' displayName: 'CMake (UWP DLL): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out10 -G "$(VS_GENERATOR)" -A x64 -B out10
-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DCMAKE_SYSTEM_VERSION=10.0
-DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (UWP DLL): Build x64' displayName: 'CMake (UWP DLL): Build x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out10 -v cmakeArgs: --build out10 -v
- job: CMAKE_BUILD_VCPKG - job: CMAKE_BUILD_VCPKG
displayName: CMake using VCPKG displayName: CMake using VCPKG
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: vcpkgRepo - checkout: vcpkgRepo
displayName: Fetch VCPKG displayName: Fetch VCPKG
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/vcpkg' path: 's/vcpkg'
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG Bootstrap displayName: VCPKG Bootstrap
inputs: inputs:
script: call bootstrap-vcpkg.bat script: call bootstrap-vcpkg.bat
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG install packages displayName: VCPKG install packages
inputs: inputs:
script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64' displayName: 'CMake (MSVC): Config x64'
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) -G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1 -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
displayName: 'CMake (MSVC): Build x64 Debug' - task: CMake@1
inputs: displayName: 'CMake (MSVC): Build x64 Debug'
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: --build out -v --config Debug cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: --build out -v --config Debug
displayName: 'CMake (MSVC): Config x64 w/ OpenEXR' - task: CMake@1
inputs: displayName: 'CMake (MSVC): Config x64 w/ OpenEXR'
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: > cwd: $(Build.SourcesDirectory)
-G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) cmakeArgs: >
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows -G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
- task: CMake@1 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR' -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR'
cmakeArgs: --build out2 -v --config Debug inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: 'CMake (MSVC): Config x64 w/ libjpeg' cmakeArgs: --build out2 -v --config Debug
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: 'CMake (MSVC): Config x64 w/ libjpeg'
cmakeArgs: > inputs:
-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) cwd: $(Build.SourcesDirectory)
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows cmakeArgs: >
- task: CMake@1 -G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg' -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
inputs: -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: --build out3 -v --config Debug displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg'
- task: CMake@1 inputs:
displayName: 'CMake (MSVC): Config x64 w/ libpng' cwd: $(Build.SourcesDirectory)
inputs: cmakeArgs: --build out3 -v --config Debug
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: > displayName: 'CMake (MSVC): Config x64 w/ libpng'
-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK) inputs:
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: >
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng' -G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
inputs: -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
cwd: $(Build.SourcesDirectory) -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
cmakeArgs: --build out4 -v --config Debug - task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng'
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out4 -v --config Debug

View File

@ -6,28 +6,28 @@
# Builds the library for Windows Desktop and UWP. # Builds the library for Windows Desktop and UWP.
schedules: schedules:
- cron: "0 3 * * *" - cron: "0 3 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
# GitHub Actions handles MSBuild for CI/PR # GitHub Actions handles MSBuild for CI/PR
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-GitHub-Dev17.yml' - '.azuredevops/pipelines/DirectXTex-GitHub-Dev17.yml'
- DirectXTex/Shaders/CompileShaders.cmd - DirectXTex/Shaders/CompileShaders.cmd
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -38,117 +38,117 @@ pool:
vmImage: windows-2022 vmImage: windows-2022
jobs: jobs:
- job: DESKTOP_BUILD - job: DESKTOP_BUILD
displayName: 'Windows Desktop' displayName: 'Windows Desktop'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
strategy: strategy:
maxParallel: 3 maxParallel: 3
matrix: matrix:
Release_arm64: Release_arm64:
BuildPlatform: ARM64 BuildPlatform: ARM64
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: false SpectreMitigation: false
Debug_arm64: Debug_arm64:
BuildPlatform: ARM64 BuildPlatform: ARM64
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: false SpectreMitigation: false
Release_x64: Release_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: false SpectreMitigation: false
Debug_x64: Debug_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: false SpectreMitigation: false
Release_x86: Release_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: false SpectreMitigation: false
Debug_x86: Debug_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: false SpectreMitigation: false
Release_arm64_SpectreMitigated: Release_arm64_SpectreMitigated:
BuildPlatform: ARM64 BuildPlatform: ARM64
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
Debug_arm64_SpectreMitigated: Debug_arm64_SpectreMitigated:
BuildPlatform: ARM64 BuildPlatform: ARM64
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
Release_x64_SpectreMitigated: Release_x64_SpectreMitigated:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
Debug_x64_SpectreMitigated: Debug_x64_SpectreMitigated:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
Release_x86_SpectreMitigated: Release_x86_SpectreMitigated:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
Debug_x86_SpectreMitigated: Debug_x86_SpectreMitigated:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln displayName: Build solution DirectXTex_Desktop_2022.sln
inputs: inputs:
solution: DirectXTex_Desktop_2022.sln solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=$(SpectreMitigation) msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=$(SpectreMitigation)
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64 msbuildArchitecture: x64
condition: ne(variables['BuildPlatform'], 'ARM64') condition: ne(variables['BuildPlatform'], 'ARM64')
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln displayName: Build solution DirectXTex_Desktop_2022_Win10.sln
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=$(SpectreMitigation) msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=$(SpectreMitigation)
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64 msbuildArchitecture: x64
- job: UWP_BUILD - job: UWP_BUILD
displayName: 'Universal Windows Platform (UWP)' displayName: 'Universal Windows Platform (UWP)'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
strategy: strategy:
maxParallel: 3 maxParallel: 3
matrix: matrix:
Release_arm64: Release_arm64:
BuildPlatform: ARM64 BuildPlatform: ARM64
BuildConfiguration: Release BuildConfiguration: Release
Debug_arm64: Debug_arm64:
BuildPlatform: ARM64 BuildPlatform: ARM64
BuildConfiguration: Debug BuildConfiguration: Debug
Release_x64: Release_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Release BuildConfiguration: Release
Debug_x64: Debug_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Debug BuildConfiguration: Debug
Release_x86: Release_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Release BuildConfiguration: Release
Debug_x86: Debug_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Debug BuildConfiguration: Debug
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln displayName: Build solution DirectXTex_Windows10_2022.sln
inputs: inputs:
solution: DirectXTex_Windows10_2022.sln solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64 msbuildArchitecture: x64

View File

@ -6,35 +6,35 @@
# Builds the library using the Microsoft GDK. # Builds the library using the Microsoft GDK.
schedules: schedules:
- cron: "30 3 * * *" - cron: "30 3 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-GitHub-GDK-Dev17.yml' - '.azuredevops/pipelines/DirectXTex-GitHub-GDK-Dev17.yml'
- '.azuredevops/templates/DirectXTex-build-gdk.yml' - '.azuredevops/templates/DirectXTex-build-gdk.yml'
- CMakeList.txt - CMakeList.txt
- build/*.in - build/*.in
- build/*.cmake - build/*.cmake
- build/SetupBWOI.* - build/SetupBWOI.*
- DirectXTex/Shaders/CompileShaders.cmd - DirectXTex/Shaders/CompileShaders.cmd
- Auxiliary/*Xbox* - Auxiliary/*Xbox*
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
trigger: none trigger: none
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -42,318 +42,318 @@ pool:
vmImage: windows-2022 vmImage: windows-2022
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: EXTRACTED_FOLDER - name: EXTRACTED_FOLDER
value: '$(ExtractedFolder)' value: '$(ExtractedFolder)'
- name: GDKEnableBWOI - name: GDKEnableBWOI
value: true value: true
- name: URL_FEED - name: URL_FEED
value: $(ADOFeedURL) value: $(ADOFeedURL)
- name: VC_PATH - name: VC_PATH
value: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC' value: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
- name: skipNugetSecurityAnalysis - name: skipNugetSecurityAnalysis
value: true # We explicitly call this task so we don't need it to be auto-injected value: true # We explicitly call this task so we don't need it to be auto-injected
jobs: jobs:
- job: BUILD_GDK - job: BUILD_GDK
displayName: 'Microsoft Game Development Kit (GDK)' displayName: 'Microsoft Game Development Kit (GDK)'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install PGDK displayName: NuGet install PGDK
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install GDKX displayName: NuGet install GDKX
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2 - task: CopyFiles@2
displayName: Set up Directory.Build.props displayName: Set up Directory.Build.props
inputs: inputs:
SourceFolder: build SourceFolder: build
Contents: 'Directory.Build.props' Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory) TargetFolder: $(Build.SourcesDirectory)
- task: MSBuild@1 - task: MSBuild@1
displayName: Setup BWOI VCTargets displayName: Setup BWOI VCTargets
inputs: inputs:
solution: build/SetupBWOI.targets solution: build/SetupBWOI.targets
msbuildVersion: 17.0 msbuildVersion: 17.0
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArguments: /p:GDKEditionNumber=$(GDK_EDITION) msbuildArguments: /p:GDKEditionNumber=$(GDK_EDITION)
- template: '/.azuredevops/templates/DirectXTex-build-gdk.yml' - template: '/.azuredevops/templates/DirectXTex-build-gdk.yml'
parameters: parameters:
msVersion: '17.0' msVersion: '17.0'
vsYear: 2022 vsYear: 2022
- job: BUILD_GDK_CMAKE_SCAR - job: BUILD_GDK_CMAKE_SCAR
displayName: 'Microsoft Game Development Kit (GDK) using CMake (Scarlett)' displayName: 'Microsoft Game Development Kit (GDK) using CMake (Scarlett)'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install PGDK displayName: NuGet install PGDK
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install GDKX displayName: NuGet install GDKX
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CmdLine@2 - task: CmdLine@2
displayName: Setup BWOI for GDK command-line displayName: Setup BWOI for GDK command-line
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64
call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) Scarlett call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) Scarlett
echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest% echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest%
echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest% echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest%
echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest% echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
echo ##vso[task.prependpath]%ADDBIN% echo ##vso[task.prependpath]%ADDBIN%
failOnStderr: true failOnStderr: true
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config Scarlett Debug' displayName: 'CMake (MSVC): Config Scarlett Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-Scarlett cmakeArgs: --preset=x64-Debug-Scarlett
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build Scarlett Debug' displayName: 'CMake (MSVC): Build Scarlett Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Debug-Scarlett cmakeArgs: --build out\build\x64-Debug-Scarlett
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config Scarlett Release' displayName: 'CMake (MSVC): Config Scarlett Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-Scarlett cmakeArgs: --preset=x64-Release-Scarlett
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build Scarlett Release' displayName: 'CMake (MSVC): Build Scarlett Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Release-Scarlett cmakeArgs: --build out\build\x64-Release-Scarlett
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Clang): Config Scarlett Debug' displayName: 'CMake (Clang): Config Scarlett Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-Scarlett-Clang cmakeArgs: --preset=x64-Debug-Scarlett-Clang
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Clang): Build Scarlett Debug' displayName: 'CMake (Clang): Build Scarlett Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Debug-Scarlett-Clang cmakeArgs: --build out\build\x64-Debug-Scarlett-Clang
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Clang): Config Scarlett Release' displayName: 'CMake (Clang): Config Scarlett Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-Scarlett-Clang cmakeArgs: --preset=x64-Release-Scarlett-Clang
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Clang): Build Scarlett Release' displayName: 'CMake (Clang): Build Scarlett Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Release-Scarlett-Clang cmakeArgs: --build out\build\x64-Release-Scarlett-Clang
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out/build' Contents: 'out/build'
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Config Scarlett Debug' displayName: 'CMake (DLL): Config Scarlett Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-Scarlett -DBUILD_SHARED_LIBS=ON cmakeArgs: --preset=x64-Debug-Scarlett -DBUILD_SHARED_LIBS=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build Scarlett Debug' displayName: 'CMake (DLL): Build Scarlett Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Debug-Scarlett cmakeArgs: --build out\build\x64-Debug-Scarlett
- job: BUILD_GDK_CMAKE_XBONE - job: BUILD_GDK_CMAKE_XBONE
displayName: 'Microsoft Game Development Kit (GDK) using CMake (XboxOne)' displayName: 'Microsoft Game Development Kit (GDK) using CMake (XboxOne)'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install PGDK displayName: NuGet install PGDK
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install GDKX displayName: NuGet install GDKX
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CmdLine@2 - task: CmdLine@2
displayName: Setup BWOI for GDK command-line displayName: Setup BWOI for GDK command-line
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64
call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) XboxOne call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) XboxOne
echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest% echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest%
echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest% echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest%
echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest% echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
echo ##vso[task.prependpath]%ADDBIN% echo ##vso[task.prependpath]%ADDBIN%
failOnStderr: true failOnStderr: true
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config XboxOne Debug' displayName: 'CMake (MSVC): Config XboxOne Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-XboxOne cmakeArgs: --preset=x64-Debug-XboxOne
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build XboxOne Debug' displayName: 'CMake (MSVC): Build XboxOne Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Debug-XboxOne cmakeArgs: --build out\build\x64-Debug-XboxOne
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config XboxOne Release' displayName: 'CMake (MSVC): Config XboxOne Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-XboxOne cmakeArgs: --preset=x64-Release-XboxOne
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Build XboxOne Release' displayName: 'CMake (MSVC): Build XboxOne Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Release-XboxOne cmakeArgs: --build out\build\x64-Release-XboxOne
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Clang): Config XboxOne Debug' displayName: 'CMake (Clang): Config XboxOne Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-XboxOne-Clang cmakeArgs: --preset=x64-Debug-XboxOne-Clang
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Clang): Build XboxOne Debug' displayName: 'CMake (Clang): Build XboxOne Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Debug-XboxOne-Clang cmakeArgs: --build out\build\x64-Debug-XboxOne-Clang
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Clang): Config XboxOne Release' displayName: 'CMake (Clang): Config XboxOne Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-XboxOne-Clang cmakeArgs: --preset=x64-Release-XboxOne-Clang
- task: CMake@1 - task: CMake@1
displayName: 'CMake (Clang): Build XboxOne Release' displayName: 'CMake (Clang): Build XboxOne Release'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Release-XboxOne-Clang cmakeArgs: --build out\build\x64-Release-XboxOne-Clang
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out/build' Contents: 'out/build'
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Config XboxOne Debug' displayName: 'CMake (DLL): Config XboxOne Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-XboxOne -DBUILD_SHARED_LIBS=ON cmakeArgs: --preset=x64-Debug-XboxOne -DBUILD_SHARED_LIBS=ON
- task: CMake@1 - task: CMake@1
displayName: 'CMake (DLL): Build XboxOne Debug' displayName: 'CMake (DLL): Build XboxOne Debug'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out\build\x64-Debug-XboxOne cmakeArgs: --build out\build\x64-Debug-XboxOne

View File

@ -8,52 +8,52 @@
# NOTE: We use x64 MSBuild for the GDK as the NuGets don't include 32-bit support to avoid cross-arch dependencies. # NOTE: We use x64 MSBuild for the GDK as the NuGets don't include 32-bit support to avoid cross-arch dependencies.
schedules: schedules:
- cron: "30 3 * * *" - cron: "30 3 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: trigger:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- CMake* - CMake*
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmake - build/*.cmake
- build/*.cmd - build/*.cmd
- build/*.in - build/*.in
- build/*.json - build/*.json
- build/*.ps1 - build/*.ps1
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- CMake* - CMake*
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmake - build/*.cmake
- build/*.cmd - build/*.cmd
- build/*.in - build/*.in
- build/*.json - build/*.json
- build/*.ps1 - build/*.ps1
drafts: false drafts: false
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -61,78 +61,78 @@ pool:
vmImage: windows-2019 vmImage: windows-2019
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: EXTRACTED_FOLDER - name: EXTRACTED_FOLDER
value: '$(ExtractedFolder)' value: '$(ExtractedFolder)'
- name: GDKEnableBWOI - name: GDKEnableBWOI
value: true value: true
- name: URL_FEED - name: URL_FEED
value: $(ADOFeedURL) value: $(ADOFeedURL)
- name: skipNugetSecurityAnalysis - name: skipNugetSecurityAnalysis
value: true # We explicitly call this task so we don't need it to be auto-injected value: true # We explicitly call this task so we don't need it to be auto-injected
jobs: jobs:
- job: BUILD_GDK - job: BUILD_GDK
displayName: 'Microsoft Game Development Kit (GDK)' displayName: 'Microsoft Game Development Kit (GDK)'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install PGDK displayName: NuGet install PGDK
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet install GDKX displayName: NuGet install GDKX
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2 - task: CopyFiles@2
displayName: Set up Directory.Build.props displayName: Set up Directory.Build.props
inputs: inputs:
SourceFolder: build SourceFolder: build
Contents: 'Directory.Build.props' Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory) TargetFolder: $(Build.SourcesDirectory)
- task: MSBuild@1 - task: MSBuild@1
displayName: Setup BWOI VCTargets displayName: Setup BWOI VCTargets
inputs: inputs:
solution: build/SetupBWOI.targets solution: build/SetupBWOI.targets
msbuildVersion: 16.0 msbuildVersion: 16.0
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArguments: /p:GDKEditionNumber=$(GDK_EDITION) msbuildArguments: /p:GDKEditionNumber=$(GDK_EDITION)
- template: '/.azuredevops/templates/DirectXTex-build-gdk.yml' - template: '/.azuredevops/templates/DirectXTex-build-gdk.yml'
parameters: parameters:
msVersion: '16.0' msVersion: '16.0'
vsYear: 2019 vsYear: 2019

View File

@ -6,60 +6,60 @@
# Builds the library and test suite using the MinGW compiler. # Builds the library and test suite using the MinGW compiler.
schedules: schedules:
- cron: "0 5 * * *" - cron: "0 5 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: trigger:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/OneFuzz*.json - build/OneFuzz*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/OneFuzz*.json - build/OneFuzz*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
drafts: false drafts: false
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
- repository: vcpkgRepo - repository: vcpkgRepo
name: Microsoft/vcpkg name: Microsoft/vcpkg
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/tags/$(VCPKG_TAG) ref: refs/tags/$(VCPKG_TAG)
- repository: testRepo - repository: testRepo
name: walbourn/directxtextest name: walbourn/directxtextest
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -67,278 +67,288 @@ pool:
vmImage: windows-2022 vmImage: windows-2022
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VCPKG_ROOT - name: VCPKG_ROOT
value: '$(Build.SourcesDirectory)/vcpkg' value: '$(Build.SourcesDirectory)/vcpkg'
- name: VCPKG_CMAKE_DIR - name: VCPKG_CMAKE_DIR
value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake' value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake'
- name: VCPKG_MANIFEST_DIR - name: VCPKG_MANIFEST_DIR
value: '$(Build.SourcesDirectory)/build' value: '$(Build.SourcesDirectory)/build'
- name: WIN11_SDK - name: WIN11_SDK
value: '10.0.22000.0' value: '10.0.22000.0'
- name: URL_MINGW32 - name: BASE_URL
value: https://github.com/brechtsanders/winlibs_mingw/releases/download/12.2.0-14.0.6-10.0.0-ucrt-r2/winlibs-i686-posix-dwarf-gcc-12.2.0-llvm-14.0.6-mingw-w64ucrt-10.0.0-r2.zip value: https://github.com/brechtsanders/winlibs_mingw/releases/download
- name: HASH_MINGW32 - name: URL_MINGW32
value: 'fcd1e11b896190da01c83d5b5fb0d37b7c61585e53446c2dab0009debc3915e757213882c35e35396329338de6f0222ba012e23a5af86932db45186a225d1272' value: $(BASE_URL)/12.2.0-14.0.6-10.0.0-ucrt-r2/winlibs-i686-posix-dwarf-gcc-12.2.0-llvm-14.0.6-mingw-w64ucrt-10.0.0-r2.zip
- name: CompileShadersOutput - name: HASH_MINGW32
value: '$(Build.BinariesDirectory)\Shaders' value: 'fcd1e11b896190da01c83d5b5fb0d37b7c61585e53446c2dab0009debc3915e757213882c35e35396329338de6f0222ba012e23a5af86932db45186a225d1272'
- name: CompileShadersOutput
value: '$(Build.BinariesDirectory)\Shaders'
jobs: jobs:
- job: MINGW32_BUILD - job: MINGW32_BUILD
displayName: 'Minimalist GNU for Windows (MinGW32)' displayName: 'Minimalist GNU for Windows (MinGW32)'
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: vcpkgRepo - checkout: vcpkgRepo
displayName: Fetch VCPKG displayName: Fetch VCPKG
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/vcpkg' path: 's/vcpkg'
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG Bootstrap displayName: VCPKG Bootstrap
inputs: inputs:
script: | script: |
call bootstrap-vcpkg.bat call bootstrap-vcpkg.bat
echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x86-mingw-static echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x86-mingw-static
echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x86-mingw-static echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x86-mingw-static
workingDirectory: $(Build.SourcesDirectory)\vcpkg workingDirectory: $(Build.SourcesDirectory)\vcpkg
- task: PowerShell@2 - task: PowerShell@2
displayName: Install MinGW32 and setup for Windows 11 SDK displayName: Install MinGW32 and setup for Windows 11 SDK
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
Write-Host "Downloading winlibs..." Write-Host "Downloading winlibs..."
Invoke-WebRequest -Uri "$(URL_MINGW32)" -OutFile "gw32.zip" Invoke-WebRequest -Uri "$(URL_MINGW32)" -OutFile "gw32.zip"
Write-Host "Downloaded." Write-Host "Downloaded."
$fileHash = Get-FileHash -Algorithm SHA512 gw32.zip | ForEach { $_.Hash} | Out-String $fileHash = Get-FileHash -Algorithm SHA512 gw32.zip | ForEach { $_.Hash} | Out-String
$filehash = $fileHash.Trim() $filehash = $fileHash.Trim()
Write-Host "##[debug]SHA512: " $fileHash Write-Host "##[debug]SHA512: " $fileHash
if ($fileHash -ne '$(HASH_MINGW32)') { if ($fileHash -ne '$(HASH_MINGW32)') {
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
} }
Write-Host "Extracting winlibs..." Write-Host "Extracting winlibs..."
Expand-Archive -LiteralPath 'gw32.zip' Expand-Archive -LiteralPath 'gw32.zip'
Write-Host "Extracted." Write-Host "Extracted."
Write-Host "Added to path: $env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin" Write-Host "Added to path: $env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin"
Write-Host "##vso[task.prependpath]$env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin" Write-Host "##vso[task.prependpath]$env:BUILD_SOURCESDIRECTORY\gw32\mingw32\bin"
$sdkroot = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' | Select-Object -ExpandProperty KitsRoot10 $sdkroot = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' | Select-Object -ExpandProperty KitsRoot10
$wsdkbin = "{0}bin\" -f $sdkroot $wsdkbin = "{0}bin\" -f $sdkroot
$wsdkverbin = "{0}bin\$(WIN11_SDK)\" -f $sdkroot $wsdkverbin = "{0}bin\$(WIN11_SDK)\" -f $sdkroot
$wsdkarchbin = "{0}bin\$(WIN11_SDK)\x86" -f $sdkroot $wsdkarchbin = "{0}bin\$(WIN11_SDK)\x86" -f $sdkroot
if (Test-Path "$wsdkarchbin") { if (Test-Path "$wsdkarchbin") {
Write-Host "##vso[task.setvariable variable=WindowsSdkBinPath;]$wsdkbin" Write-Host "##vso[task.setvariable variable=WindowsSdkBinPath;]$wsdkbin"
Write-Host "##vso[task.setvariable variable=WindowsSdkVerBinPath;]$wsdkverbin" Write-Host "##vso[task.setvariable variable=WindowsSdkVerBinPath;]$wsdkverbin"
Write-Host "##vso[task.prependpath]$wsdkarchbin" Write-Host "##vso[task.prependpath]$wsdkarchbin"
} }
else { else {
Write-Error -Message "##[error]Can't find Windows SDK ($(WIN11_SDK))" -ErrorAction Stop Write-Error -Message "##[error]Can't find Windows SDK ($(WIN11_SDK))" -ErrorAction Stop
} }
workingDirectory: $(Build.SourcesDirectory) workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2 - task: CmdLine@2
displayName: GCC version displayName: GCC version
inputs: inputs:
script: g++ --version script: g++ --version
- task: BatchScript@1 - task: BatchScript@1
displayName: CompileShaders displayName: CompileShaders
inputs: inputs:
filename: DirectXTex/Shaders/CompileShaders.cmd filename: DirectXTex/Shaders/CompileShaders.cmd
workingFolder: $(Build.SourcesDirectory)\DirectXTex\Shaders workingFolder: $(Build.SourcesDirectory)\DirectXTex\Shaders
- task: BatchScript@1 - task: BatchScript@1
displayName: HLSL displayName: HLSL
inputs: inputs:
filename: DDSView/hlsl.cmd filename: DDSView/hlsl.cmd
workingFolder: $(Build.SourcesDirectory)\DDSView workingFolder: $(Build.SourcesDirectory)\DDSView
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG install packages displayName: VCPKG install packages
inputs: inputs:
script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x86-mingw-static script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x86-mingw-static
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: CMake@1 - task: CMake@1
displayName: CMake (MinGW32) displayName: CMake (MinGW32)
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86 -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput)
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1 -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
displayName: CMake (MinGW32) Build - task: CMake@1
inputs: displayName: CMake (MinGW32) Build
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: --build out cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: --build out
displayName: CMake (MinGW32) w/ OpenEXR - task: CMake@1
inputs: displayName: CMake (MinGW32) w/ OpenEXR
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: > cwd: $(Build.SourcesDirectory)
-B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x86 cmakeArgs: >
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x86
-DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput)
- task: CMake@1 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
displayName: CMake (MinGW32) Build w/ OpenEXR -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake (MinGW32) Build w/ OpenEXR
cmakeArgs: --build out2 inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake (MinGW32) w/ libjpeg cmakeArgs: --build out2
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake (MinGW32) w/ libjpeg
cmakeArgs: > inputs:
-B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x86 cwd: $(Build.SourcesDirectory)
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" cmakeArgs: >
-DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x86
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
- task: CMake@1 -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput)
displayName: CMake (MinGW32) Build w/ libjpeg -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
inputs: -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: --build out3 displayName: CMake (MinGW32) Build w/ libjpeg
- task: CMake@1 inputs:
displayName: CMake (MinGW32) w/ libpng cwd: $(Build.SourcesDirectory)
inputs: cmakeArgs: --build out3
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: > displayName: CMake (MinGW32) w/ libpng
-B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x86 inputs:
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" cwd: $(Build.SourcesDirectory)
-DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) cmakeArgs: >
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x86
- task: CMake@1 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
displayName: CMake (MinGW32) Build w/ libpng -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput)
inputs: -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
cwd: $(Build.SourcesDirectory) -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
cmakeArgs: --build out4 - task: CMake@1
displayName: CMake (MinGW32) Build w/ libpng
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out4
- job: MINGW64_BUILD - job: MINGW64_BUILD
displayName: 'Minimalist GNU for Windows (MinGW-W64) BUILD_TESTING=ON' displayName: 'Minimalist GNU for Windows (MinGW-W64) BUILD_TESTING=ON'
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: vcpkgRepo - checkout: vcpkgRepo
displayName: Fetch VCPKG displayName: Fetch VCPKG
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/vcpkg' path: 's/vcpkg'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG Bootstrap displayName: VCPKG Bootstrap
inputs: inputs:
script: | script: |
call bootstrap-vcpkg.bat call bootstrap-vcpkg.bat
echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x64-mingw-static echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x64-mingw-static
echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x64-mingw-static echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x64-mingw-static
workingDirectory: $(Build.SourcesDirectory)\vcpkg workingDirectory: $(Build.SourcesDirectory)\vcpkg
- task: PowerShell@2 - task: PowerShell@2
displayName: Setup for Shader Compilation displayName: Setup for Shader Compilation
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
$sdkroot = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' | Select-Object -ExpandProperty KitsRoot10 $sdkroot = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots' | Select-Object -ExpandProperty KitsRoot10
$wsdkbin = "{0}bin\" -f $sdkroot $wsdkbin = "{0}bin\" -f $sdkroot
$wsdkverbin = "{0}bin\$(WIN11_SDK)\" -f $sdkroot $wsdkverbin = "{0}bin\$(WIN11_SDK)\" -f $sdkroot
$wsdkarchbin = "{0}bin\$(WIN11_SDK)\x64" -f $sdkroot $wsdkarchbin = "{0}bin\$(WIN11_SDK)\x64" -f $sdkroot
if (Test-Path "$wsdkarchbin") { if (Test-Path "$wsdkarchbin") {
Write-Host "##vso[task.setvariable variable=WindowsSdkBinPath;]$wsdkbin" Write-Host "##vso[task.setvariable variable=WindowsSdkBinPath;]$wsdkbin"
Write-Host "##vso[task.setvariable variable=WindowsSdkVerBinPath;]$wsdkverbin" Write-Host "##vso[task.setvariable variable=WindowsSdkVerBinPath;]$wsdkverbin"
Write-Host "##vso[task.prependpath]$wsdkarchbin" Write-Host "##vso[task.prependpath]$wsdkarchbin"
} }
else { else {
Write-Error -Message "##[error]Can't find Windows SDK ($(WIN11_SDK))" -ErrorAction Stop Write-Error -Message "##[error]Can't find Windows SDK ($(WIN11_SDK))" -ErrorAction Stop
} }
- task: CmdLine@2 - task: CmdLine@2
displayName: GCC version displayName: GCC version
inputs: inputs:
script: g++ --version script: g++ --version
- task: BatchScript@1 - task: BatchScript@1
displayName: CompileShaders.cmd displayName: CompileShaders.cmd
inputs: inputs:
filename: DirectXTex/Shaders/CompileShaders.cmd filename: DirectXTex/Shaders/CompileShaders.cmd
workingFolder: $(Build.SourcesDirectory)\DirectXTex\Shaders workingFolder: $(Build.SourcesDirectory)\DirectXTex\Shaders
- task: BatchScript@1 - task: BatchScript@1
displayName: HLSL displayName: HLSL
inputs: inputs:
filename: DDSView/hlsl.cmd filename: DDSView/hlsl.cmd
workingFolder: $(Build.SourcesDirectory)\DDSView workingFolder: $(Build.SourcesDirectory)\DDSView
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG install packages displayName: VCPKG install packages
inputs: inputs:
script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-mingw-static script: call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-mingw-static
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: CMake@1 - task: CMake@1
displayName: CMake (MinGW-W64) displayName: CMake (MinGW-W64)
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64 -B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput)
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1 -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
displayName: CMake (MinGW-W64) Build - task: CMake@1
inputs: displayName: CMake (MinGW-W64) Build
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: --build out cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: --build out
displayName: CMake (MinGW-W64) w/ OpenEXR - task: CMake@1
inputs: displayName: CMake (MinGW-W64) w/ OpenEXR
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: > cwd: $(Build.SourcesDirectory)
-B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF cmakeArgs: >
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" -B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
-DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput)
- task: CMake@1 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
displayName: CMake (MinGW-W64) Build w/ OpenEXR -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake (MinGW-W64) Build w/ OpenEXR
cmakeArgs: --build out2 inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake (MinGW-W64) w/ libjpeg cmakeArgs: --build out2
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake (MinGW-W64) w/ libjpeg
cmakeArgs: > inputs:
-B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF cwd: $(Build.SourcesDirectory)
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" cmakeArgs: >
-DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) -B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
- task: CMake@1 -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput)
displayName: CMake (MinGW-W64) Build w/ libjpeg -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
inputs: -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: --build out3 displayName: CMake (MinGW-W64) Build w/ libjpeg
- task: CMake@1 inputs:
displayName: CMake (MinGW-W64) w/ libpng cwd: $(Build.SourcesDirectory)
inputs: cmakeArgs: --build out3
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: > displayName: CMake (MinGW-W64) w/ libpng
-B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF inputs:
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles" cwd: $(Build.SourcesDirectory)
-DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput) cmakeArgs: >
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
- task: CMake@1 -DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
displayName: CMake (MinGW-W64) Build w/ libpng -DUSE_PREBUILT_SHADERS=ON -DCOMPILED_SHADERS=$(CompileShadersOutput)
inputs: -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
cwd: $(Build.SourcesDirectory) -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
cmakeArgs: --build out4 - task: CMake@1
displayName: CMake (MinGW-W64) Build w/ libpng
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out4

View File

@ -6,152 +6,152 @@
# Builds the library using the latest prerelease of the Windows SDK from nuget.org. # Builds the library using the latest prerelease of the Windows SDK from nuget.org.
schedules: schedules:
- cron: "0 3 * * 6" - cron: "0 3 * * 6"
displayName: 'Saturday night build' displayName: 'Saturday night build'
branches: branches:
include: include:
- main - main
always: true always: true
trigger: none trigger: none
pr: none pr: none
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: EXTRACTED_FOLDER - name: EXTRACTED_FOLDER
value: $(ExtractedFolder) value: $(ExtractedFolder)
- name: WSDKEnableBWOI - name: WSDKEnableBWOI
value: true value: true
- name: URL_FEED - name: URL_FEED
value: $(ADOFeedURL) value: $(ADOFeedURL)
- name: skipNugetSecurityAnalysis - name: skipNugetSecurityAnalysis
value: true # We explicitly call this task so we don't need it to be auto-injected value: true # We explicitly call this task so we don't need it to be auto-injected
pool: pool:
vmImage: windows-2022 vmImage: windows-2022
jobs: jobs:
- job: DESKTOP_BUILD - job: DESKTOP_BUILD
displayName: 'Windows Desktop' displayName: 'Windows Desktop'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK x64 displayName: NuGet Install WSDK x64
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK x86 displayName: NuGet Install WSDK x86
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK arm64 displayName: NuGet Install WSDK arm64
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2 - task: CopyFiles@2
displayName: Set up Directory.Build.props displayName: Set up Directory.Build.props
inputs: inputs:
SourceFolder: build SourceFolder: build
Contents: 'Directory.Build.props' Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory) TargetFolder: $(Build.SourcesDirectory)
- template: '/.azuredevops/templates/DirectXTex-build-win32.yml' - template: '/.azuredevops/templates/DirectXTex-build-win32.yml'
- job: UWP_BUILD - job: UWP_BUILD
displayName: 'Universal Windows Platform (UWP)' displayName: 'Universal Windows Platform (UWP)'
timeoutInMinutes: 240 timeoutInMinutes: 240
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet set package source to ADO feed displayName: NuGet set package source to ADO feed
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK x64 displayName: NuGet Install WSDK x64
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK x86 displayName: NuGet Install WSDK x86
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK arm64 displayName: NuGet Install WSDK arm64
inputs: inputs:
command: custom command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2 - task: CopyFiles@2
displayName: Set up Directory.Build.props displayName: Set up Directory.Build.props
inputs: inputs:
SourceFolder: build SourceFolder: build
Contents: 'Directory.Build.props' Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory) TargetFolder: $(Build.SourcesDirectory)
- template: '/.azuredevops/templates/DirectXTex-build-uwp.yml' - template: '/.azuredevops/templates/DirectXTex-build-uwp.yml'

View File

@ -6,152 +6,152 @@
# Builds the library using the latest release of the Windows SDK from nuget.org. # Builds the library using the latest release of the Windows SDK from nuget.org.
schedules: schedules:
- cron: "0 3 * * 0" - cron: "0 3 * * 0"
displayName: 'Sunday night build' displayName: 'Sunday night build'
branches: branches:
include: include:
- main - main
always: true always: true
trigger: none trigger: none
pr: none pr: none
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: EXTRACTED_FOLDER - name: EXTRACTED_FOLDER
value: $(ExtractedFolder) value: $(ExtractedFolder)
- name: WSDKEnableBWOI - name: WSDKEnableBWOI
value: true value: true
- name: URL_FEED - name: URL_FEED
value: $(ADOFeedURL) value: $(ADOFeedURL)
- name: skipNugetSecurityAnalysis - name: skipNugetSecurityAnalysis
value: true # We explicitly call this task so we don't need it to be auto-injected value: true # We explicitly call this task so we don't need it to be auto-injected
pool: pool:
vmImage: windows-2022 vmImage: windows-2022
jobs: jobs:
- job: DESKTOP_BUILD - job: DESKTOP_BUILD
displayName: 'Windows Desktop' displayName: 'Windows Desktop'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option. # We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed' displayName: 'NuGet set package source to ADO feed'
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK x64 displayName: NuGet Install WSDK x64
inputs: inputs:
command: custom command: custom
arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK x86 displayName: NuGet Install WSDK x86
inputs: inputs:
command: custom command: custom
arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK arm64 displayName: NuGet Install WSDK arm64
inputs: inputs:
command: custom command: custom
arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2 - task: CopyFiles@2
displayName: Set up Directory.Build.props displayName: Set up Directory.Build.props
inputs: inputs:
SourceFolder: build SourceFolder: build
Contents: 'Directory.Build.props' Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory) TargetFolder: $(Build.SourcesDirectory)
- template: '/.azuredevops/templates/DirectXTex-build-win32.yml' - template: '/.azuredevops/templates/DirectXTex-build-win32.yml'
- job: UWP_BUILD - job: UWP_BUILD
displayName: 'Universal Windows Platform (UWP)' displayName: 'Universal Windows Platform (UWP)'
timeoutInMinutes: 240 timeoutInMinutes: 240
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: PowerShell@2 - task: PowerShell@2
displayName: 'Create nuget.config with single source' displayName: 'Create nuget.config with single source'
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$xml = @' $xml = @'
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
</packageSources> </packageSources>
</configuration> </configuration>
'@ '@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet set package source to ADO feed displayName: NuGet set package source to ADO feed
inputs: inputs:
command: custom command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0 - task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis' displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1 - task: NuGetAuthenticate@1
displayName: 'NuGet Auth' displayName: 'NuGet Auth'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK x64 displayName: NuGet Install WSDK x64
inputs: inputs:
command: custom command: custom
arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK x86 displayName: NuGet Install WSDK x86
inputs: inputs:
command: custom command: custom
arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet Install WSDK arm64 displayName: NuGet Install WSDK arm64
inputs: inputs:
command: custom command: custom
arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER) arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2 - task: CopyFiles@2
displayName: Set up Directory.Build.props displayName: Set up Directory.Build.props
inputs: inputs:
SourceFolder: build SourceFolder: build
Contents: 'Directory.Build.props' Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory) TargetFolder: $(Build.SourcesDirectory)
- template: '/.azuredevops/templates/DirectXTex-build-uwp.yml' - template: '/.azuredevops/templates/DirectXTex-build-uwp.yml'

View File

@ -6,32 +6,32 @@
# Builds the library and test suite. # Builds the library and test suite.
schedules: schedules:
- cron: "30 3 * * *" - cron: "30 3 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
# GitHub Actions handles test suite for CI/PR # GitHub Actions handles test suite for CI/PR
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-GitHub-Test-Dev17.yml' - '.azuredevops/pipelines/DirectXTex-GitHub-Test-Dev17.yml'
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
- repository: testRepo - repository: testRepo
name: walbourn/directxtextest name: walbourn/directxtextest
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -44,257 +44,257 @@ variables:
GUID_FEED: $(ADOFeedGUID) GUID_FEED: $(ADOFeedGUID)
jobs: jobs:
- job: DESKTOP_BUILD - job: DESKTOP_BUILD
displayName: 'Windows Desktop' displayName: 'Windows Desktop'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
strategy: strategy:
maxParallel: 3 maxParallel: 3
matrix: matrix:
Release_arm64: Release_arm64:
BuildPlatform: ARM64 BuildPlatform: ARM64
BuildConfiguration: Release BuildConfiguration: Release
Debug_arm64: Debug_arm64:
BuildPlatform: ARM64 BuildPlatform: ARM64
BuildConfiguration: Debug BuildConfiguration: Debug
Release_x64: Release_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Release BuildConfiguration: Release
Debug_x64: Debug_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Debug BuildConfiguration: Debug
Release_x86: Release_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Release BuildConfiguration: Release
Debug_x86: Debug_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Debug BuildConfiguration: Debug
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet restore tests displayName: NuGet restore tests
inputs: inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022.sln solution: Tests/DirectXTex_Tests_Desktop_2022.sln
feedRestore: $(GUID_FEED) feedRestore: $(GUID_FEED)
includeNuGetOrg: false includeNuGetOrg: false
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022.sln displayName: Build solution DirectXTex_Tests_Desktop_2022.sln
inputs: inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022.sln solution: Tests/DirectXTex_Tests_Desktop_2022.sln
vsVersion: 17.0 vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64 msbuildArchitecture: x64
condition: ne(variables['BuildPlatform'], 'ARM64') condition: ne(variables['BuildPlatform'], 'ARM64')
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022_Win10.sln displayName: Build solution DirectXTex_Tests_Desktop_2022_Win10.sln
inputs: inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022_Win10.sln solution: Tests/DirectXTex_Tests_Desktop_2022_Win10.sln
vsVersion: 17.0 vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'
msbuildArchitecture: x64 msbuildArchitecture: x64
- job: CMAKE_BUILD_X64 - job: CMAKE_BUILD_X64
displayName: 'CMake for X64 BUILD_TESTING=ON' displayName: 'CMake for X64 BUILD_TESTING=ON'
timeoutInMinutes: 120 timeoutInMinutes: 120
workspace: workspace:
clean: all clean: all
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: CmdLine@2 - task: CmdLine@2
displayName: Setup environment for CMake to use VS displayName: Setup environment for CMake to use VS
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE% echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; x64-Debug) Config displayName: CMake (MSVC; x64-Debug) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug cmakeArgs: --preset=x64-Debug
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; x64-Debug) Build displayName: CMake (MSVC; x64-Debug) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Debug -v cmakeArgs: --build out/build/x64-Debug -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; x64-Release) Config displayName: CMake (MSVC; x64-Release) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release cmakeArgs: --preset=x64-Release
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; x64-Release) Build displayName: CMake (MSVC; x64-Release) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Release -v cmakeArgs: --build out/build/x64-Release -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; x64-Debug) Config displayName: CMake (clang/LLVM; x64-Debug) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-Clang cmakeArgs: --preset=x64-Debug-Clang
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; x64-Debug) Build displayName: CMake (clang/LLVM; x64-Debug) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Debug-Clang -v cmakeArgs: --build out/build/x64-Debug-Clang -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; x64-Release) Config displayName: CMake (clang/LLVM; x64-Release) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-Clang cmakeArgs: --preset=x64-Release-Clang
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; x64-Release) Build displayName: CMake (clang/LLVM; x64-Release) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Release-Clang -v cmakeArgs: --build out/build/x64-Release-Clang -v
- job: CMAKE_BUILD_ARM64 - job: CMAKE_BUILD_ARM64
displayName: 'CMake for ARM64 BUILD_TESTING=ON' displayName: 'CMake for ARM64 BUILD_TESTING=ON'
timeoutInMinutes: 120 timeoutInMinutes: 120
workspace: workspace:
clean: all clean: all
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: CmdLine@2 - task: CmdLine@2
displayName: Setup environment for CMake to use VS displayName: Setup environment for CMake to use VS
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvarsamd64_arm64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvarsamd64_arm64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\arm64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\arm64
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE% echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; arm64-Debug) Config displayName: CMake (MSVC; arm64-Debug) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Debug cmakeArgs: --preset=arm64-Debug
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; arm64-Debug) Build displayName: CMake (MSVC; arm64-Debug) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Debug -v cmakeArgs: --build out/build/arm64-Debug -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; arm64-Release) Config displayName: CMake (MSVC; arm64-Release) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Release cmakeArgs: --preset=arm64-Release
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; arm64-Release) Build displayName: CMake (MSVC; arm64-Release) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Release -v cmakeArgs: --build out/build/arm64-Release -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; arm64-Debug) Config displayName: CMake (clang/LLVM; arm64-Debug) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Debug-Clang cmakeArgs: --preset=arm64-Debug-Clang
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; arm64-Debug) Build displayName: CMake (clang/LLVM; arm64-Debug) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Debug-Clang -v cmakeArgs: --build out/build/arm64-Debug-Clang -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; arm64-Release) Config displayName: CMake (clang/LLVM; arm64-Release) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Release-Clang cmakeArgs: --preset=arm64-Release-Clang
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; arm64-Release) Build displayName: CMake (clang/LLVM; arm64-Release) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Release-Clang -v cmakeArgs: --build out/build/arm64-Release-Clang -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; arm64ec-Debug) Config displayName: CMake (MSVC; arm64ec-Debug) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64ec-Debug cmakeArgs: --preset=arm64ec-Debug
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; arm64ec-Debug) Build displayName: CMake (MSVC; arm64ec-Debug) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64ec-Debug -v cmakeArgs: --build out/build/arm64ec-Debug -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; arm64ec-Release) Config displayName: CMake (MSVC; arm64ec-Release) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64ec-Release cmakeArgs: --preset=arm64ec-Release
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; arm64ec-Release) Build displayName: CMake (MSVC; arm64ec-Release) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64ec-Release -v cmakeArgs: --build out/build/arm64ec-Release -v

View File

@ -6,32 +6,32 @@
# Builds the library and test suite. # Builds the library and test suite.
schedules: schedules:
- cron: "30 3 * * *" - cron: "30 3 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
# GitHub Actions handles test suite for CI/PR # GitHub Actions handles test suite for CI/PR
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-GitHub-Test.yml' - '.azuredevops/pipelines/DirectXTex-GitHub-Test.yml'
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
- repository: testRepo - repository: testRepo
name: walbourn/directxtextest name: walbourn/directxtextest
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -39,149 +39,149 @@ pool:
vmImage: windows-2019 vmImage: windows-2019
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VC_PATH - name: VC_PATH
value: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC' value: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC'
- name: GUID_FEED - name: GUID_FEED
value: $(ADOFeedGUID) value: $(ADOFeedGUID)
jobs: jobs:
- job: DESKTOP_BUILD - job: DESKTOP_BUILD
displayName: 'Windows Desktop' displayName: 'Windows Desktop'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
strategy: strategy:
maxParallel: 2 maxParallel: 2
matrix: matrix:
Release_x64: Release_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Release BuildConfiguration: Release
Debug_x64: Debug_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Debug BuildConfiguration: Debug
Release_x86: Release_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Release BuildConfiguration: Release
Debug_x86: Debug_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Debug BuildConfiguration: Debug
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: NuGetToolInstaller@1 - task: NuGetToolInstaller@1
displayName: 'Use NuGet' displayName: 'Use NuGet'
- task: NuGetCommand@2 - task: NuGetCommand@2
displayName: NuGet restore tests displayName: NuGet restore tests
inputs: inputs:
solution: Tests/DirectXTex_Tests_Desktop_2019.sln solution: Tests/DirectXTex_Tests_Desktop_2019.sln
feedRestore: $(GUID_FEED) feedRestore: $(GUID_FEED)
includeNuGetOrg: false includeNuGetOrg: false
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2019.sln displayName: Build solution DirectXTex_Tests_Desktop_2019.sln
inputs: inputs:
solution: Tests/DirectXTex_Tests_Desktop_2019.sln solution: Tests/DirectXTex_Tests_Desktop_2019.sln
vsVersion: 16.0 vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2019_Win10.sln displayName: Build solution DirectXTex_Tests_Desktop_2019_Win10.sln
inputs: inputs:
solution: Tests/DirectXTex_Tests_Desktop_2019_Win10.sln solution: Tests/DirectXTex_Tests_Desktop_2019_Win10.sln
vsVersion: 16.0 vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'
- job: CMAKE_BUILD_X64 - job: CMAKE_BUILD_X64
displayName: 'CMake for X64 BUILD_TESTING=ON' displayName: 'CMake for X64 BUILD_TESTING=ON'
timeoutInMinutes: 120 timeoutInMinutes: 120
workspace: workspace:
clean: all clean: all
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: CmdLine@2 - task: CmdLine@2
displayName: Setup environment for CMake to use VS displayName: Setup environment for CMake to use VS
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE% echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; x64-Debug) Config displayName: CMake (MSVC; x64-Debug) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug cmakeArgs: --preset=x64-Debug
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; x64-Debug) Build displayName: CMake (MSVC; x64-Debug) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Debug -v cmakeArgs: --build out/build/x64-Debug -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; x64-Release) Config displayName: CMake (MSVC; x64-Release) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release cmakeArgs: --preset=x64-Release
- task: CMake@1 - task: CMake@1
displayName: CMake (MSVC; x64-Release) Build displayName: CMake (MSVC; x64-Release) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Release -v cmakeArgs: --build out/build/x64-Release -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; x64-Debug) Config displayName: CMake (clang/LLVM; x64-Debug) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-Clang cmakeArgs: --preset=x64-Debug-Clang
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; x64-Debug) Build displayName: CMake (clang/LLVM; x64-Debug) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Debug-Clang -v cmakeArgs: --build out/build/x64-Debug-Clang -v
- task: DeleteFiles@1 - task: DeleteFiles@1
inputs: inputs:
Contents: 'out' Contents: 'out'
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; x64-Release) Config displayName: CMake (clang/LLVM; x64-Release) Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-Clang cmakeArgs: --preset=x64-Release-Clang
- task: CMake@1 - task: CMake@1
displayName: CMake (clang/LLVM; x64-Release) Build displayName: CMake (clang/LLVM; x64-Release) Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Release-Clang -v cmakeArgs: --build out/build/x64-Release-Clang -v

View File

@ -6,60 +6,60 @@
# Builds the library and test suite using MSBuild+VCPKO # Builds the library and test suite using MSBuild+VCPKO
schedules: schedules:
- cron: "0 5 * * *" - cron: "0 5 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: trigger:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/OneFuzz*.json - build/OneFuzz*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
exclude: exclude:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.github/**' - '.github/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/OneFuzz*.json - build/OneFuzz*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
drafts: false drafts: false
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
- repository: vcpkgRepo - repository: vcpkgRepo
name: Microsoft/vcpkg name: Microsoft/vcpkg
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/tags/$(VCPKG_TAG) ref: refs/tags/$(VCPKG_TAG)
- repository: testRepo - repository: testRepo
name: walbourn/directxtextest name: walbourn/directxtextest
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -67,105 +67,105 @@ pool:
vmImage: windows-2022 vmImage: windows-2022
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VCPKG_ROOT - name: VCPKG_ROOT
value: '$(Build.SourcesDirectory)/vcpkg' value: '$(Build.SourcesDirectory)/vcpkg'
- name: VCPKG_CMAKE_DIR - name: VCPKG_CMAKE_DIR
value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake' value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake'
- name: VCPKG_MANIFEST_DIR - name: VCPKG_MANIFEST_DIR
value: '$(Build.SourcesDirectory)/build' value: '$(Build.SourcesDirectory)/build'
jobs: jobs:
- job: VCPKG_BUILD - job: VCPKG_BUILD
displayName: 'Build with MSBuild+VCPKG' displayName: 'Build with MSBuild+VCPKG'
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: vcpkgRepo - checkout: vcpkgRepo
displayName: Fetch VCPKG displayName: Fetch VCPKG
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/vcpkg' path: 's/vcpkg'
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG Bootstrap displayName: VCPKG Bootstrap
inputs: inputs:
script: | script: |
call bootstrap-vcpkg.bat call bootstrap-vcpkg.bat
echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x64-windows echo ##vso[task.setvariable variable=VCPKG_DEFAULT_TRIPLET;]x64-windows
echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x64-windows echo ##vso[task.setvariable variable=VCPKG_DEFAULT_HOST_TRIPLET;]x64-windows
workingDirectory: $(Build.SourcesDirectory)\vcpkg workingDirectory: $(Build.SourcesDirectory)\vcpkg
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG install packages displayName: VCPKG install packages
inputs: inputs:
script: | script: |
call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-windows
call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x86-windows call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x86-windows
call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=arm64-windows call vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=arm64-windows
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: PowerShell@2 - task: PowerShell@2
displayName: Setup VCPKG Directory.Build.props and .target files displayName: Setup VCPKG Directory.Build.props and .target files
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
$props = "<Project>`n <Import Project=`"`$(MSBuildThisFileDirectory)vcpkg\scripts\buildsystems\msbuild\vcpkg.props`" />`n</Project>`n" $props = "<Project>`n <Import Project=`"`$(MSBuildThisFileDirectory)vcpkg\scripts\buildsystems\msbuild\vcpkg.props`" />`n</Project>`n"
$targets = "<Project>`n <Import Project=`"`$(MSBuildThisFileDirectory)vcpkg\scripts\buildsystems\msbuild\vcpkg.targets`" />`n</Project>`n" $targets = "<Project>`n <Import Project=`"`$(MSBuildThisFileDirectory)vcpkg\scripts\buildsystems\msbuild\vcpkg.targets`" />`n</Project>`n"
Set-Content -Path "Directory.Build.props" -Value $props Set-Content -Path "Directory.Build.props" -Value $props
Set-Content -Path "Directory.Build.targets" -Value $targets Set-Content -Path "Directory.Build.targets" -Value $targets
workingDirectory: $(Build.SourcesDirectory) workingDirectory: $(Build.SourcesDirectory)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32dbg displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32dbg
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86 platform: x86
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32rel displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32rel
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86 platform: x86
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64dbg displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64dbg
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64 platform: x64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64rel displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64rel
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64 platform: x64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64 platform: ARM64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64 platform: ARM64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64

View File

@ -6,247 +6,262 @@
# Builds the library for Windows Subsystem for Linux (WSL) # Builds the library for Windows Subsystem for Linux (WSL)
schedules: schedules:
- cron: "0 3 * * *" - cron: "0 3 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-GitHub-WSL-11.yml' - '.azuredevops/pipelines/DirectXTex-GitHub-WSL-11.yml'
- CMake* - CMake*
- build/*.cmake - build/*.cmake
- build/*.in - build/*.in
- Auxiliary/*EXR* - Auxiliary/*EXR*
- Auxiliary/*JPEG* - Auxiliary/*JPEG*
- Auxiliary/*PNG* - Auxiliary/*PNG*
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
trigger: none trigger: none
- repository: dxHeadersRepo - repository: dxHeadersRepo
name: Microsoft/DirectX-Headers name: Microsoft/DirectX-Headers
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
- repository: dxMathRepo - repository: dxMathRepo
name: Microsoft/DirectXMath name: Microsoft/DirectXMath
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
- repository: vcpkgRepo - repository: vcpkgRepo
name: Microsoft/vcpkg name: Microsoft/vcpkg
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/tags/$(VCPKG_TAG) ref: refs/tags/$(VCPKG_TAG)
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
pool: pool:
vmImage: ubuntu-22.04 vmImage: ubuntu-22.04
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VCPKG_ROOT - name: VCPKG_ROOT
value: '$(Build.SourcesDirectory)/vcpkg' value: '$(Build.SourcesDirectory)/vcpkg'
- name: VCPKG_CMAKE_DIR - name: VCPKG_CMAKE_DIR
value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake' value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake'
- name: VCPKG_MANIFEST_DIR - name: VCPKG_MANIFEST_DIR
value: '$(Build.SourcesDirectory)/build' value: '$(Build.SourcesDirectory)/build'
- name: LOCAL_PKG_DIR - name: LOCAL_PKG_DIR
value: '$(Agent.BuildDirectory)/install/' value: '$(Agent.BuildDirectory)/install/'
- name: SAL_URL
value: https://raw.githubusercontent.com/dotnet/runtime/v8.0.1/src/coreclr/pal/inc/rt/sal.h
- name: SAL_HASH
value: 0f5a80b97564217db2ba3e4624cc9eb308e19cc9911dae21d983c4ab37003f4756473297ba81b386c498514cedc1ef5a3553d7002edc09aeb6a1335df973095f
jobs: jobs:
- job: BUILD_WSL - job: BUILD_WSL
displayName: 'Windows Subsystem for Linux (WSL)' displayName: 'Windows Subsystem for Linux (WSL)'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: dxHeadersRepo - checkout: dxHeadersRepo
displayName: Fetch DirectX-Headers displayName: Fetch DirectX-Headers
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/DirectX-Headers' path: 's/DirectX-Headers'
- checkout: dxMathRepo - checkout: dxMathRepo
displayName: Fetch DirectX-Math displayName: Fetch DirectX-Math
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/DirectXMath' path: 's/DirectXMath'
- task: CMake@1 - task: CMake@1
displayName: CMake DirectX-Headers displayName: CMake DirectX-Headers
inputs: inputs:
cwd: DirectX-Headers cwd: DirectX-Headers
cmakeArgs: . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR) cmakeArgs: >
- task: CMake@1 . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF
displayName: CMake DirectX-Headers (Build) -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
inputs: - task: CMake@1
cwd: DirectX-Headers displayName: CMake DirectX-Headers (Build)
cmakeArgs: --build . -v inputs:
- task: CMake@1 cwd: DirectX-Headers
displayName: CMake DirectX-Headers (Install) cmakeArgs: --build . -v
inputs: - task: CMake@1
cwd: DirectX-Headers displayName: CMake DirectX-Headers (Install)
cmakeArgs: --install . inputs:
- task: CMake@1 cwd: DirectX-Headers
displayName: CMake DirectXMath cmakeArgs: --install .
inputs: - task: CMake@1
cwd: DirectXMath displayName: CMake DirectXMath
cmakeArgs: . -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR) inputs:
- task: CMake@1 cwd: DirectXMath
displayName: CMake DirectXMath (Build) cmakeArgs: . -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
inputs: - task: CMake@1
cwd: DirectXMath displayName: CMake DirectXMath (Build)
cmakeArgs: --build . -v inputs:
- task: CMake@1 cwd: DirectXMath
displayName: CMake DirectXMath (Install) cmakeArgs: --build . -v
inputs: - task: CMake@1
cwd: DirectXMath displayName: CMake DirectXMath (Install)
cmakeArgs: --install . inputs:
- task: PowerShell@2 cwd: DirectXMath
displayName: Fetch SAL.H cmakeArgs: --install .
inputs: - task: PowerShell@2
targetType: inline displayName: Fetch SAL.H
script: | inputs:
$ProgressPreference = 'SilentlyContinue' targetType: inline
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -OutFile $(LOCAL_PKG_DIR)/include/sal.h script: |
$fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String $ProgressPreference = 'SilentlyContinue'
$filehash = $fileHash.Trim() Invoke-WebRequest -Uri "$(SAL_URL)" -OutFile $(LOCAL_PKG_DIR)/include/sal.h
Write-Host "##[debug]SHA512: " $filehash $fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String
if ($fileHash -ne "1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0") { $filehash = $fileHash.Trim()
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop Write-Host "##[debug]SHA512: " $filehash
} if ($fileHash -ne "$(SAL_HASH)") {
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
}
- task: CMake@1 - task: CMake@1
displayName: CMake DirectXTex (Config) dbg displayName: CMake DirectXTex (Config) dbg
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake cmakeArgs: >
- task: CMake@1 -B out -DCMAKE_BUILD_TYPE=Debug
displayName: CMake DirectXTex (Build) dbg -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake DirectXTex (Build) dbg
cmakeArgs: --build out -v inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake DirectXTex (Config) rel cmakeArgs: --build out -v
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake DirectXTex (Config) rel
cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake DirectXTex (Build) rel cmakeArgs: >
inputs: -B out2 -DCMAKE_BUILD_TYPE=Release
cwd: $(Build.SourcesDirectory) -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
cmakeArgs: --build out2 -v - task: CMake@1
displayName: CMake DirectXTex (Build) rel
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out2 -v
- job: BUILD_WSL_VCPKG - job: BUILD_WSL_VCPKG
displayName: 'Windows Subsystem for Linux (WSL) using VCPKG' displayName: 'Windows Subsystem for Linux (WSL) using VCPKG'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: vcpkgRepo - checkout: vcpkgRepo
displayName: Fetch VCPKG displayName: Fetch VCPKG
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/vcpkg' path: 's/vcpkg'
- task: Bash@3 - task: Bash@3
displayName: VCPKG Bootstrap displayName: VCPKG Bootstrap
inputs: inputs:
targetType: filePath targetType: filePath
filePath: $(Build.SourcesDirectory)/vcpkg/bootstrap-vcpkg.sh filePath: $(Build.SourcesDirectory)/vcpkg/bootstrap-vcpkg.sh
workingDirectory: $(Build.SourcesDirectory)/vcpkg workingDirectory: $(Build.SourcesDirectory)/vcpkg
- task: CmdLine@2 - task: CmdLine@2
displayName: GCC and CMake version displayName: GCC and CMake version
inputs: inputs:
script: | script: |
g++ --version g++ --version
cmake --version cmake --version
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG install packages displayName: VCPKG install packages
inputs: inputs:
script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-linux script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-linux
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: CMake@1 - task: CMake@1
displayName: CMake DirectXTex (Config) dbg displayName: CMake DirectXTex (Config) dbg
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-B out -DCMAKE_BUILD_TYPE=Debug -DDIRECTX_ARCH=x64 -B out -DCMAKE_BUILD_TYPE=Debug -DDIRECTX_ARCH=x64
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1 -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
displayName: CMake DirectXTex (Build) dbg - task: CMake@1
inputs: displayName: CMake DirectXTex (Build) dbg
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: --build out -v cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: --build out -v
displayName: CMake DirectXTex (Config) rel - task: CMake@1
inputs: displayName: CMake DirectXTex (Config) rel
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: > cwd: $(Build.SourcesDirectory)
-B out2 -DCMAKE_BUILD_TYPE=Release -DDIRECTX_ARCH=x64 cmakeArgs: >
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux -B out2 -DCMAKE_BUILD_TYPE=Release -DDIRECTX_ARCH=x64
- task: CMake@1 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
displayName: CMake DirectXTex (Build) rel -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake DirectXTex (Build) rel
cmakeArgs: --build out2 -v inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake DirectXTex (Config) w/ OpenEXR cmakeArgs: --build out2 -v
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake DirectXTex (Config) w/ OpenEXR
cmakeArgs: > inputs:
-B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 cwd: $(Build.SourcesDirectory)
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux cmakeArgs: >
- task: CMake@1 -B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64
displayName: CMake DirectXTex (Build) w/ OpenEXR -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
inputs: -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: --build out3 -v displayName: CMake DirectXTex (Build) w/ OpenEXR
- task: CMake@1 inputs:
displayName: CMake DirectXTex (Config) w/ libjpeg cwd: $(Build.SourcesDirectory)
inputs: cmakeArgs: --build out3 -v
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: > displayName: CMake DirectXTex (Config) w/ libjpeg
-B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 inputs:
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: >
displayName: CMake DirectXTex (Build) w/ libjpeg -B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64
inputs: -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
cwd: $(Build.SourcesDirectory) -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
cmakeArgs: --build out4 -v - task: CMake@1
- task: CMake@1 displayName: CMake DirectXTex (Build) w/ libjpeg
displayName: CMake DirectXTex (Config) w/ libpng inputs:
inputs: cwd: $(Build.SourcesDirectory)
cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 -v
cmakeArgs: > - task: CMake@1
-B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 displayName: CMake DirectXTex (Config) w/ libpng
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake DirectXTex (Build) w/ libpng cmakeArgs: >
inputs: -B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64
cwd: $(Build.SourcesDirectory) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
cmakeArgs: --build out5 -v -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ libpng
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out5 -v

View File

@ -6,247 +6,262 @@
# Builds the library for Windows Subsystem for Linux (WSL) # Builds the library for Windows Subsystem for Linux (WSL)
schedules: schedules:
- cron: "0 3 * * *" - cron: "0 3 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-GitHub-WSL-13.yml' - '.azuredevops/pipelines/DirectXTex-GitHub-WSL-13.yml'
- CMake* - CMake*
- build/*.cmake - build/*.cmake
- build/*.in - build/*.in
- Auxiliary/*EXR* - Auxiliary/*EXR*
- Auxiliary/*JPEG* - Auxiliary/*JPEG*
- Auxiliary/*PNG* - Auxiliary/*PNG*
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
trigger: none trigger: none
- repository: dxHeadersRepo - repository: dxHeadersRepo
name: Microsoft/DirectX-Headers name: Microsoft/DirectX-Headers
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
- repository: dxMathRepo - repository: dxMathRepo
name: Microsoft/DirectXMath name: Microsoft/DirectXMath
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
- repository: vcpkgRepo - repository: vcpkgRepo
name: Microsoft/vcpkg name: Microsoft/vcpkg
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/tags/$(VCPKG_TAG) ref: refs/tags/$(VCPKG_TAG)
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
pool: pool:
vmImage: ubuntu-24.04 vmImage: ubuntu-24.04
variables: variables:
- group: dxtex-shared-variables - group: dxtex-shared-variables
- name: Codeql.Enabled - name: Codeql.Enabled
value: false value: false
- name: VCPKG_ROOT - name: VCPKG_ROOT
value: '$(Build.SourcesDirectory)/vcpkg' value: '$(Build.SourcesDirectory)/vcpkg'
- name: VCPKG_CMAKE_DIR - name: VCPKG_CMAKE_DIR
value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake' value: '$(Build.SourcesDirectory)/vcpkg/scripts/buildsystems/vcpkg.cmake'
- name: VCPKG_MANIFEST_DIR - name: VCPKG_MANIFEST_DIR
value: '$(Build.SourcesDirectory)/build' value: '$(Build.SourcesDirectory)/build'
- name: LOCAL_PKG_DIR - name: LOCAL_PKG_DIR
value: '$(Agent.BuildDirectory)/install/' value: '$(Agent.BuildDirectory)/install/'
- name: SAL_URL
value: https://raw.githubusercontent.com/dotnet/runtime/v8.0.1/src/coreclr/pal/inc/rt/sal.h
- name: SAL_HASH
value: 0f5a80b97564217db2ba3e4624cc9eb308e19cc9911dae21d983c4ab37003f4756473297ba81b386c498514cedc1ef5a3553d7002edc09aeb6a1335df973095f
jobs: jobs:
- job: BUILD_WSL - job: BUILD_WSL
displayName: 'Windows Subsystem for Linux (WSL)' displayName: 'Windows Subsystem for Linux (WSL)'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: dxHeadersRepo - checkout: dxHeadersRepo
displayName: Fetch DirectX-Headers displayName: Fetch DirectX-Headers
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/DirectX-Headers' path: 's/DirectX-Headers'
- checkout: dxMathRepo - checkout: dxMathRepo
displayName: Fetch DirectX-Math displayName: Fetch DirectX-Math
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/DirectXMath' path: 's/DirectXMath'
- task: CMake@1 - task: CMake@1
displayName: CMake DirectX-Headers displayName: CMake DirectX-Headers
inputs: inputs:
cwd: DirectX-Headers cwd: DirectX-Headers
cmakeArgs: . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR) cmakeArgs: >
- task: CMake@1 . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF
displayName: CMake DirectX-Headers (Build) -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
inputs: - task: CMake@1
cwd: DirectX-Headers displayName: CMake DirectX-Headers (Build)
cmakeArgs: --build . -v inputs:
- task: CMake@1 cwd: DirectX-Headers
displayName: CMake DirectX-Headers (Install) cmakeArgs: --build . -v
inputs: - task: CMake@1
cwd: DirectX-Headers displayName: CMake DirectX-Headers (Install)
cmakeArgs: --install . inputs:
- task: CMake@1 cwd: DirectX-Headers
displayName: CMake DirectXMath cmakeArgs: --install .
inputs: - task: CMake@1
cwd: DirectXMath displayName: CMake DirectXMath
cmakeArgs: . -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR) inputs:
- task: CMake@1 cwd: DirectXMath
displayName: CMake DirectXMath (Build) cmakeArgs: . -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
inputs: - task: CMake@1
cwd: DirectXMath displayName: CMake DirectXMath (Build)
cmakeArgs: --build . -v inputs:
- task: CMake@1 cwd: DirectXMath
displayName: CMake DirectXMath (Install) cmakeArgs: --build . -v
inputs: - task: CMake@1
cwd: DirectXMath displayName: CMake DirectXMath (Install)
cmakeArgs: --install . inputs:
- task: PowerShell@2 cwd: DirectXMath
displayName: Fetch SAL.H cmakeArgs: --install .
inputs: - task: PowerShell@2
targetType: inline displayName: Fetch SAL.H
script: | inputs:
$ProgressPreference = 'SilentlyContinue' targetType: inline
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -OutFile $(LOCAL_PKG_DIR)/include/sal.h script: |
$fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String $ProgressPreference = 'SilentlyContinue'
$filehash = $fileHash.Trim() Invoke-WebRequest -Uri "$(SAL_URL)" -OutFile $(LOCAL_PKG_DIR)/include/sal.h
Write-Host "##[debug]SHA512: " $filehash $fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String
if ($fileHash -ne "1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0") { $filehash = $fileHash.Trim()
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop Write-Host "##[debug]SHA512: " $filehash
} if ($fileHash -ne "$(SAL_HASH)") {
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
}
- task: CMake@1 - task: CMake@1
displayName: CMake DirectXTex (Config) dbg displayName: CMake DirectXTex (Config) dbg
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake cmakeArgs: >
- task: CMake@1 -B out -DCMAKE_BUILD_TYPE=Debug
displayName: CMake DirectXTex (Build) dbg -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake DirectXTex (Build) dbg
cmakeArgs: --build out -v inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake DirectXTex (Config) rel cmakeArgs: --build out -v
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake DirectXTex (Config) rel
cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake DirectXTex (Build) rel cmakeArgs: >
inputs: -B out2 -DCMAKE_BUILD_TYPE=Release
cwd: $(Build.SourcesDirectory) -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
cmakeArgs: --build out2 -v - task: CMake@1
displayName: CMake DirectXTex (Build) rel
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out2 -v
- job: BUILD_WSL_VCPKG - job: BUILD_WSL_VCPKG
displayName: 'Windows Subsystem for Linux (WSL) using VCPKG' displayName: 'Windows Subsystem for Linux (WSL) using VCPKG'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: vcpkgRepo - checkout: vcpkgRepo
displayName: Fetch VCPKG displayName: Fetch VCPKG
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/vcpkg' path: 's/vcpkg'
- task: Bash@3 - task: Bash@3
displayName: VCPKG Bootstrap displayName: VCPKG Bootstrap
inputs: inputs:
targetType: filePath targetType: filePath
filePath: $(Build.SourcesDirectory)/vcpkg/bootstrap-vcpkg.sh filePath: $(Build.SourcesDirectory)/vcpkg/bootstrap-vcpkg.sh
workingDirectory: $(Build.SourcesDirectory)/vcpkg workingDirectory: $(Build.SourcesDirectory)/vcpkg
- task: CmdLine@2 - task: CmdLine@2
displayName: GCC and CMake version displayName: GCC and CMake version
inputs: inputs:
script: | script: |
g++ --version g++ --version
cmake --version cmake --version
- task: CmdLine@2 - task: CmdLine@2
displayName: VCPKG install packages displayName: VCPKG install packages
inputs: inputs:
script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-linux script: vcpkg install --x-manifest-root=$(VCPKG_MANIFEST_DIR) --triplet=x64-linux
workingDirectory: $(VCPKG_ROOT) workingDirectory: $(VCPKG_ROOT)
- task: CMake@1 - task: CMake@1
displayName: CMake DirectXTex (Config) dbg displayName: CMake DirectXTex (Config) dbg
inputs: inputs:
cwd: $(Build.SourcesDirectory) cwd: $(Build.SourcesDirectory)
cmakeArgs: > cmakeArgs: >
-B out -DCMAKE_BUILD_TYPE=Debug -DDIRECTX_ARCH=x64 -B out -DCMAKE_BUILD_TYPE=Debug -DDIRECTX_ARCH=x64
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
- task: CMake@1 -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
displayName: CMake DirectXTex (Build) dbg - task: CMake@1
inputs: displayName: CMake DirectXTex (Build) dbg
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: --build out -v cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: --build out -v
displayName: CMake DirectXTex (Config) rel - task: CMake@1
inputs: displayName: CMake DirectXTex (Config) rel
cwd: $(Build.SourcesDirectory) inputs:
cmakeArgs: > cwd: $(Build.SourcesDirectory)
-B out2 -DCMAKE_BUILD_TYPE=Release -DDIRECTX_ARCH=x64 cmakeArgs: >
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux -B out2 -DCMAKE_BUILD_TYPE=Release -DDIRECTX_ARCH=x64
- task: CMake@1 -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
displayName: CMake DirectXTex (Build) rel -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake DirectXTex (Build) rel
cmakeArgs: --build out2 -v inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake DirectXTex (Config) w/ OpenEXR cmakeArgs: --build out2 -v
inputs: - task: CMake@1
cwd: $(Build.SourcesDirectory) displayName: CMake DirectXTex (Config) w/ OpenEXR
cmakeArgs: > inputs:
-B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 cwd: $(Build.SourcesDirectory)
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux cmakeArgs: >
- task: CMake@1 -B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64
displayName: CMake DirectXTex (Build) w/ OpenEXR -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
inputs: -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: --build out3 -v displayName: CMake DirectXTex (Build) w/ OpenEXR
- task: CMake@1 inputs:
displayName: CMake DirectXTex (Config) w/ libjpeg cwd: $(Build.SourcesDirectory)
inputs: cmakeArgs: --build out3 -v
cwd: $(Build.SourcesDirectory) - task: CMake@1
cmakeArgs: > displayName: CMake DirectXTex (Config) w/ libjpeg
-B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 inputs:
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux cwd: $(Build.SourcesDirectory)
- task: CMake@1 cmakeArgs: >
displayName: CMake DirectXTex (Build) w/ libjpeg -B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64
inputs: -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
cwd: $(Build.SourcesDirectory) -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
cmakeArgs: --build out4 -v - task: CMake@1
- task: CMake@1 displayName: CMake DirectXTex (Build) w/ libjpeg
displayName: CMake DirectXTex (Config) w/ libpng inputs:
inputs: cwd: $(Build.SourcesDirectory)
cwd: $(Build.SourcesDirectory) cmakeArgs: --build out4 -v
cmakeArgs: > - task: CMake@1
-B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 displayName: CMake DirectXTex (Config) w/ libpng
-DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)" -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux inputs:
- task: CMake@1 cwd: $(Build.SourcesDirectory)
displayName: CMake DirectXTex (Build) w/ libpng cmakeArgs: >
inputs: -B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64
cwd: $(Build.SourcesDirectory) -DCMAKE_TOOLCHAIN_FILE="$(VCPKG_CMAKE_DIR)"
cmakeArgs: --build out5 -v -DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ libpng
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: --build out5 -v

View File

@ -6,28 +6,28 @@
# Builds the library for Windows Desktop. # Builds the library for Windows Desktop.
schedules: schedules:
- cron: "5 3 * * *" - cron: "5 3 * * *"
displayName: 'Nightly build' displayName: 'Nightly build'
branches: branches:
include: include:
- main - main
# GitHub Actions handles MSBuild for CI/PR # GitHub Actions handles MSBuild for CI/PR
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-GitHub.yml' - '.azuredevops/pipelines/DirectXTex-GitHub.yml'
- DirectXTex/Shaders/CompileShaders.cmd - DirectXTex/Shaders/CompileShaders.cmd
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -38,60 +38,60 @@ pool:
vmImage: windows-2019 vmImage: windows-2019
jobs: jobs:
- job: DESKTOP_BUILD - job: DESKTOP_BUILD
displayName: 'Windows Desktop' displayName: 'Windows Desktop'
timeoutInMinutes: 120 timeoutInMinutes: 120
cancelTimeoutInMinutes: 1 cancelTimeoutInMinutes: 1
strategy: strategy:
maxParallel: 2 maxParallel: 2
matrix: matrix:
Release_x64: Release_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: false SpectreMitigation: false
Debug_x64: Debug_x64:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: false SpectreMitigation: false
Release_x86: Release_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: false SpectreMitigation: false
Debug_x86: Debug_x86:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: false SpectreMitigation: false
Release_x64_SpectreMitigated: Release_x64_SpectreMitigated:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
Debug_x64_SpectreMitigated: Debug_x64_SpectreMitigated:
BuildPlatform: x64 BuildPlatform: x64
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
Release_x86_SpectreMitigated: Release_x86_SpectreMitigated:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Release BuildConfiguration: Release
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
Debug_x86_SpectreMitigated: Debug_x86_SpectreMitigated:
BuildPlatform: x86 BuildPlatform: x86
BuildConfiguration: Debug BuildConfiguration: Debug
SpectreMitigation: 'Spectre' SpectreMitigation: 'Spectre'
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln displayName: Build solution DirectXTex_Desktop_2019.sln
inputs: inputs:
solution: DirectXTex_Desktop_2019.sln solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=$(SpectreMitigation) msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=$(SpectreMitigation)
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln displayName: Build solution DirectXTex_Desktop_2019_Win10.sln
inputs: inputs:
solution: DirectXTex_Desktop_2019_Win10.sln solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=$(SpectreMitigation) msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=$(SpectreMitigation)
platform: '$(BuildPlatform)' platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)' configuration: '$(BuildConfiguration)'

View File

@ -10,14 +10,14 @@ trigger: none
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
- repository: testRepo - repository: testRepo
name: walbourn/directxtextest name: walbourn/directxtextest
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
pool: pool:
vmImage: windows-latest vmImage: windows-latest
@ -54,39 +54,39 @@ variables:
value: ${{ parameters.commitID }} value: ${{ parameters.commitID }}
jobs: jobs:
- job: prod - job: prod
displayName: Prod Task displayName: Prod Task
workspace: workspace:
clean: all clean: all
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- powershell: | - powershell: |
Write-Host "Job ID: $(job-ID), Build Date: $(build-date), Branch: $(branch)" Write-Host "Job ID: $(job-ID), Build Date: $(build-date), Branch: $(branch)"
$SASUrl = [System.Uri]::new("$(sas-url)") $SASUrl = [System.Uri]::new("$(sas-url)")
azcopy cp $SASUrl.AbsoluteUri ./ --recursive azcopy cp $SASUrl.AbsoluteUri ./ --recursive
$ContainerName = $SASURL.LocalPath.Split("/")[1] $ContainerName = $SASURL.LocalPath.Split("/")[1]
Write-Host "##vso[task.setvariable variable=container-name;]$ContainerName" Write-Host "##vso[task.setvariable variable=container-name;]$ContainerName"
cd $ContainerName cd $ContainerName
$size = ((Get-Item .\$(coverage-file)).length) $size = ((Get-Item .\$(coverage-file)).length)
if ($size -eq 0) { if ($size -eq 0) {
Write-Host "Cobertura coverage XML is empty." Write-Host "Cobertura coverage XML is empty."
exit 1 exit 1
} }
displayName: 'Get code coverage from OneFuzz' displayName: 'Get code coverage from OneFuzz'
- task: PublishCodeCoverageResults@1 - task: PublishCodeCoverageResults@1
inputs: inputs:
codeCoverageTool: 'Cobertura' codeCoverageTool: 'Cobertura'
summaryFileLocation: ./$(container-name)\$(coverage-file) summaryFileLocation: ./$(container-name)\$(coverage-file)
pathToSources: $(Build.SourcesDirectory) pathToSources: $(Build.SourcesDirectory)
displayName: 'Generate coverage report' displayName: 'Generate coverage report'

View File

@ -6,26 +6,26 @@
# Builds the library using CMake and submit for file fuzzing # Builds the library using CMake and submit for file fuzzing
schedules: schedules:
- cron: "0 12 1 * *" - cron: "0 12 1 * *"
displayName: 'Submit for File Fuzzing (Monthly)' displayName: 'Submit for File Fuzzing (Monthly)'
branches: branches:
include: include:
- main - main
always: true always: true
trigger: none trigger: none
pr: none pr: none
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
- repository: testRepo - repository: testRepo
name: walbourn/directxtextest name: walbourn/directxtextest
type: github type: github
endpoint: microsoft endpoint: microsoft
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -38,112 +38,115 @@ pool:
vmImage: windows-2022 vmImage: windows-2022
jobs: jobs:
- job: FUZZ_BUILD - job: FUZZ_BUILD
displayName: 'Build for file fuzzing' displayName: 'Build for file fuzzing'
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's' path: 's'
- checkout: testRepo - checkout: testRepo
displayName: Fetch Tests displayName: Fetch Tests
clean: true clean: true
fetchTags: false fetchTags: false
fetchDepth: 1 fetchDepth: 1
path: 's/Tests' path: 's/Tests'
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config with ASan' displayName: 'CMake (MSVC): Config with ASan'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_FUZZING=ON -DBUILD_TESTING=OFF' cmakeArgs: >
- task: CMake@1 -G "$(VS_GENERATOR)" -A x64 -B out
displayName: 'CMake (MSVC): Build with ASan' -DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF
inputs: -DBUILD_FUZZING=ON -DBUILD_TESTING=OFF
cwd: '$(Build.SourcesDirectory)' - task: CMake@1
cmakeArgs: --build out -v --config RelWithDebInfo displayName: 'CMake (MSVC): Build with ASan'
- task: CopyFiles@2 inputs:
displayName: Copy fuzzer cwd: '$(Build.SourcesDirectory)'
inputs: cmakeArgs: --build out -v --config RelWithDebInfo
Contents: | - task: CopyFiles@2
build\OneFuzzConfig.json displayName: Copy fuzzer
out\bin\RelWithDebInfo\fuzzloaders.exe inputs:
TargetFolder: .drop Contents: |
OverWrite: true build\OneFuzzConfig.json
flattenFolders: true out\bin\RelWithDebInfo\fuzzloaders.exe
- task: CopyFiles@2 TargetFolder: .drop
displayName: Copy symbols OverWrite: true
inputs: flattenFolders: true
Contents: | - task: CopyFiles@2
out\bin\RelWithDebInfo\fuzzloaders.pdb displayName: Copy symbols
TargetFolder: .drop\symbols inputs:
OverWrite: true Contents: |
flattenFolders: true out\bin\RelWithDebInfo\fuzzloaders.pdb
- task: PowerShell@2 TargetFolder: .drop\symbols
displayName: Download seed files OverWrite: true
inputs: flattenFolders: true
targetType: inline - task: PowerShell@2
script: | displayName: Download seed files
$seedfiles = "AlphaEdge.dds", inputs:
"cubea8r8g8b8.dds", targetType: inline
"default_texture_nm.dds", script: |
"dx5_logo.dds", $seedfiles = "AlphaEdge.dds",
"hdrtest.dds", "cubea8r8g8b8.dds",
"normalmap.dds", "default_texture_nm.dds",
"grad4d.hdr", "dx5_logo.dds",
"grad4dunc.hdr", "hdrtest.dds",
"BigTree.hdr", "normalmap.dds",
"CBW8.TGA", "grad4d.hdr",
"ccm8.tga", "grad4dunc.hdr",
"CTC16.TGA", "BigTree.hdr",
"CTC24.TGA", "CBW8.TGA",
"CTC32.TGA", "ccm8.tga",
"UTC16.TGA", "CTC16.TGA",
"UTC24.TGA", "CTC24.TGA",
"UTC32.TGA", "CTC32.TGA",
"UBW8.TGA", "UTC16.TGA",
"ucm8.tga", "UTC24.TGA",
"testimg.ppm", "UTC32.TGA",
"grad4d.pfm", "UBW8.TGA",
"grad4d.phm", "ucm8.tga",
"grad4d_mono.pfm", "testimg.ppm",
"grad4d_mono.phm"; "grad4d.pfm",
"grad4d.phm",
"grad4d_mono.pfm",
"grad4d_mono.phm";
New-Item -ItemType Directory -Force -Path .drop\seeds\ New-Item -ItemType Directory -Force -Path .drop\seeds\
foreach($filename in $seedfiles) foreach($filename in $seedfiles)
{ {
Write-Host "Fetching: $filename" Write-Host "Fetching: $filename"
$url = "https://raw.githubusercontent.com/walbourn/directxtexmedia/main/" + $filename $url = "https://raw.githubusercontent.com/walbourn/directxtexmedia/main/" + $filename
$target = [System.IO.Path]::Combine(".drop\seeds\", $filename) $target = [System.IO.Path]::Combine(".drop\seeds\", $filename)
Invoke-WebRequest -Uri $url -OutFile $target Invoke-WebRequest -Uri $url -OutFile $target
} }
- task: PowerShell@2 - task: PowerShell@2
displayName: Copy OneFuzz setup script displayName: Copy OneFuzz setup script
inputs: inputs:
targetType: 'inline' targetType: 'inline'
script: | script: |
Copy-Item -Path .\build\onefuzz-setup.ps1 -Destination .drop/setup.ps1 Copy-Item -Path .\build\onefuzz-setup.ps1 -Destination .drop/setup.ps1
- task: MSBuild@1 - task: MSBuild@1
displayName: 'Copy ASan binaries' displayName: 'Copy ASan binaries'
inputs: inputs:
solution: build/CopyASAN.targets solution: build/CopyASAN.targets
msbuildArguments: /p:TargetFolder=$(Build.SourcesDirectory)\.drop msbuildArguments: /p:TargetFolder=$(Build.SourcesDirectory)\.drop
msbuildVersion: 17.0 msbuildVersion: 17.0
msbuildArchitecture: x64 msbuildArchitecture: x64
- task: PowerShell@2 - task: PowerShell@2
displayName: List drop files displayName: List drop files
inputs: inputs:
targetType: inline targetType: inline
script: | script: |
Get-ChildItem ".drop" -Recurse | select FullName Get-ChildItem ".drop" -Recurse | select FullName
- task: onefuzz-task@0 - task: onefuzz-task@0
displayName: 'Submit to OneFuzz' displayName: 'Submit to OneFuzz'
inputs: inputs:
onefuzzOSes: 'Windows' onefuzzOSes: 'Windows'
env: env:
onefuzzDropDirectory: $(Build.SourcesDirectory)\.drop onefuzzDropDirectory: $(Build.SourcesDirectory)\.drop
SYSTEM_ACCESSTOKEN: $(System.AccessToken) SYSTEM_ACCESSTOKEN: $(System.AccessToken)

View File

@ -6,28 +6,28 @@
# Runs various SDL recommended tools on the code. # Runs various SDL recommended tools on the code.
schedules: schedules:
- cron: "0 3 * * 0,3,5" - cron: "0 3 * * 0,3,5"
displayName: 'Three times a week' displayName: 'Three times a week'
branches: branches:
include: include:
- main - main
always: true always: true
# GitHub Actions handles CodeQL and PREFAST for CI/PR # GitHub Actions handles CodeQL and PREFAST for CI/PR
trigger: none trigger: none
pr: pr:
branches: branches:
include: include:
- main - main
paths: paths:
include: include:
- '.azuredevops/pipelines/DirectXTex-SDL.yml' - '.azuredevops/pipelines/DirectXTex-SDL.yml'
resources: resources:
repositories: repositories:
- repository: self - repository: self
type: git type: git
ref: refs/heads/main ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r) name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
@ -41,158 +41,161 @@ pool:
vmImage: windows-2022 vmImage: windows-2022
jobs: jobs:
- job: SDL_BUILD - job: SDL_BUILD
displayName: 'Build using required SDL tools' displayName: 'Build using required SDL tools'
workspace: workspace:
clean: all clean: all
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NodeTool@0 - task: NodeTool@0
displayName: 'NPM install' displayName: 'NPM install'
inputs: inputs:
versionSpec: 14.x versionSpec: 14.x
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3 - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
displayName: 'Run Credential Scanner' displayName: 'Run Credential Scanner'
inputs: inputs:
debugMode: false debugMode: false
folderSuppression: false folderSuppression: false
- task: PoliCheck@2 - task: PoliCheck@2
displayName: 'Run PoliCheck' displayName: 'Run PoliCheck'
inputs: inputs:
result: PoliCheck.xml result: PoliCheck.xml
- task: Armory@2 - task: Armory@2
displayName: Run ARMory displayName: Run ARMory
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64' displayName: 'CMake (MSVC): Config x64'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON' cmakeArgs: >
- task: CodeQL3000Init@0 -G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON
inputs: - task: CodeQL3000Init@0
Enabled: true inputs:
- task: VSBuild@1 Enabled: true
displayName: 'Build C++ with CodeQL' - task: VSBuild@1
inputs: displayName: 'Build C++ with CodeQL'
solution: '$(Build.SourcesDirectory)/out/DirectXTex.sln' inputs:
vsVersion: 17.0 solution: '$(Build.SourcesDirectory)/out/DirectXTex.sln'
platform: x64 vsVersion: 17.0
configuration: Release platform: x64
msbuildArchitecture: x64 configuration: Release
- task: CodeQL3000Finalize@0 msbuildArchitecture: x64
condition: always() - task: CodeQL3000Finalize@0
- task: CMake@1 condition: always()
displayName: 'CMake (MSVC): Build x64 Release' - task: CMake@1
inputs: displayName: 'CMake (MSVC): Build x64 Release'
cwd: '$(Build.SourcesDirectory)' inputs:
cmakeArgs: --build out -v --config RelWithDebInfo cwd: '$(Build.SourcesDirectory)'
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4 cmakeArgs: --build out -v --config RelWithDebInfo
displayName: 'Run AntiMalware' - task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4
inputs: displayName: 'Run AntiMalware'
InputType: 'Basic' inputs:
ScanType: 'CustomScan' InputType: 'Basic'
FileDirPath: $(Agent.BuildDirectory) ScanType: 'CustomScan'
EnableSERVICEs: true FileDirPath: $(Agent.BuildDirectory)
SupportLogOnError: false EnableSERVICEs: true
TreatSignatureUpdateFailureAs: 'Warning' SupportLogOnError: false
SignatureFreshness: 'OneDay' TreatSignatureUpdateFailureAs: 'Warning'
TreatStaleSignatureAs: 'Error' SignatureFreshness: 'OneDay'
condition: always() TreatStaleSignatureAs: 'Error'
- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4 condition: always()
displayName: 'Run BinSkim' - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4
inputs: displayName: 'Run BinSkim'
AnalyzeTargetBinskim: '' inputs:
AnalyzeTargetGlob: +:file|out\bin\**\RelWithDebInfo\*.exe AnalyzeTargetBinskim: ''
AnalyzeVerbose: true AnalyzeTargetGlob: +:file|out\bin\**\RelWithDebInfo\*.exe
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2 AnalyzeVerbose: true
displayName: 'Post Analysis' - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
inputs: displayName: 'Post Analysis'
GdnBreakAllTools: true inputs:
GdnBreakPolicy: 'Microsoft' GdnBreakAllTools: true
GdnBreakPolicyMinSev: 'Error' GdnBreakPolicy: 'Microsoft'
- task: ComponentGovernanceComponentDetection@0 GdnBreakPolicyMinSev: 'Error'
displayName: Component Detection - task: ComponentGovernanceComponentDetection@0
displayName: Component Detection
- job: SDL_BUILD_DLL - job: SDL_BUILD_DLL
displayName: 'Build using required SDL tools for DLLs' displayName: 'Build using required SDL tools for DLLs'
workspace: workspace:
clean: all clean: all
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: NodeTool@0 - task: NodeTool@0
displayName: 'NPM install' displayName: 'NPM install'
inputs: inputs:
versionSpec: 14.x versionSpec: 14.x
- task: CMake@1 - task: CMake@1
displayName: 'CMake (MSVC): Config x64' displayName: 'CMake (MSVC): Config x64'
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF' cmakeArgs: >
- task: CMake@1 -G "$(VS_GENERATOR)" -A x64 -B out
displayName: 'CMake (MSVC): Build x64 Release' -DENABLE_SPECTRE_MITIGATION=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF
inputs: - task: CMake@1
cwd: '$(Build.SourcesDirectory)' displayName: 'CMake (MSVC): Build x64 Release'
cmakeArgs: --build out -v --config RelWithDebInfo inputs:
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4 cwd: '$(Build.SourcesDirectory)'
displayName: 'Run AntiMalware' cmakeArgs: --build out -v --config RelWithDebInfo
inputs: - task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4
InputType: 'Basic' displayName: 'Run AntiMalware'
ScanType: 'CustomScan' inputs:
FileDirPath: $(Agent.BuildDirectory) InputType: 'Basic'
EnableSERVICEs: true ScanType: 'CustomScan'
SupportLogOnError: false FileDirPath: $(Agent.BuildDirectory)
TreatSignatureUpdateFailureAs: 'Warning' EnableSERVICEs: true
SignatureFreshness: 'OneDay' SupportLogOnError: false
TreatStaleSignatureAs: 'Error' TreatSignatureUpdateFailureAs: 'Warning'
condition: always() SignatureFreshness: 'OneDay'
- task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4 TreatStaleSignatureAs: 'Error'
displayName: 'Run BinSkim' condition: always()
inputs: - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4
AnalyzeTargetBinskim: '' displayName: 'Run BinSkim'
AnalyzeTargetGlob: +:file|out\bin\**\RelWithDebInfo\*.dll inputs:
AnalyzeVerbose: true AnalyzeTargetBinskim: ''
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2 AnalyzeTargetGlob: +:file|out\bin\**\RelWithDebInfo\*.dll
displayName: 'Post Analysis' AnalyzeVerbose: true
inputs: - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
GdnBreakAllTools: true displayName: 'Post Analysis'
GdnBreakPolicy: 'Microsoft' inputs:
GdnBreakPolicyMinSev: 'Error' GdnBreakAllTools: true
- task: ComponentGovernanceComponentDetection@0 GdnBreakPolicy: 'Microsoft'
displayName: Component Detection GdnBreakPolicyMinSev: 'Error'
- task: ComponentGovernanceComponentDetection@0
displayName: Component Detection
- job: VC_PREFAST - job: VC_PREFAST
displayName: 'Build using /analyze (PREFAST)' displayName: 'Build using /analyze (PREFAST)'
workspace: workspace:
clean: all clean: all
steps: steps:
- checkout: self - checkout: self
clean: true clean: true
fetchTags: false fetchTags: false
- task: CmdLine@2 - task: CmdLine@2
displayName: Setup environment for CMake to use VS displayName: Setup environment for CMake to use VS
inputs: inputs:
script: | script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat" call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath% echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE% echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB% echo ##vso[task.setvariable variable=LIB;]%LIB%
- task: CMake@1 - task: CMake@1
displayName: CMake Config displayName: CMake Config
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug -DENABLE_CODE_ANALYSIS=ON cmakeArgs: --preset=x64-Debug -DENABLE_CODE_ANALYSIS=ON
- task: CMake@1 - task: CMake@1
displayName: CMake Build displayName: CMake Build
inputs: inputs:
cwd: '$(Build.SourcesDirectory)' cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Debug cmakeArgs: --build out/build/x64-Debug

View File

@ -1,7 +1,7 @@
name: approver_count name: approver_count
description: Approver count policy for mscodehub/DirectXTex/DirectXTex repository description: Approver count policy for mscodehub/DirectXTex/DirectXTex repository
resource: repository resource: repository
where: where:
configuration: configuration:
approverCountPolicySettings: approverCountPolicySettings:
isBlocking: true isBlocking: true
@ -15,6 +15,6 @@ configuration:
resetRejectionsOnSourcePush: false resetRejectionsOnSourcePush: false
blockLastPusherVote: true blockLastPusherVote: true
branchNames: branchNames:
- refs/heads/release - refs/heads/release
- refs/heads/main - refs/heads/main
displayName: mscodehub/DirectXTex/DirectXTex Approver Count Policy displayName: mscodehub/DirectXTex/DirectXTex Approver Count Policy

View File

@ -6,115 +6,115 @@
# Template used by GitHub-GDK-* pipelines # Template used by GitHub-GDK-* pipelines
parameters: parameters:
- name: msVersion - name: msVersion
type: string type: string
values: values:
- '16.0' - '16.0'
- '17.0' - '17.0'
- name: vsYear - name: vsYear
type: number type: number
values: values:
- 2019 - 2019
- 2022 - 2022
steps: steps:
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} pcdbg displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} pcdbg
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Desktop.x64 platform: Gaming.Desktop.x64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} pcrel displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} pcrel
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Desktop.x64 platform: Gaming.Desktop.x64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} xbdbg displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} xbdbg
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Xbox.XboxOne.x64 platform: Gaming.Xbox.XboxOne.x64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} xbrel displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} xbrel
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Xbox.XboxOne.x64 platform: Gaming.Xbox.XboxOne.x64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} scardbg displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} scardbg
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Xbox.Scarlett.x64 platform: Gaming.Xbox.Scarlett.x64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} scarrel displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} scarrel
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Xbox.Scarlett.x64 platform: Gaming.Xbox.Scarlett.x64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} dbg displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} dbg
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: x64 platform: x64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} rel displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} rel
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: x64 platform: x64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} scardbg displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} scardbg
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: x64 platform: x64
configuration: Debug_Scarlett configuration: Debug_Scarlett
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} scarrel displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} scarrel
continueOnError: True continueOnError: true
inputs: inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }} vsVersion: ${{ parameters.msVersion }}
platform: x64 platform: x64
configuration: Release_Scarlett configuration: Release_Scarlett
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION) msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)

View File

@ -6,52 +6,52 @@
# Template used by SDK-release and SDK-prerelease pipelines # Template used by SDK-release and SDK-prerelease pipelines
steps: steps:
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32dbg displayName: Build solution DirectXTex_Windows10_2022.sln 32dbg
inputs: inputs:
solution: DirectXTex_Windows10_2022.sln solution: DirectXTex_Windows10_2022.sln
platform: x86 platform: x86
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32rel displayName: Build solution DirectXTex_Windows10_2022.sln 32rel
inputs: inputs:
solution: DirectXTex_Windows10_2022.sln solution: DirectXTex_Windows10_2022.sln
platform: x86 platform: x86
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64dbg displayName: Build solution DirectXTex_Windows10_2022.sln 64dbg
inputs: inputs:
solution: DirectXTex_Windows10_2022.sln solution: DirectXTex_Windows10_2022.sln
platform: x64 platform: x64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64rel displayName: Build solution DirectXTex_Windows10_2022.sln 64rel
inputs: inputs:
solution: DirectXTex_Windows10_2022.sln solution: DirectXTex_Windows10_2022.sln
platform: x64 platform: x64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
# Windows on ARM 32-bit is deprecated. https://learn.microsoft.com/windows/arm/arm32-to-arm64 # Windows on ARM 32-bit is deprecated. https://learn.microsoft.com/windows/arm/arm32-to-arm64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64dbg displayName: Build solution DirectXTex_Windows10_2022.sln arm64dbg
inputs: inputs:
solution: DirectXTex_Windows10_2022.sln solution: DirectXTex_Windows10_2022.sln
platform: ARM64 platform: ARM64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64rel displayName: Build solution DirectXTex_Windows10_2022.sln arm64rel
inputs: inputs:
solution: DirectXTex_Windows10_2022.sln solution: DirectXTex_Windows10_2022.sln
platform: ARM64 platform: ARM64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64

View File

@ -6,84 +6,84 @@
# Template used by SDK-release and SDK-prerelease pipelines # Template used by SDK-release and SDK-prerelease pipelines
steps: steps:
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32dbg displayName: Build solution DirectXTex_Desktop_2019.sln 32dbg
inputs: inputs:
solution: DirectXTex_Desktop_2019.sln solution: DirectXTex_Desktop_2019.sln
platform: x86 platform: x86
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32rel displayName: Build solution DirectXTex_Desktop_2019.sln 32rel
inputs: inputs:
solution: DirectXTex_Desktop_2019.sln solution: DirectXTex_Desktop_2019.sln
platform: x86 platform: x86
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64dbg displayName: Build solution DirectXTex_Desktop_2019.sln 64dbg
inputs: inputs:
solution: DirectXTex_Desktop_2019.sln solution: DirectXTex_Desktop_2019.sln
platform: x64 platform: x64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64rel displayName: Build solution DirectXTex_Desktop_2019.sln 64rel
inputs: inputs:
solution: DirectXTex_Desktop_2019.sln solution: DirectXTex_Desktop_2019.sln
platform: x64 platform: x64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32dbg displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32dbg
inputs: inputs:
solution: DirectXTex_Desktop_2019_Win10.sln solution: DirectXTex_Desktop_2019_Win10.sln
platform: x86 platform: x86
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32rel displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32rel
inputs: inputs:
solution: DirectXTex_Desktop_2019_Win10.sln solution: DirectXTex_Desktop_2019_Win10.sln
platform: x86 platform: x86
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64dbg displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64dbg
inputs: inputs:
solution: DirectXTex_Desktop_2019_Win10.sln solution: DirectXTex_Desktop_2019_Win10.sln
platform: x64 platform: x64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64rel displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64rel
inputs: inputs:
solution: DirectXTex_Desktop_2019_Win10.sln solution: DirectXTex_Desktop_2019_Win10.sln
platform: x64 platform: x64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
# VS 2019 for Win32 on ARM64 is out of support. # VS 2019 for Win32 on ARM64 is out of support.
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
platform: ARM64 platform: ARM64
configuration: Debug configuration: Debug
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1 - task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel
inputs: inputs:
solution: DirectXTex_Desktop_2022_Win10.sln solution: DirectXTex_Desktop_2022_Win10.sln
platform: ARM64 platform: ARM64
configuration: Release configuration: Release
msbuildArchitecture: x64 msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 msbuildArgs: /p:PreferredToolArchitecture=x64

View File

@ -1,5 +1,13 @@
root = true root = true
[*.{yml}]
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = crlf
charset = latin1
[*.{fx,fxh,hlsl,hlsli}] [*.{fx,fxh,hlsl,hlsli}]
indent_size = 4 indent_size = 4
indent_style = space indent_style = space

1
.gitattributes vendored
View File

@ -14,6 +14,7 @@
*.vcxproj eol=crlf *.vcxproj eol=crlf
*.filters eol=crlf *.filters eol=crlf
*.sln eol=crlf *.sln eol=crlf
*.yml eol=crlf
# Explicitly declare resource files as binary # Explicitly declare resource files as binary
*.pdb binary *.pdb binary

View File

@ -0,0 +1,9 @@
{
"Format": "github-actions",
"exclude": [
".git",
"LICENSE",
"Tests",
"Common/d3dx12.h"
]
}

20
.github/linters/.markdown-lint.yml vendored Normal file
View File

@ -0,0 +1,20 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# line-length
MD013: false
# blanks-around-headings
MD022: false
# blanks-around-lists
MD032: false
# no-inline-html
MD033: false
# no-bare-urls
MD034: false
# first-line-heading
MD041: false

View File

@ -0,0 +1,5 @@
# PSScriptAnalyzerSettings.psd1
@{
Severity=@('Error','Warning')
ExcludeRules=@('PSAvoidUsingWriteHost')
}

17
.github/linters/.yaml-lint.yml vendored Normal file
View File

@ -0,0 +1,17 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
ignore-from-file: .gitignore
extends: default
rules:
truthy:
check-keys: false
document-start: disable
line-length:
max: 160
comments:
min-spaces-from-content: 1
new-lines:
type: dos

View File

@ -7,7 +7,7 @@ name: 'CTest (BVTs)'
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -50,84 +50,84 @@ jobs:
arch: [amd64] arch: [amd64]
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Clone test repository - name: Clone test repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
repository: walbourn/directxtextest repository: walbourn/directxtextest
path: Tests path: Tests
ref: main ref: main
- name: 'Install Ninja' - name: 'Install Ninja'
run: choco install ninja run: choco install ninja
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with: with:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
toolset: ${{ matrix.toolver }} toolset: ${{ matrix.toolver }}
- name: 'Set triplet' - name: 'Set triplet'
shell: pwsh shell: pwsh
run: | run: |
if ("${{ matrix.arch }}" -eq "amd64") if ("${{ matrix.arch }}" -eq "amd64")
{ {
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
} }
elseif ("${{ matrix.arch }}" -eq "amd64_x86") elseif ("${{ matrix.arch }}" -eq "amd64_x86")
{ {
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
} }
elseif ("${{ matrix.arch }}" -eq "amd64_arm64") elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
{ {
if ("${{ matrix.build_type }}" -match "^arm64ec") if ("${{ matrix.build_type }}" -match "^arm64ec")
{ {
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
} }
else else
{ {
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
} }
} }
else else
{ {
echo "::error Unknown architecture/build-type triplet mapping" echo "::error Unknown architecture/build-type triplet mapping"
} }
- name: Get vcpkg commit hash - name: Get vcpkg commit hash
shell: pwsh shell: pwsh
run: | run: |
if ($Env:vcpkgRelease) { if ($Env:vcpkgRelease) {
echo "Using vcpkg commit from repo variable..." echo "Using vcpkg commit from repo variable..."
$VCPKG_COMMIT_ID = $Env:vcpkgRelease $VCPKG_COMMIT_ID = $Env:vcpkgRelease
} }
else { else {
echo "Fetching latest vcpkg commit hash..." echo "Fetching latest vcpkg commit hash..."
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value $commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
$VCPKG_COMMIT_ID = $commit $VCPKG_COMMIT_ID = $commit
} }
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
env: env:
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}' vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11 - uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
with: with:
runVcpkgInstall: true runVcpkgInstall: true
vcpkgJsonGlob: '**/build/vcpkg.json' vcpkgJsonGlob: '**/build/vcpkg.json'
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}' vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
- name: 'Configure CMake' - name: 'Configure CMake'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: > run: >
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_BVT=ON cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DBUILD_BVT=ON
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" -DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
- name: 'Build' - name: 'Build'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}
- name: 'Run BVTs' - name: 'Run BVTs'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: ctest --preset=${{ matrix.build_type }} --output-on-failure run: ctest --preset=${{ matrix.build_type }} --output-on-failure

View File

@ -7,7 +7,7 @@ name: "CodeQL"
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -50,29 +50,29 @@ jobs:
packages: read packages: read
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Install Ninja' - name: 'Install Ninja'
run: choco install ninja run: choco install ninja
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
with: with:
languages: c-cpp languages: c-cpp
build-mode: manual build-mode: manual
- name: 'Configure CMake' - name: 'Configure CMake'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=x64-Debug run: cmake --preset=x64-Debug
- name: 'Build' - name: 'Build'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\x64-Debug run: cmake --build out\build\x64-Debug
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16 uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
with: with:
category: "/language:c-cpp" category: "/language:c-cpp"

46
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,46 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
name: Lint
on:
pull_request:
branches: "main"
paths-ignore:
- LICENSE
- build/*.in
permissions: {}
jobs:
analyze:
permissions:
contents: read
packages: read
statuses: write
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Lint Code Base
uses: super-linter/super-linter@12150456a73e248bdc94d0794898f94e23127c88 # v7.4.0
env:
DEFAULT_BRANCH: origin/main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_GITIGNORED_FILES: true
VALIDATE_ALL_CODEBASE: true
VALIDATE_CHECKOV: true
VALIDATE_EDITORCONFIG: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_JSON: true
VALIDATE_MARKDOWN: true
VALIDATE_POWERSHELL: true
VALIDATE_GITLEAKS: true
VALIDATE_YAML: true

View File

@ -7,7 +7,7 @@ name: 'CMake (Windows)'
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -98,47 +98,47 @@ jobs:
arch: amd64_arm64 arch: amd64_arm64
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Install Ninja' - name: 'Install Ninja'
run: choco install ninja run: choco install ninja
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with: with:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
toolset: ${{ matrix.toolver }} toolset: ${{ matrix.toolver }}
- name: 'Configure CMake' - name: 'Configure CMake'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=${{ matrix.build_type }} run: cmake --preset=${{ matrix.build_type }}
- name: 'Build' - name: 'Build'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}
- name: 'Clean up' - name: 'Clean up'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: Remove-Item -Path out -Recurse -Force run: Remove-Item -Path out -Recurse -Force
- if: matrix.arch != 'amd64_arm64' - if: matrix.arch != 'amd64_arm64'
name: 'Configure CMake (Spectre)' name: 'Configure CMake (Spectre)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=${{ matrix.build_type }} -DENABLE_SPECTRE_MITIGATION=ON run: cmake --preset=${{ matrix.build_type }} -DENABLE_SPECTRE_MITIGATION=ON
- if: matrix.arch != 'amd64_arm64' - if: matrix.arch != 'amd64_arm64'
name: 'Build (Spectre)' name: 'Build (Spectre)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}
- if: matrix.arch != 'amd64_arm64' - if: matrix.arch != 'amd64_arm64'
name: 'Clean up' name: 'Clean up'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: Remove-Item -Path out -Recurse -Force run: Remove-Item -Path out -Recurse -Force
- name: 'Configure CMake (DLL)' - name: 'Configure CMake (DLL)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON
- name: 'Build (DLL)' - name: 'Build (DLL)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}

View File

@ -7,7 +7,7 @@ name: MSBuild
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -15,7 +15,7 @@ on:
- '.nuget/*' - '.nuget/*'
- build/* - build/*
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -28,7 +28,7 @@ permissions:
jobs: jobs:
build: build:
runs-on: windows-${{ matrix.vs }} runs-on: windows-2022 # has v142 tools but not v142 spectre libs
strategy: strategy:
fail-fast: false fail-fast: false
@ -37,33 +37,48 @@ jobs:
vs: [2019, 2022] vs: [2019, 2022]
build_type: [Debug, Release] build_type: [Debug, Release]
platform: [x86, x64, ARM64] platform: [x86, x64, ARM64]
exclude:
- vs: 2019
platform: ARM64
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Add MSBuild to PATH - name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0 uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- if: matrix.platform != 'ARM64' - if: matrix.platform != 'ARM64'
name: Build name: Build
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
DirectXTex_Desktop_${{ matrix.vs }}.sln
- name: 'Build (Windows 10)' - name: 'Build (Windows 10)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln
- if: matrix.vs == '2022' - if: matrix.vs == '2022'
name: 'Build (UWP)' name: 'Build (UWP)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Windows10_2022.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
DirectXTex_Windows10_2022.sln
- if: matrix.platform != 'ARM64' - if: matrix.platform != 'ARM64' && matrix.vs != '2019'
name: 'Build (Spectre)' name: 'Build (Spectre)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:SpectreMitigation=Spectre /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
/p:SpectreMitigation=Spectre
DirectXTex_Desktop_${{ matrix.vs }}.sln
- if: matrix.platform != 'ARM64' - if: matrix.platform != 'ARM64' && matrix.vs != '2019'
name: 'Build (Spectre Windows 10)' name: 'Build (Spectre Windows 10)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:SpectreMitigation=Spectre /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
/p:SpectreMitigation=Spectre
DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln

View File

@ -7,7 +7,7 @@ name: Microsoft C++ Code Analysis
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE

View File

@ -7,7 +7,7 @@ name: 'CTest (Windows)'
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -90,95 +90,99 @@ jobs:
arch: amd64_arm64 arch: amd64_arm64
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Clone test repository - name: Clone test repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with: with:
repository: walbourn/directxtextest repository: walbourn/directxtextest
path: Tests path: Tests
ref: main ref: main
- name: 'Install Ninja' - name: 'Install Ninja'
run: choco install ninja run: choco install ninja
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with: with:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
toolset: ${{ matrix.toolver }} toolset: ${{ matrix.toolver }}
- name: 'Set triplet' - name: 'Set triplet'
shell: pwsh shell: pwsh
run: | run: |
if ("${{ matrix.arch }}" -eq "amd64") if ("${{ matrix.arch }}" -eq "amd64")
{ {
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
} }
elseif ("${{ matrix.arch }}" -eq "amd64_x86") elseif ("${{ matrix.arch }}" -eq "amd64_x86")
{ {
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
} }
elseif ("${{ matrix.arch }}" -eq "amd64_arm64") elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
{ {
if ("${{ matrix.build_type }}" -match "^arm64ec") if ("${{ matrix.build_type }}" -match "^arm64ec")
{ {
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
} }
else else
{ {
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
} }
} }
else else
{ {
echo "::error Unknown architecture/build-type triplet mapping" echo "::error Unknown architecture/build-type triplet mapping"
} }
- name: Get vcpkg commit hash - name: Get vcpkg commit hash
shell: pwsh shell: pwsh
run: | run: |
if ($Env:vcpkgRelease) { if ($Env:vcpkgRelease) {
echo "Using vcpkg commit from repo variable..." echo "Using vcpkg commit from repo variable..."
$VCPKG_COMMIT_ID = $Env:vcpkgRelease $VCPKG_COMMIT_ID = $Env:vcpkgRelease
} }
else { else {
echo "Fetching latest vcpkg commit hash..." echo "Fetching latest vcpkg commit hash..."
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value $commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
$VCPKG_COMMIT_ID = $commit $VCPKG_COMMIT_ID = $commit
} }
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
env: env:
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}' vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11 - uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
with: with:
runVcpkgInstall: true runVcpkgInstall: true
vcpkgJsonGlob: '**/build/vcpkg.json' vcpkgJsonGlob: '**/build/vcpkg.json'
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}' vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
- name: 'Configure CMake' - name: 'Configure CMake'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: > run: >
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
- name: 'Build' - name: 'Build'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}
- name: 'Clean up' - name: 'Clean up'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: Remove-Item -Path out -Recurse -Force run: Remove-Item -Path out -Recurse -Force
- name: 'Configure CMake (DLL)' - name: 'Configure CMake (DLL)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: > run: >
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" -DBUILD_SHARED_LIBS=ON -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" -DBUILD_SHARED_LIBS=ON
- name: 'Build (DLL)' - name: 'Build (DLL)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}

View File

@ -7,7 +7,7 @@ name: 'CMake (UWP)'
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -65,32 +65,32 @@ jobs:
arch: amd64_arm64 arch: amd64_arm64
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Install Ninja' - name: 'Install Ninja'
run: choco install ninja run: choco install ninja
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with: with:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
uwp: true uwp: true
- name: 'Configure CMake' - name: 'Configure CMake'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=${{ matrix.build_type }} run: cmake --preset=${{ matrix.build_type }}
- name: 'Build' - name: 'Build'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}
- name: 'Clean up' - name: 'Clean up'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: Remove-Item -Path out -Recurse -Force run: Remove-Item -Path out -Recurse -Force
- name: 'Configure CMake (DLL)' - name: 'Configure CMake (DLL)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON
- name: 'Build (DLL)' - name: 'Build (DLL)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}

View File

@ -7,7 +7,7 @@ name: 'CMake (Windows using VCPKG)'
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -18,7 +18,7 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -43,117 +43,119 @@ jobs:
toolver: ['14.29', '14'] toolver: ['14.29', '14']
build_type: [x64-Debug-VCPKG] build_type: [x64-Debug-VCPKG]
arch: [amd64] arch: [amd64]
shared: [OFF] shared: ['OFF']
include: include:
- toolver: '14' - toolver: '14'
build_type: x64-Debug-Clang-VCPKG build_type: x64-Debug-Clang-VCPKG
arch: amd64 arch: amd64
shared: OFF shared: 'OFF'
- toolver: '14' - toolver: '14'
build_type: x86-Debug-VCPKG build_type: x86-Debug-VCPKG
arch: amd64_x86 arch: amd64_x86
shared: OFF shared: 'OFF'
- toolver: '14' - toolver: '14'
build_type: arm64-Debug-VCPKG build_type: arm64-Debug-VCPKG
arch: amd64_arm64 arch: amd64_arm64
shared: OFF shared: 'OFF'
- toolver: '14' - toolver: '14'
build_type: arm64ec-Debug-VCPKG build_type: arm64ec-Debug-VCPKG
arch: amd64_arm64 arch: amd64_arm64
shared: OFF shared: 'OFF'
- toolver: '14' - toolver: '14'
build_type: x64-Debug-MinGW build_type: x64-Debug-MinGW
arch: amd64 arch: amd64
shared: OFF shared: 'OFF'
- toolver: '14' - toolver: '14'
build_type: x64-Release-MinGW build_type: x64-Release-MinGW
arch: amd64 arch: amd64
shared: OFF shared: 'OFF'
- toolver: '14' - toolver: '14'
build_type: x64-Debug-MinGW build_type: x64-Debug-MinGW
arch: amd64 arch: amd64
shared: ON shared: 'ON'
- toolver: '14' - toolver: '14'
build_type: x64-Release-MinGW build_type: x64-Release-MinGW
arch: amd64 arch: amd64
shared: ON shared: 'ON'
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Install Ninja' - name: 'Install Ninja'
run: choco install ninja run: choco install ninja
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with: with:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
toolset: ${{ matrix.toolver }} toolset: ${{ matrix.toolver }}
- name: 'Set triplet' - name: 'Set triplet'
shell: pwsh shell: pwsh
run: | run: |
if ("${{ matrix.arch }}" -eq "amd64") if ("${{ matrix.arch }}" -eq "amd64")
{ {
if ("${{ matrix.build_type }}" -match "MinGW") if ("${{ matrix.build_type }}" -match "MinGW")
{ {
echo "VCPKG_DEFAULT_TRIPLET=x64-mingw-static" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=x64-mingw-static" >> $env:GITHUB_ENV
} }
else else
{ {
echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=x64-windows" >> $env:GITHUB_ENV
} }
} }
elseif ("${{ matrix.arch }}" -eq "amd64_x86") elseif ("${{ matrix.arch }}" -eq "amd64_x86")
{ {
echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=x86-windows" >> $env:GITHUB_ENV
} }
elseif ("${{ matrix.arch }}" -eq "amd64_arm64") elseif ("${{ matrix.arch }}" -eq "amd64_arm64")
{ {
if ("${{ matrix.build_type }}" -match "^arm64ec") if ("${{ matrix.build_type }}" -match "^arm64ec")
{ {
echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=arm64ec-windows" >> $env:GITHUB_ENV
} }
else else
{ {
echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV echo "VCPKG_DEFAULT_TRIPLET=arm64-windows" >> $env:GITHUB_ENV
} }
} }
else else
{ {
echo "::error Unknown architecture/build-type triplet mapping" echo "::error Unknown architecture/build-type triplet mapping"
} }
- name: Get vcpkg commit hash - name: Get vcpkg commit hash
shell: pwsh shell: pwsh
run: | run: |
if ($Env:vcpkgRelease) { if ($Env:vcpkgRelease) {
echo "Using vcpkg commit from repo variable..." echo "Using vcpkg commit from repo variable..."
$VCPKG_COMMIT_ID = $Env:vcpkgRelease $VCPKG_COMMIT_ID = $Env:vcpkgRelease
} }
else { else {
echo "Fetching latest vcpkg commit hash..." echo "Fetching latest vcpkg commit hash..."
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value $commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
$VCPKG_COMMIT_ID = $commit $VCPKG_COMMIT_ID = $commit
} }
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
env: env:
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}' vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11 - uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
with: with:
runVcpkgInstall: true runVcpkgInstall: true
vcpkgJsonGlob: '**/build/vcpkg.json' vcpkgJsonGlob: '**/build/vcpkg.json'
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}' vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
- name: 'Configure CMake' - name: 'Configure CMake'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: > run: >
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=OFF -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=OFF
-DBUILD_SHARED_LIBS=${{ matrix.shared }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" -DBUILD_SHARED_LIBS=${{ matrix.shared }}
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake"
-DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
- name: 'Build' - name: 'Build'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}

View File

@ -7,7 +7,7 @@ name: 'CMake (WSL)'
on: on:
push: push:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
pull_request: pull_request:
branches: [ "main" ] branches: "main"
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
@ -33,6 +33,9 @@ on:
- build/*.targets - build/*.targets
- build/*.xvd - build/*.xvd
permissions:
contents: read
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -45,63 +48,63 @@ jobs:
gcc: [12, 13, 14] gcc: [12, 13, 14]
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6 - uses: seanmiddleditch/gha-setup-ninja@3b1f8f94a2f8254bd26914c4ab9474d4f0015f67 # v6
- name: Get vcpkg commit hash - name: Get vcpkg commit hash
shell: pwsh shell: pwsh
run: | run: |
if ($Env:vcpkgRelease) { if ($Env:vcpkgRelease) {
echo "Using vcpkg commit from repo variable..." echo "Using vcpkg commit from repo variable..."
$VCPKG_COMMIT_ID = $Env:vcpkgRelease $VCPKG_COMMIT_ID = $Env:vcpkgRelease
} }
else { else {
echo "Fetching latest vcpkg commit hash..." echo "Fetching latest vcpkg commit hash..."
$commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value $commit = (git ls-remote https://github.com/microsoft/vcpkg.git HEAD | Select-String -Pattern '([a-f0-9]{40})').Matches.Value
$VCPKG_COMMIT_ID = $commit $VCPKG_COMMIT_ID = $commit
} }
Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" Write-Host "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID"
echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV echo "VCPKG_COMMIT_ID=$VCPKG_COMMIT_ID" >> $env:GITHUB_ENV
env: env:
vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}' vcpkgRelease: '${{ vars.VCPKG_COMMIT_ID }}'
- uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11 - uses: lukka/run-vcpkg@7d259227a1fb6471a0253dd5ab7419835228f7d7 # v11
with: with:
runVcpkgInstall: true runVcpkgInstall: true
vcpkgJsonGlob: '**/build/vcpkg.json' vcpkgJsonGlob: '**/build/vcpkg.json'
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}' vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
- name: 'Configure CMake' - name: 'Configure CMake'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: > run: >
cmake --preset=${{ matrix.build_type }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON cmake --preset=${{ matrix.build_type }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
-DVCPKG_TARGET_TRIPLET="x64-linux" -DVCPKG_TARGET_TRIPLET="x64-linux"
env: env:
CC: gcc-${{ matrix.gcc }} CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }} CXX: g++-${{ matrix.gcc }}
- name: 'Build' - name: 'Build'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out/build/${{ matrix.build_type }} run: cmake --build out/build/${{ matrix.build_type }}
- name: 'Clean up' - name: 'Clean up'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: rm -rf out run: rm -rf out
- name: 'Configure CMake (-shared)' - name: 'Configure CMake (-shared)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: > run: >
cmake --preset=${{ matrix.build_type }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON cmake --preset=${{ matrix.build_type }} -DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build" -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
-DVCPKG_TARGET_TRIPLET="x64-linux" -DBUILD_SHARED_LIBS=ON -DVCPKG_TARGET_TRIPLET="x64-linux" -DBUILD_SHARED_LIBS=ON
env: env:
CC: gcc-${{ matrix.gcc }} CC: gcc-${{ matrix.gcc }}
CXX: g++-${{ matrix.gcc }} CXX: g++-${{ matrix.gcc }}
- name: 'Build (-shared)' - name: 'Build (-shared)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out/build/${{ matrix.build_type }} run: cmake --build out/build/${{ matrix.build_type }}

View File

@ -153,12 +153,12 @@ namespace
SetLastError(0); SetLastError(0);
} }
#if COMBINED_OPENEXR_VERSION >= 30300 #if COMBINED_OPENEXR_VERSION >= 30300
int64_t read(void *buf, uint64_t sz, uint64_t offset) override int64_t read(void *buf, uint64_t sz, uint64_t offset) override
{ {
return Imf::IStream::read(buf, sz, offset); return Imf::IStream::read(buf, sz, offset);
} }
#endif #endif
private: private:
HANDLE m_hFile; HANDLE m_hFile;
@ -169,7 +169,8 @@ namespace
{ {
public: public:
OutputStream(HANDLE hFile, const char fileName[]) : OutputStream(HANDLE hFile, const char fileName[]) :
OStream(fileName), m_hFile(hFile) {} OStream(fileName), m_hFile(hFile)
{}
OutputStream(const OutputStream&) = delete; OutputStream(const OutputStream&) = delete;
OutputStream& operator = (const OutputStream&) = delete; OutputStream& operator = (const OutputStream&) = delete;
@ -259,11 +260,11 @@ HRESULT DirectX::GetMetadataFromEXRFile(const wchar_t* szFile, TexMetadata& meta
try try
{ {
#ifdef _WIN32 #ifdef _WIN32
Imf::RgbaInputFile file(stream); Imf::RgbaInputFile file(stream);
#else #else
Imf::RgbaInputFile file(fileName.c_str()); Imf::RgbaInputFile file(fileName.c_str());
#endif #endif
const auto dw = file.dataWindow(); const auto dw = file.dataWindow();
@ -293,9 +294,9 @@ HRESULT DirectX::GetMetadataFromEXRFile(const wchar_t* szFile, TexMetadata& meta
#ifdef _WIN32 #ifdef _WIN32
catch (const com_exception& exc) catch (const com_exception& exc)
{ {
#ifdef _DEBUG #ifdef _DEBUG
OutputDebugStringA(exc.what()); OutputDebugStringA(exc.what());
#endif #endif
hr = exc.get_result(); hr = exc.get_result();
} }
#endif #endif
@ -368,11 +369,11 @@ HRESULT DirectX::LoadFromEXRFile(const wchar_t* szFile, TexMetadata* metadata, S
try try
{ {
#ifdef _WIN32 #ifdef _WIN32
Imf::RgbaInputFile file(stream); Imf::RgbaInputFile file(stream);
#else #else
Imf::RgbaInputFile file(fileName.c_str()); Imf::RgbaInputFile file(fileName.c_str());
#endif #endif
const auto dw = file.dataWindow(); const auto dw = file.dataWindow();
@ -403,7 +404,7 @@ HRESULT DirectX::LoadFromEXRFile(const wchar_t* szFile, TexMetadata* metadata, S
} }
hr = image.Initialize2D(DXGI_FORMAT_R16G16B16A16_FLOAT, hr = image.Initialize2D(DXGI_FORMAT_R16G16B16A16_FLOAT,
static_cast<size_t>(width), static_cast<size_t>(height), arraySize, 1u); static_cast<size_t>(width), static_cast<size_t>(height), arraySize, 1u);
if (FAILED(hr)) if (FAILED(hr))
return hr; return hr;
@ -414,9 +415,9 @@ HRESULT DirectX::LoadFromEXRFile(const wchar_t* szFile, TexMetadata* metadata, S
#ifdef _WIN32 #ifdef _WIN32
catch (const com_exception& exc) catch (const com_exception& exc)
{ {
#ifdef _DEBUG #ifdef _DEBUG
OutputDebugStringA(exc.what()); OutputDebugStringA(exc.what());
#endif #endif
hr = exc.get_result(); hr = exc.get_result();
} }
#endif #endif
@ -514,11 +515,11 @@ HRESULT DirectX::SaveToEXRFile(const Image& image, const wchar_t* szFile)
const auto width = static_cast<int>(image.width); const auto width = static_cast<int>(image.width);
const auto height = static_cast<int>(image.height); const auto height = static_cast<int>(image.height);
#ifdef _WIN32 #ifdef _WIN32
Imf::RgbaOutputFile file(stream, Imf::Header(width, height), Imf::WRITE_RGBA); Imf::RgbaOutputFile file(stream, Imf::Header(width, height), Imf::WRITE_RGBA);
#else #else
Imf::RgbaOutputFile file(fileName.c_str(), Imf::Header(width, height), Imf::WRITE_RGBA); Imf::RgbaOutputFile file(fileName.c_str(), Imf::Header(width, height), Imf::WRITE_RGBA);
#endif #endif
if (image.format == DXGI_FORMAT_R16G16B16A16_FLOAT) if (image.format == DXGI_FORMAT_R16G16B16A16_FLOAT)
{ {
@ -586,9 +587,9 @@ HRESULT DirectX::SaveToEXRFile(const Image& image, const wchar_t* szFile)
#ifdef _WIN32 #ifdef _WIN32
catch (const com_exception& exc) catch (const com_exception& exc)
{ {
#ifdef _DEBUG #ifdef _DEBUG
OutputDebugStringA(exc.what()); OutputDebugStringA(exc.what());
#endif #endif
hr = exc.get_result(); hr = exc.get_result();
} }
#endif #endif

View File

@ -338,11 +338,11 @@ HRESULT DirectX::GetMetadataFromJPEGFile(
} }
catch (const std::system_error& ec) catch (const std::system_error& ec)
{ {
#ifdef _WIN32 #ifdef _WIN32
return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value())); return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value()));
#else #else
return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL; return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL;
#endif #endif
} }
catch (const std::exception&) catch (const std::exception&)
{ {
@ -378,11 +378,11 @@ HRESULT DirectX::LoadFromJPEGFile(
catch (const std::system_error& ec) catch (const std::system_error& ec)
{ {
image.Release(); image.Release();
#ifdef _WIN32 #ifdef _WIN32
return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value())); return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value()));
#else #else
return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL; return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL;
#endif #endif
} }
catch (const std::exception&) catch (const std::exception&)
{ {
@ -412,11 +412,11 @@ HRESULT DirectX::SaveToJPEGFile(
} }
catch (const std::system_error& ec) catch (const std::system_error& ec)
{ {
#ifdef _WIN32 #ifdef _WIN32
return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value())); return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value()));
#else #else
return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL; return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL;
#endif #endif
} }
catch (const std::exception&) catch (const std::exception&)
{ {

View File

@ -334,11 +334,11 @@ HRESULT DirectX::GetMetadataFromPNGFile(
} }
catch (const std::system_error& ec) catch (const std::system_error& ec)
{ {
#ifdef _WIN32 #ifdef _WIN32
return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value())); return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value()));
#else #else
return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL; return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL;
#endif #endif
} }
catch (const std::invalid_argument&) catch (const std::invalid_argument&)
{ {
@ -379,11 +379,11 @@ HRESULT DirectX::LoadFromPNGFile(
catch (const std::system_error& ec) catch (const std::system_error& ec)
{ {
image.Release(); image.Release();
#ifdef _WIN32 #ifdef _WIN32
return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value())); return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value()));
#else #else
return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL; return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL;
#endif #endif
} }
catch (const std::invalid_argument&) catch (const std::invalid_argument&)
{ {
@ -417,11 +417,11 @@ HRESULT DirectX::SaveToPNGFile(
} }
catch (const std::system_error& ec) catch (const std::system_error& ec)
{ {
#ifdef _WIN32 #ifdef _WIN32
return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value())); return HRESULT_FROM_WIN32(static_cast<unsigned long>(ec.code().value()));
#else #else
return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL; return (ec.code().value() == ENOENT) ? HRESULT_ERROR_FILE_NOT_FOUND : E_FAIL;
#endif #endif
} }
catch (const std::exception&) catch (const std::exception&)
{ {

View File

@ -62,9 +62,13 @@ namespace Xbox
{ {
public: public:
XboxImage() noexcept XboxImage() noexcept
: dataSize(0), baseAlignment(0), tilemode(c_XboxTileModeInvalid), metadata{}, memory(nullptr) {} : dataSize(0), baseAlignment(0), tilemode(c_XboxTileModeInvalid), metadata{}, memory(nullptr)
{}
XboxImage(XboxImage&& moveFrom) noexcept XboxImage(XboxImage&& moveFrom) noexcept
: dataSize(0), baseAlignment(0), tilemode(c_XboxTileModeInvalid), metadata{}, memory(nullptr) { *this = std::move(moveFrom); } : dataSize(0), baseAlignment(0), tilemode(c_XboxTileModeInvalid), metadata{}, memory(nullptr)
{
*this = std::move(moveFrom);
}
~XboxImage() { Release(); } ~XboxImage() { Release(); }
XboxImage& __cdecl operator= (XboxImage&& moveFrom) noexcept; XboxImage& __cdecl operator= (XboxImage&& moveFrom) noexcept;

View File

@ -251,9 +251,9 @@ Release available for download on [GitHub](https://github.com/microsoft/DirectXT
### June 1, 2020 ### June 1, 2020
* Converted to typed enum bitmask flags (see release notes for details on this potential *breaking change*) * Converted to typed enum bitmask flags (see release notes for details on this potential *breaking change*)
+ **ComputePitch**, **xxxDDSxxx**, **xxxWICxxx**, **FlipRotate**, **Resize**, **Convert**, **GenerateMipMaps**, **GenerateMipMaps3D**, **PremultiplyAlpha**, **Compress**, **ComputeNormalMap**, **CopyRectangle**, **ComputeMSE** * **ComputePitch**, **xxxDDSxxx**, **xxxWICxxx**, **FlipRotate**, **Resize**, **Convert**, **GenerateMipMaps**, **GenerateMipMaps3D**, **PremultiplyAlpha**, **Compress**, **ComputeNormalMap**, **CopyRectangle**, **ComputeMSE**
* ``WIC_FLAGS_DEFAULT_SRGB`` / ``WIC_LOADER_SRGB_DEFAULT`` flag added when loading image via WIC without explicit colorspace metadata * ``WIC_FLAGS_DEFAULT_SRGB`` / ``WIC_LOADER_SRGB_DEFAULT`` flag added when loading image via WIC without explicit colorspace metadata
* WIC loader for ``PNG`` codec now checks ``gAMA`` chunk to determine colorspace if the ``sRGB`` chunk is not found for legacy sRGB detection. * WIC loader for ``PNG`` codec now checks ``gAMA`` chunk to determine colorspace if the ``sRGB`` chunk is not found for legacy sRGB detection.
* Fixed conformance issues when using ``/Zc:preprocessor`` * Fixed conformance issues when using ``/Zc:preprocessor``
* CMake project updates * CMake project updates
@ -564,9 +564,9 @@ Release available for download on [GitHub](https://github.com/microsoft/DirectXT
### June 15, 2013 ### June 15, 2013
* Custom filtering implementation for **Resize** & **GenerateMipMaps(3D)** - Point, Box, Linear, Cubic, and Triangle * Custom filtering implementation for **Resize** & **GenerateMipMaps(3D)** - Point, Box, Linear, Cubic, and Triangle
+ ``TEX_FILTER_TRIANGLE`` finite low-pass triangle filter * ``TEX_FILTER_TRIANGLE`` finite low-pass triangle filter
+ ``TEX_FILTER_WRAP``, ``TEX_FILTER_MIRROR`` texture semantics for custom filtering * ``TEX_FILTER_WRAP``, ``TEX_FILTER_MIRROR`` texture semantics for custom filtering
+ ``TEX_FILTER_BOX`` alias for ``TEX_FILTER_FANT WIC`` * ``TEX_FILTER_BOX`` alias for ``TEX_FILTER_FANT WIC``
* Ordered and error diffusion dithering for non-WIC conversion * Ordered and error diffusion dithering for non-WIC conversion
* sRGB gamma correct custom filtering and conversion * sRGB gamma correct custom filtering and conversion
* ``DDS_FLAGS_EXPAND_LUMINANCE`` - Reader conversion option for L8, L16, and A8L8 legacy DDS files * ``DDS_FLAGS_EXPAND_LUMINANCE`` - Reader conversion option for L8, L16, and A8L8 legacy DDS files

View File

@ -361,7 +361,7 @@ namespace Helpers
if (errorText) if (errorText)
LocalFree(errorText); LocalFree(errorText);
for(wchar_t* ptr = desc; *ptr != 0; ++ptr) for (wchar_t* ptr = desc; *ptr != 0; ++ptr)
{ {
if (*ptr == L'\r' || *ptr == L'\n') if (*ptr == L'\r' || *ptr == L'\n')
{ {

View File

@ -56,7 +56,7 @@ using namespace DirectX;
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
namespace namespace
{ {
#pragma pack(push,1) #pragma pack(push,1)
constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS " constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS "
@ -72,28 +72,28 @@ namespace
uint32_t ABitMask; uint32_t ABitMask;
}; };
#define DDS_FOURCC 0x00000004 // DDPF_FOURCC #define DDS_FOURCC 0x00000004 // DDPF_FOURCC
#define DDS_RGB 0x00000040 // DDPF_RGB #define DDS_RGB 0x00000040 // DDPF_RGB
#define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE #define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE
#define DDS_ALPHA 0x00000002 // DDPF_ALPHA #define DDS_ALPHA 0x00000002 // DDPF_ALPHA
#define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV #define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV
#define DDS_HEADER_FLAGS_VOLUME 0x00800000 // DDSD_DEPTH #define DDS_HEADER_FLAGS_VOLUME 0x00800000 // DDSD_DEPTH
#define DDS_HEIGHT 0x00000002 // DDSD_HEIGHT #define DDS_HEIGHT 0x00000002 // DDSD_HEIGHT
#define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX #define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX
#define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX #define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX
#define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY #define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY
#define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY #define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY
#define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ #define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ
#define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ #define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ
#define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\ #define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\
DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\ DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\
DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ ) DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ )
#define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP #define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP
enum DDS_MISC_FLAGS2 enum DDS_MISC_FLAGS2
{ {
@ -127,7 +127,7 @@ namespace
uint32_t miscFlags2; uint32_t miscFlags2;
}; };
#pragma pack(pop) #pragma pack(pop)
static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch"); static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch");
static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch"); static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch");
@ -144,20 +144,19 @@ namespace
inline HANDLE safe_handle(HANDLE h) noexcept { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; } inline HANDLE safe_handle(HANDLE h) noexcept { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; }
#if defined(_DEBUG) || defined(PROFILE) #if defined(_DEBUG) || defined(PROFILE)
template<UINT TNameLength> template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char(&name)[TNameLength]) noexcept inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char(&name)[TNameLength]) noexcept
{ {
resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name); resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);
} }
#else #else
template<UINT TNameLength> template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_ const char(&)[TNameLength]) noexcept inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_ const char(&)[TNameLength]) noexcept
{ {}
} #endif
#endif
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
HRESULT LoadTextureDataFromMemory( HRESULT LoadTextureDataFromMemory(
_In_reads_(ddsDataSize) const uint8_t* ddsData, _In_reads_(ddsDataSize) const uint8_t* ddsData,
size_t ddsDataSize, size_t ddsDataSize,

View File

@ -51,9 +51,10 @@ namespace DirectX
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec" #pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
#endif #endif
DEFINE_ENUM_FLAG_OPERATORS(DDS_LOADER_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(DDS_LOADER_FLAGS);
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop

View File

@ -84,7 +84,7 @@ using namespace DirectX;
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
namespace namespace
{ {
#pragma pack(push,1) #pragma pack(push,1)
constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS " constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS "
@ -100,28 +100,28 @@ namespace
uint32_t ABitMask; uint32_t ABitMask;
}; };
#define DDS_FOURCC 0x00000004 // DDPF_FOURCC #define DDS_FOURCC 0x00000004 // DDPF_FOURCC
#define DDS_RGB 0x00000040 // DDPF_RGB #define DDS_RGB 0x00000040 // DDPF_RGB
#define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE #define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE
#define DDS_ALPHA 0x00000002 // DDPF_ALPHA #define DDS_ALPHA 0x00000002 // DDPF_ALPHA
#define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV #define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV
#define DDS_HEADER_FLAGS_VOLUME 0x00800000 // DDSD_DEPTH #define DDS_HEADER_FLAGS_VOLUME 0x00800000 // DDSD_DEPTH
#define DDS_HEIGHT 0x00000002 // DDSD_HEIGHT #define DDS_HEIGHT 0x00000002 // DDSD_HEIGHT
#define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX #define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX
#define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX #define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX
#define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY #define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY
#define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY #define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY
#define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ #define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ
#define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ #define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ
#define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\ #define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\
DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\ DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\
DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ ) DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ )
#define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP #define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP
enum DDS_MISC_FLAGS2 enum DDS_MISC_FLAGS2
{ {
@ -155,7 +155,7 @@ namespace
uint32_t miscFlags2; uint32_t miscFlags2;
}; };
#pragma pack(pop) #pragma pack(pop)
static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch"); static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch");
static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch"); static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch");
@ -174,18 +174,17 @@ namespace
inline HANDLE safe_handle(HANDLE h) noexcept { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; } inline HANDLE safe_handle(HANDLE h) noexcept { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; }
#endif #endif
#if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) ) #if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
template<UINT TNameLength> template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D12DeviceChild* resource, _In_z_ const wchar_t(&name)[TNameLength]) noexcept inline void SetDebugObjectName(_In_ ID3D12DeviceChild* resource, _In_z_ const wchar_t(&name)[TNameLength]) noexcept
{ {
resource->SetName(name); resource->SetName(name);
} }
#else #else
template<UINT TNameLength> template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept
{ {}
} #endif
#endif
inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept
{ {

View File

@ -68,9 +68,10 @@ namespace DirectX
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec" #pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
#endif #endif
DEFINE_ENUM_FLAG_OPERATORS(DDS_LOADER_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(DDS_LOADER_FLAGS);
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop

View File

@ -60,7 +60,7 @@ using Microsoft::WRL::ComPtr;
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
namespace namespace
{ {
#pragma pack(push,1) #pragma pack(push,1)
constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS " constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS "
@ -76,27 +76,27 @@ namespace
uint32_t ABitMask; uint32_t ABitMask;
}; };
#define DDS_FOURCC 0x00000004 // DDPF_FOURCC #define DDS_FOURCC 0x00000004 // DDPF_FOURCC
#define DDS_RGB 0x00000040 // DDPF_RGB #define DDS_RGB 0x00000040 // DDPF_RGB
#define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE #define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE
#define DDS_ALPHA 0x00000002 // DDPF_ALPHA #define DDS_ALPHA 0x00000002 // DDPF_ALPHA
#define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV #define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV
#define DDS_BUMPLUMINANCE 0x00040000 // DDPF_BUMPLUMINANCE #define DDS_BUMPLUMINANCE 0x00040000 // DDPF_BUMPLUMINANCE
#define DDS_HEADER_FLAGS_VOLUME 0x00800000 // DDSD_DEPTH #define DDS_HEADER_FLAGS_VOLUME 0x00800000 // DDSD_DEPTH
#define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX #define DDS_CUBEMAP_POSITIVEX 0x00000600 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEX
#define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX #define DDS_CUBEMAP_NEGATIVEX 0x00000a00 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEX
#define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY #define DDS_CUBEMAP_POSITIVEY 0x00001200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEY
#define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY #define DDS_CUBEMAP_NEGATIVEY 0x00002200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEY
#define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ #define DDS_CUBEMAP_POSITIVEZ 0x00004200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_POSITIVEZ
#define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ #define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ
#define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\ #define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\
DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\ DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\
DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ ) DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ )
#define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP #define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP
struct DDS_HEADER struct DDS_HEADER
{ {
@ -116,7 +116,7 @@ namespace
uint32_t reserved2; uint32_t reserved2;
}; };
#pragma pack(pop) #pragma pack(pop)
static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch"); static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch");
static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch"); static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch");

View File

@ -1068,37 +1068,37 @@ const D3DX_BC6H::ModeInfo D3DX_BC6H::ms_aInfo[D3DX_BC6H::c_NumModes] =
const int D3DX_BC6H::ms_aModeToInfo[D3DX_BC6H::c_NumModeInfo] = const int D3DX_BC6H::ms_aModeToInfo[D3DX_BC6H::c_NumModeInfo] =
{ {
0, // Mode 1 - 0x00 0, // Mode 1 - 0x00
1, // Mode 2 - 0x01 1, // Mode 2 - 0x01
2, // Mode 3 - 0x02 2, // Mode 3 - 0x02
10, // Mode 11 - 0x03 10, // Mode 11 - 0x03
-1, // Invalid - 0x04 -1, // Invalid - 0x04
-1, // Invalid - 0x05 -1, // Invalid - 0x05
3, // Mode 4 - 0x06 3, // Mode 4 - 0x06
11, // Mode 12 - 0x07 11, // Mode 12 - 0x07
-1, // Invalid - 0x08 -1, // Invalid - 0x08
-1, // Invalid - 0x09 -1, // Invalid - 0x09
4, // Mode 5 - 0x0a 4, // Mode 5 - 0x0a
12, // Mode 13 - 0x0b 12, // Mode 13 - 0x0b
-1, // Invalid - 0x0c -1, // Invalid - 0x0c
-1, // Invalid - 0x0d -1, // Invalid - 0x0d
5, // Mode 6 - 0x0e 5, // Mode 6 - 0x0e
13, // Mode 14 - 0x0f 13, // Mode 14 - 0x0f
-1, // Invalid - 0x10 -1, // Invalid - 0x10
-1, // Invalid - 0x11 -1, // Invalid - 0x11
6, // Mode 7 - 0x12 6, // Mode 7 - 0x12
-1, // Reserved - 0x13 -1, // Reserved - 0x13
-1, // Invalid - 0x14 -1, // Invalid - 0x14
-1, // Invalid - 0x15 -1, // Invalid - 0x15
7, // Mode 8 - 0x16 7, // Mode 8 - 0x16
-1, // Reserved - 0x17 -1, // Reserved - 0x17
-1, // Invalid - 0x18 -1, // Invalid - 0x18
-1, // Invalid - 0x19 -1, // Invalid - 0x19
8, // Mode 9 - 0x1a 8, // Mode 9 - 0x1a
-1, // Reserved - 0x1b -1, // Reserved - 0x1b
-1, // Invalid - 0x1c -1, // Invalid - 0x1c
-1, // Invalid - 0x1d -1, // Invalid - 0x1d
9, // Mode 10 - 0x1e 9, // Mode 10 - 0x1e
-1, // Resreved - 0x1f -1, // Resreved - 0x1f
}; };
@ -2693,14 +2693,14 @@ void D3DX_BC7::Decode(HDRColorA* pOut) const noexcept
for (i = 0; i < uNumEndPts; i++) for (i = 0; i < uNumEndPts; i++)
{ {
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow" #pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif #endif
c[i] = Unquantize(c[i], RGBAPrecWithP); c[i] = Unquantize(c[i], RGBAPrecWithP);
#ifdef __GNUC_ #ifdef __GNUC_
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
} }
uint8_t w1[NUM_PIXELS_PER_BLOCK], w2[NUM_PIXELS_PER_BLOCK]; uint8_t w1[NUM_PIXELS_PER_BLOCK], w2[NUM_PIXELS_PER_BLOCK];
@ -3421,15 +3421,15 @@ float D3DX_BC7::Refine(const EncodeParams* pEP, size_t uShape, size_t uRotation,
for (size_t p = 0; p <= uPartitions; p++) for (size_t p = 0; p <= uPartitions; p++)
{ {
#ifdef __GNUC__ #ifdef __GNUC__
#pragma GCC diagnostic push #pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow" #pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif #endif
aOrgEndPts[p].A = Quantize(aEndPts[p].A, ms_aInfo[pEP->uMode].RGBAPrecWithP); aOrgEndPts[p].A = Quantize(aEndPts[p].A, ms_aInfo[pEP->uMode].RGBAPrecWithP);
aOrgEndPts[p].B = Quantize(aEndPts[p].B, ms_aInfo[pEP->uMode].RGBAPrecWithP); aOrgEndPts[p].B = Quantize(aEndPts[p].B, ms_aInfo[pEP->uMode].RGBAPrecWithP);
#ifdef __GNUC_ #ifdef __GNUC_
#pragma GCC diagnostic pop #pragma GCC diagnostic pop
#endif #endif
} }
LDREndPntPair newEndPts1[BC7_MAX_REGIONS]; LDREndPntPair newEndPts1[BC7_MAX_REGIONS];

View File

@ -22,24 +22,24 @@ namespace
{ {
namespace cs5 namespace cs5
{ {
#include "BC7Encode_EncodeBlockCS.inc" #include "BC7Encode_EncodeBlockCS.inc"
#include "BC7Encode_TryMode02CS.inc" #include "BC7Encode_TryMode02CS.inc"
#include "BC7Encode_TryMode137CS.inc" #include "BC7Encode_TryMode137CS.inc"
#include "BC7Encode_TryMode456CS.inc" #include "BC7Encode_TryMode456CS.inc"
#include "BC6HEncode_EncodeBlockCS.inc" #include "BC6HEncode_EncodeBlockCS.inc"
#include "BC6HEncode_TryModeG10CS.inc" #include "BC6HEncode_TryModeG10CS.inc"
#include "BC6HEncode_TryModeLE10CS.inc" #include "BC6HEncode_TryModeLE10CS.inc"
} }
namespace cs4 namespace cs4
{ {
#include "BC7Encode_EncodeBlockCS_cs40.inc" #include "BC7Encode_EncodeBlockCS_cs40.inc"
#include "BC7Encode_TryMode02CS_cs40.inc" #include "BC7Encode_TryMode02CS_cs40.inc"
#include "BC7Encode_TryMode137CS_cs40.inc" #include "BC7Encode_TryMode137CS_cs40.inc"
#include "BC7Encode_TryMode456CS_cs40.inc" #include "BC7Encode_TryMode456CS_cs40.inc"
#include "BC6HEncode_EncodeBlockCS_cs40.inc" #include "BC6HEncode_EncodeBlockCS_cs40.inc"
#include "BC6HEncode_TryModeG10CS_cs40.inc" #include "BC6HEncode_TryModeG10CS_cs40.inc"
#include "BC6HEncode_TryModeLE10CS_cs40.inc" #include "BC6HEncode_TryModeLE10CS_cs40.inc"
} }
struct BufferBC6HBC7 struct BufferBC6HBC7
@ -101,8 +101,7 @@ GPUCompressBC::GPUCompressBC() noexcept :
m_bc7_mode137(false), m_bc7_mode137(false),
m_width(0), m_width(0),
m_height(0) m_height(0)
{ {}
}
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------

View File

@ -221,8 +221,8 @@ namespace DirectX
#define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ #define DDS_CUBEMAP_NEGATIVEZ 0x00008200 // DDSCAPS2_CUBEMAP | DDSCAPS2_CUBEMAP_NEGATIVEZ
#define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\ #define DDS_CUBEMAP_ALLFACES ( DDS_CUBEMAP_POSITIVEX | DDS_CUBEMAP_NEGATIVEX |\
DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\ DDS_CUBEMAP_POSITIVEY | DDS_CUBEMAP_NEGATIVEY |\
DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ ) DDS_CUBEMAP_POSITIVEZ | DDS_CUBEMAP_NEGATIVEZ )
#define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP #define DDS_CUBEMAP 0x00000200 // DDSCAPS2_CUBEMAP

View File

@ -441,9 +441,13 @@ namespace DirectX
{ {
public: public:
ScratchImage() noexcept ScratchImage() noexcept
: m_nimages(0), m_size(0), m_metadata{}, m_image(nullptr), m_memory(nullptr) {} : m_nimages(0), m_size(0), m_metadata{}, m_image(nullptr), m_memory(nullptr)
{}
ScratchImage(ScratchImage&& moveFrom) noexcept ScratchImage(ScratchImage&& moveFrom) noexcept
: m_nimages(0), m_size(0), m_metadata{}, m_image(nullptr), m_memory(nullptr) { *this = std::move(moveFrom); } : m_nimages(0), m_size(0), m_metadata{}, m_image(nullptr), m_memory(nullptr)
{
*this = std::move(moveFrom);
}
~ScratchImage() { Release(); } ~ScratchImage() { Release(); }
ScratchImage& __cdecl operator= (ScratchImage&& moveFrom) noexcept; ScratchImage& __cdecl operator= (ScratchImage&& moveFrom) noexcept;
@ -537,8 +541,7 @@ namespace DirectX
width(tile.WidthInTexels), width(tile.WidthInTexels),
height(tile.HeightInTexels), height(tile.HeightInTexels),
depth(tile.DepthInTexels) depth(tile.DepthInTexels)
{ {}
}
void GetTileShape11(D3D11_TILE_SHAPE& tile) const void GetTileShape11(D3D11_TILE_SHAPE& tile) const
{ {
@ -553,8 +556,7 @@ namespace DirectX
width(tile.WidthInTexels), width(tile.WidthInTexels),
height(tile.HeightInTexels), height(tile.HeightInTexels),
depth(tile.DepthInTexels) depth(tile.DepthInTexels)
{ {}
}
void GetTileShape12(D3D12_TILE_SHAPE& tile) const void GetTileShape12(D3D12_TILE_SHAPE& tile) const
{ {

View File

@ -14,17 +14,27 @@
//===================================================================================== //=====================================================================================
// Bitmask flags enumerator operators // Bitmask flags enumerator operators
//===================================================================================== //=====================================================================================
DEFINE_ENUM_FLAG_OPERATORS(CP_FLAGS) #ifdef __clang__
DEFINE_ENUM_FLAG_OPERATORS(DDS_FLAGS) #pragma clang diagnostic push
DEFINE_ENUM_FLAG_OPERATORS(TGA_FLAGS) #pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
DEFINE_ENUM_FLAG_OPERATORS(WIC_FLAGS) #pragma clang diagnostic ignored "-Wextra-semi-stmt"
DEFINE_ENUM_FLAG_OPERATORS(TEX_FR_FLAGS) #endif
DEFINE_ENUM_FLAG_OPERATORS(TEX_FILTER_FLAGS)
DEFINE_ENUM_FLAG_OPERATORS(TEX_PMALPHA_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(CP_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(TEX_COMPRESS_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(DDS_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(CNMAP_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(TGA_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(CMSE_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(WIC_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(CREATETEX_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(TEX_FR_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(TEX_FILTER_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(TEX_PMALPHA_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(TEX_COMPRESS_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(CNMAP_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(CMSE_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(CREATETEX_FLAGS);
#ifdef __clang__
#pragma clang diagnostic pop
#endif
// WIC_FILTER modes match TEX_FILTER modes // WIC_FILTER modes match TEX_FILTER modes
constexpr WIC_FLAGS operator|(WIC_FLAGS a, TEX_FILTER_FLAGS b) { return static_cast<WIC_FLAGS>(static_cast<uint32_t>(a) | static_cast<uint32_t>(b & TEX_FILTER_MODE_MASK)); } constexpr WIC_FLAGS operator|(WIC_FLAGS a, TEX_FILTER_FLAGS b) { return static_cast<WIC_FLAGS>(static_cast<uint32_t>(a) | static_cast<uint32_t>(b & TEX_FILTER_MODE_MASK)); }

View File

@ -254,10 +254,10 @@ namespace
const size_t progressTotal = std::max<size_t>(1, (image.height + 3) / 4); const size_t progressTotal = std::max<size_t>(1, (image.height + 3) / 4);
#pragma omp parallel for shared(progress) #pragma omp parallel for shared(progress)
for (int nb = 0; nb < static_cast<int>(nBlocks); ++nb) for (int nb = 0; nb < static_cast<int>(nBlocks); ++nb)
{ {
#pragma omp flush (abort) #pragma omp flush (abort)
if (abort) if (abort)
{ {
// Short circuit the loop body if an abort is requested. // Short circuit the loop body if an abort is requested.
@ -350,13 +350,13 @@ namespace
// Report progress when a new row is reached. // Report progress when a new row is reached.
if (x == 0 && statusCallback) if (x == 0 && statusCallback)
{ {
#pragma omp atomic #pragma omp atomic
progress += 4; progress += 4;
if (!statusCallback(progress, progressTotal)) if (!statusCallback(progress, progressTotal))
{ {
abort = true; abort = true;
#pragma omp flush (abort) #pragma omp flush (abort)
} }
} }
} }

View File

@ -2100,11 +2100,11 @@ bool DirectX::Internal::StoreScanline(
{ {
if (sPtr >= ePtr) break; if (sPtr >= ePtr) break;
XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>(*sPtr++); XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>(*sPtr++);
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
v = XMVectorMultiplyAdd(v, s_Scale, g_XMOneHalf); v = XMVectorMultiplyAdd(v, s_Scale, g_XMOneHalf);
#else #else
v = XMVectorMultiply(v, s_Scale); v = XMVectorMultiply(v, s_Scale);
#endif #endif
XMStoreU565(dPtr++, v); XMStoreU565(dPtr++, v);
} }
return true; return true;
@ -2115,19 +2115,19 @@ bool DirectX::Internal::StoreScanline(
if (size >= sizeof(XMU555)) if (size >= sizeof(XMU555))
{ {
static const XMVECTORF32 s_Scale = { { { 31.f, 31.f, 31.f, 1.f } } }; static const XMVECTORF32 s_Scale = { { { 31.f, 31.f, 31.f, 1.f } } };
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
static const XMVECTORF32 s_OneHalfXYZ = { { { 0.5f, 0.5f, 0.5f, 0.f } } }; static const XMVECTORF32 s_OneHalfXYZ = { { { 0.5f, 0.5f, 0.5f, 0.f } } };
#endif #endif
XMU555 * __restrict dPtr = static_cast<XMU555*>(pDestination); XMU555 * __restrict dPtr = static_cast<XMU555*>(pDestination);
for (size_t icount = 0; icount < (size - sizeof(XMU555) + 1); icount += sizeof(XMU555)) for (size_t icount = 0; icount < (size - sizeof(XMU555) + 1); icount += sizeof(XMU555))
{ {
if (sPtr >= ePtr) break; if (sPtr >= ePtr) break;
XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>(*sPtr++); XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>(*sPtr++);
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
v = XMVectorMultiplyAdd(v, s_Scale, s_OneHalfXYZ); v = XMVectorMultiplyAdd(v, s_Scale, s_OneHalfXYZ);
#else #else
v = XMVectorMultiply(v, s_Scale); v = XMVectorMultiply(v, s_Scale);
#endif #endif
XMStoreU555(dPtr, v); XMStoreU555(dPtr, v);
dPtr->w = (XMVectorGetW(v) > threshold) ? 1u : 0u; dPtr->w = (XMVectorGetW(v) > threshold) ? 1u : 0u;
++dPtr; ++dPtr;
@ -2403,11 +2403,11 @@ bool DirectX::Internal::StoreScanline(
{ {
if (sPtr >= ePtr) break; if (sPtr >= ePtr) break;
XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>(*sPtr++); XMVECTOR v = XMVectorSwizzle<2, 1, 0, 3>(*sPtr++);
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
v = XMVectorMultiplyAdd(v, s_Scale, g_XMOneHalf); v = XMVectorMultiplyAdd(v, s_Scale, g_XMOneHalf);
#else #else
v = XMVectorMultiply(v, s_Scale); v = XMVectorMultiply(v, s_Scale);
#endif #endif
XMStoreUNibble4(dPtr++, v); XMStoreUNibble4(dPtr++, v);
} }
return true; return true;
@ -2423,11 +2423,11 @@ bool DirectX::Internal::StoreScanline(
{ {
if (sPtr >= ePtr) break; if (sPtr >= ePtr) break;
XMVECTOR v = XMVectorSwizzle<3, 2, 1, 0>(*sPtr++); XMVECTOR v = XMVectorSwizzle<3, 2, 1, 0>(*sPtr++);
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
v = XMVectorMultiplyAdd(v, s_Scale, g_XMOneHalf); v = XMVectorMultiplyAdd(v, s_Scale, g_XMOneHalf);
#else #else
v = XMVectorMultiply(v, s_Scale); v = XMVectorMultiply(v, s_Scale);
#endif #endif
XMStoreUNibble4(dPtr++, v); XMStoreUNibble4(dPtr++, v);
} }
return true; return true;
@ -2503,11 +2503,11 @@ bool DirectX::Internal::StoreScanline(
for (size_t icount = 0; icount < (size - sizeof(uint8_t) + 1); icount += sizeof(uint8_t)) for (size_t icount = 0; icount < (size - sizeof(uint8_t) + 1); icount += sizeof(uint8_t))
{ {
if (sPtr >= ePtr) break; if (sPtr >= ePtr) break;
#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__ #if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) || defined(_M_ARM64EC) || __arm__ || __aarch64__
const XMVECTOR v = XMVectorMultiplyAdd(*sPtr++, s_Scale, g_XMOneHalf); const XMVECTOR v = XMVectorMultiplyAdd(*sPtr++, s_Scale, g_XMOneHalf);
#else #else
const XMVECTOR v = XMVectorMultiply(*sPtr++, s_Scale); const XMVECTOR v = XMVectorMultiply(*sPtr++, s_Scale);
#endif #endif
XMUNIBBLE4 nibble; XMUNIBBLE4 nibble;
XMStoreUNibble4(&nibble, v); XMStoreUNibble4(&nibble, v);
*dPtr = static_cast<uint8_t>(nibble.v); *dPtr = static_cast<uint8_t>(nibble.v);
@ -4833,7 +4833,7 @@ namespace
{ {
if (!statusCallback(h, srcImage.height)) if (!statusCallback(h, srcImage.height))
{ {
return E_ABORT; return E_ABORT;
} }
} }

View File

@ -60,111 +60,109 @@ namespace
const LegacyDDS g_LegacyDDSMap[] = const LegacyDDS g_LegacyDDSMap[] =
{ {
{ DXGI_FORMAT_BC1_UNORM, CONV_FLAGS_NONE, DDSPF_DXT1 }, // D3DFMT_DXT1 { DXGI_FORMAT_BC1_UNORM, CONV_FLAGS_NONE, DDSPF_DXT1 }, // D3DFMT_DXT1
{ DXGI_FORMAT_BC2_UNORM, CONV_FLAGS_NONE, DDSPF_DXT3 }, // D3DFMT_DXT3 { DXGI_FORMAT_BC2_UNORM, CONV_FLAGS_NONE, DDSPF_DXT3 }, // D3DFMT_DXT3
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, DDSPF_DXT5 }, // D3DFMT_DXT5 { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, DDSPF_DXT5 }, // D3DFMT_DXT5
{ DXGI_FORMAT_BC2_UNORM, CONV_FLAGS_PMALPHA, DDSPF_DXT2 }, // D3DFMT_DXT2 { DXGI_FORMAT_BC2_UNORM, CONV_FLAGS_PMALPHA, DDSPF_DXT2 }, // D3DFMT_DXT2
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_PMALPHA, DDSPF_DXT4 }, // D3DFMT_DXT4 { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_PMALPHA, DDSPF_DXT4 }, // D3DFMT_DXT4
// These DXT5 variants have various swizzled channels. They are returned 'as is' to the client as BC3. // These DXT5 variants have various swizzled channels. They are returned 'as is' to the client as BC3.
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('A', '2', 'D', '5'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('A', '2', 'D', '5'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('x', 'G', 'B', 'R'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('x', 'G', 'B', 'R'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R', 'x', 'B', 'G'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R', 'x', 'B', 'G'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R', 'B', 'x', 'G'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R', 'B', 'x', 'G'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('x', 'R', 'B', 'G'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('x', 'R', 'B', 'G'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R', 'G', 'x', 'B'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R', 'G', 'x', 'B'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('x', 'G', 'x', 'R'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('x', 'G', 'x', 'R'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('G', 'X', 'R', 'B'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('G', 'X', 'R', 'B'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('G', 'R', 'X', 'B'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('G', 'R', 'X', 'B'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R', 'X', 'G', 'B'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('R', 'X', 'G', 'B'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B', 'R', 'G', 'X'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC3_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B', 'R', 'G', 'X'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC4_UNORM, CONV_FLAGS_NONE, DDSPF_BC4_UNORM }, { DXGI_FORMAT_BC4_UNORM, CONV_FLAGS_NONE, DDSPF_BC4_UNORM },
{ DXGI_FORMAT_BC4_SNORM, CONV_FLAGS_NONE, DDSPF_BC4_SNORM }, { DXGI_FORMAT_BC4_SNORM, CONV_FLAGS_NONE, DDSPF_BC4_SNORM },
{ DXGI_FORMAT_BC5_UNORM, CONV_FLAGS_NONE, DDSPF_BC5_UNORM }, { DXGI_FORMAT_BC5_UNORM, CONV_FLAGS_NONE, DDSPF_BC5_UNORM },
{ DXGI_FORMAT_BC5_SNORM, CONV_FLAGS_NONE, DDSPF_BC5_SNORM }, { DXGI_FORMAT_BC5_SNORM, CONV_FLAGS_NONE, DDSPF_BC5_SNORM },
{ DXGI_FORMAT_BC4_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('A', 'T', 'I', '1'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC4_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('A', 'T', 'I', '1'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC5_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('A', 'T', 'I', '2'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC5_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('A', 'T', 'I', '2'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC5_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('A', '2', 'X', 'Y'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC5_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('A', '2', 'X', 'Y'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC6H_UF16, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B', 'C', '6', 'H'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC6H_UF16, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B', 'C', '6', 'H'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC7_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B', 'C', '7', 'L'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC7_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B', 'C', '7', 'L'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_BC7_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B', 'C', '7', '\0'), 0, 0, 0, 0, 0 } }, { DXGI_FORMAT_BC7_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, MAKEFOURCC('B', 'C', '7', '\0'), 0, 0, 0, 0, 0 } },
{ DXGI_FORMAT_R8G8_B8G8_UNORM, CONV_FLAGS_NONE, DDSPF_R8G8_B8G8 }, // D3DFMT_R8G8_B8G8 { DXGI_FORMAT_R8G8_B8G8_UNORM, CONV_FLAGS_NONE, DDSPF_R8G8_B8G8 }, // D3DFMT_R8G8_B8G8
{ DXGI_FORMAT_G8R8_G8B8_UNORM, CONV_FLAGS_NONE, DDSPF_G8R8_G8B8 }, // D3DFMT_G8R8_G8B8 { DXGI_FORMAT_G8R8_G8B8_UNORM, CONV_FLAGS_NONE, DDSPF_G8R8_G8B8 }, // D3DFMT_G8R8_G8B8
{ DXGI_FORMAT_B8G8R8A8_UNORM, CONV_FLAGS_NONE, DDSPF_A8R8G8B8 }, // D3DFMT_A8R8G8B8 (uses DXGI 1.1 format) { DXGI_FORMAT_B8G8R8A8_UNORM, CONV_FLAGS_NONE, DDSPF_A8R8G8B8 }, // D3DFMT_A8R8G8B8 (uses DXGI 1.1 format)
{ DXGI_FORMAT_B8G8R8X8_UNORM, CONV_FLAGS_NONE, DDSPF_X8R8G8B8 }, // D3DFMT_X8R8G8B8 (uses DXGI 1.1 format) { DXGI_FORMAT_B8G8R8X8_UNORM, CONV_FLAGS_NONE, DDSPF_X8R8G8B8 }, // D3DFMT_X8R8G8B8 (uses DXGI 1.1 format)
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_NONE, DDSPF_A8B8G8R8 }, // D3DFMT_A8B8G8R8 { DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_NONE, DDSPF_A8B8G8R8 }, // D3DFMT_A8B8G8R8
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_NOALPHA, DDSPF_X8B8G8R8 }, // D3DFMT_X8B8G8R8 { DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_NOALPHA, DDSPF_X8B8G8R8 }, // D3DFMT_X8B8G8R8
{ DXGI_FORMAT_R16G16_UNORM, CONV_FLAGS_NONE, DDSPF_G16R16 }, // D3DFMT_G16R16 { DXGI_FORMAT_R16G16_UNORM, CONV_FLAGS_NONE, DDSPF_G16R16 }, // D3DFMT_G16R16
{ DXGI_FORMAT_R10G10B10A2_UNORM, CONV_FLAGS_SWIZZLE, DDSPF_A2R10G10B10 }, // D3DFMT_A2R10G10B10 (D3DX reversal issue) { DXGI_FORMAT_R10G10B10A2_UNORM, CONV_FLAGS_SWIZZLE, DDSPF_A2R10G10B10 }, // D3DFMT_A2R10G10B10 (D3DX reversal issue)
{ DXGI_FORMAT_R10G10B10A2_UNORM, CONV_FLAGS_NONE, DDSPF_A2B10G10R10 }, // D3DFMT_A2B10G10R10 (D3DX reversal issue) { DXGI_FORMAT_R10G10B10A2_UNORM, CONV_FLAGS_NONE, DDSPF_A2B10G10R10 }, // D3DFMT_A2B10G10R10 (D3DX reversal issue)
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND { DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_NOALPHA | CONV_FLAGS_888,
| CONV_FLAGS_NOALPHA DDSPF_R8G8B8 }, // D3DFMT_R8G8B8
| CONV_FLAGS_888, DDSPF_R8G8B8 }, // D3DFMT_R8G8B8
{ DXGI_FORMAT_B5G6R5_UNORM, CONV_FLAGS_565, DDSPF_R5G6B5 }, // D3DFMT_R5G6B5 { DXGI_FORMAT_B5G6R5_UNORM, CONV_FLAGS_565, DDSPF_R5G6B5 }, // D3DFMT_R5G6B5
{ DXGI_FORMAT_B5G5R5A1_UNORM, CONV_FLAGS_5551, DDSPF_A1R5G5B5 }, // D3DFMT_A1R5G5B5 { DXGI_FORMAT_B5G5R5A1_UNORM, CONV_FLAGS_5551, DDSPF_A1R5G5B5 }, // D3DFMT_A1R5G5B5
{ DXGI_FORMAT_B5G5R5A1_UNORM, CONV_FLAGS_5551 { DXGI_FORMAT_B5G5R5A1_UNORM, CONV_FLAGS_5551 | CONV_FLAGS_NOALPHA,
| CONV_FLAGS_NOALPHA, DDSPF_X1R5G5B5 }, // D3DFMT_X1R5G5B5 DDSPF_X1R5G5B5 }, // D3DFMT_X1R5G5B5
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND { DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_8332,
| CONV_FLAGS_8332, DDSPF_A8R3G3B2 }, // D3DFMT_A8R3G3B2 DDSPF_A8R3G3B2 }, // D3DFMT_A8R3G3B2
{ DXGI_FORMAT_B5G6R5_UNORM, CONV_FLAGS_EXPAND { DXGI_FORMAT_B5G6R5_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_332,
| CONV_FLAGS_332, DDSPF_R3G3B2 }, // D3DFMT_R3G3B2 DDSPF_R3G3B2 }, // D3DFMT_R3G3B2
{ DXGI_FORMAT_R8_UNORM, CONV_FLAGS_NONE, DDSPF_L8 }, // D3DFMT_L8 { DXGI_FORMAT_R8_UNORM, CONV_FLAGS_NONE, DDSPF_L8 }, // D3DFMT_L8
{ DXGI_FORMAT_R16_UNORM, CONV_FLAGS_NONE, DDSPF_L16 }, // D3DFMT_L16 { DXGI_FORMAT_R16_UNORM, CONV_FLAGS_NONE, DDSPF_L16 }, // D3DFMT_L16
{ DXGI_FORMAT_R8G8_UNORM, CONV_FLAGS_NONE, DDSPF_A8L8 }, // D3DFMT_A8L8 { DXGI_FORMAT_R8G8_UNORM, CONV_FLAGS_NONE, DDSPF_A8L8 }, // D3DFMT_A8L8
{ DXGI_FORMAT_R8G8_UNORM, CONV_FLAGS_NONE, DDSPF_A8L8_ALT }, // D3DFMT_A8L8 (alternative bitcount) { DXGI_FORMAT_R8G8_UNORM, CONV_FLAGS_NONE, DDSPF_A8L8_ALT }, // D3DFMT_A8L8 (alternative bitcount)
// NVTT v1 wrote these with RGB instead of LUMINANCE // NVTT v1 wrote these with RGB instead of LUMINANCE
{ DXGI_FORMAT_R8_UNORM, CONV_FLAGS_NONE, DDSPF_L8_NVTT1 }, // D3DFMT_L8 { DXGI_FORMAT_R8_UNORM, CONV_FLAGS_NONE, DDSPF_L8_NVTT1 }, // D3DFMT_L8
{ DXGI_FORMAT_R16_UNORM, CONV_FLAGS_NONE, DDSPF_L16_NVTT1 }, // D3DFMT_L16 { DXGI_FORMAT_R16_UNORM, CONV_FLAGS_NONE, DDSPF_L16_NVTT1 }, // D3DFMT_L16
{ DXGI_FORMAT_R8G8_UNORM, CONV_FLAGS_NONE, DDSPF_A8L8_NVTT1 }, // D3DFMT_A8L8 { DXGI_FORMAT_R8G8_UNORM, CONV_FLAGS_NONE, DDSPF_A8L8_NVTT1 }, // D3DFMT_A8L8
{ DXGI_FORMAT_A8_UNORM, CONV_FLAGS_NONE, DDSPF_A8 }, // D3DFMT_A8 { DXGI_FORMAT_A8_UNORM, CONV_FLAGS_NONE, DDSPF_A8 }, // D3DFMT_A8
{ DXGI_FORMAT_R16G16B16A16_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 36, 0, 0, 0, 0, 0 } }, // D3DFMT_A16B16G16R16 { DXGI_FORMAT_R16G16B16A16_UNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 36, 0, 0, 0, 0, 0 } }, // D3DFMT_A16B16G16R16
{ DXGI_FORMAT_R16G16B16A16_SNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 110, 0, 0, 0, 0, 0 } }, // D3DFMT_Q16W16V16U16 { DXGI_FORMAT_R16G16B16A16_SNORM, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 110, 0, 0, 0, 0, 0 } }, // D3DFMT_Q16W16V16U16
{ DXGI_FORMAT_R16_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 111, 0, 0, 0, 0, 0 } }, // D3DFMT_R16F { DXGI_FORMAT_R16_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 111, 0, 0, 0, 0, 0 } }, // D3DFMT_R16F
{ DXGI_FORMAT_R16G16_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 112, 0, 0, 0, 0, 0 } }, // D3DFMT_G16R16F { DXGI_FORMAT_R16G16_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 112, 0, 0, 0, 0, 0 } }, // D3DFMT_G16R16F
{ DXGI_FORMAT_R16G16B16A16_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 113, 0, 0, 0, 0, 0 } }, // D3DFMT_A16B16G16R16F { DXGI_FORMAT_R16G16B16A16_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 113, 0, 0, 0, 0, 0 } }, // D3DFMT_A16B16G16R16F
{ DXGI_FORMAT_R32_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 114, 0, 0, 0, 0, 0 } }, // D3DFMT_R32F { DXGI_FORMAT_R32_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 114, 0, 0, 0, 0, 0 } }, // D3DFMT_R32F
{ DXGI_FORMAT_R32G32_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 115, 0, 0, 0, 0, 0 } }, // D3DFMT_G32R32F { DXGI_FORMAT_R32G32_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 115, 0, 0, 0, 0, 0 } }, // D3DFMT_G32R32F
{ DXGI_FORMAT_R32G32B32A32_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 116, 0, 0, 0, 0, 0 } }, // D3DFMT_A32B32G32R32F { DXGI_FORMAT_R32G32B32A32_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_FOURCC, 116, 0, 0, 0, 0, 0 } }, // D3DFMT_A32B32G32R32F
{ DXGI_FORMAT_R32_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_RGB, 0, 32, 0xffffffff, 0, 0, 0 } }, // D3DFMT_R32F (D3DX uses FourCC 114 instead) { DXGI_FORMAT_R32_FLOAT, CONV_FLAGS_NONE, { sizeof(DDS_PIXELFORMAT), DDS_RGB, 0, 32, 0xffffffff, 0, 0, 0 } }, // D3DFMT_R32F (D3DX uses FourCC 114 instead)
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND { DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_PAL8 | CONV_FLAGS_A8P8,
| CONV_FLAGS_PAL8 { sizeof(DDS_PIXELFORMAT), DDS_PAL8A, 0, 16, 0, 0, 0, 0xff00 } }, // D3DFMT_A8P8
| CONV_FLAGS_A8P8, { sizeof(DDS_PIXELFORMAT), DDS_PAL8A, 0, 16, 0, 0, 0, 0xff00 } }, // D3DFMT_A8P8 { DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_PAL8,
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND { sizeof(DDS_PIXELFORMAT), DDS_PAL8, 0, 8, 0, 0, 0, 0 } }, // D3DFMT_P8
| CONV_FLAGS_PAL8, { sizeof(DDS_PIXELFORMAT), DDS_PAL8, 0, 8, 0, 0, 0, 0 } }, // D3DFMT_P8
{ DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_4444, DDSPF_A4R4G4B4 }, // D3DFMT_A4R4G4B4 (uses DXGI 1.2 format) { DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_4444, DDSPF_A4R4G4B4 }, // D3DFMT_A4R4G4B4 (uses DXGI 1.2 format)
{ DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_NOALPHA { DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_NOALPHA | CONV_FLAGS_4444,
| CONV_FLAGS_4444, DDSPF_X4R4G4B4 }, // D3DFMT_X4R4G4B4 (uses DXGI 1.2 format) DDSPF_X4R4G4B4 }, // D3DFMT_X4R4G4B4 (uses DXGI 1.2 format)
{ DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_EXPAND { DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_44,
| CONV_FLAGS_44, DDSPF_A4L4 }, // D3DFMT_A4L4 (uses DXGI 1.2 format) DDSPF_A4L4 }, // D3DFMT_A4L4 (uses DXGI 1.2 format)
{ DXGI_FORMAT_YUY2, CONV_FLAGS_NONE, DDSPF_YUY2 }, // D3DFMT_YUY2 (uses DXGI 1.2 format) { DXGI_FORMAT_YUY2, CONV_FLAGS_NONE, DDSPF_YUY2 }, // D3DFMT_YUY2 (uses DXGI 1.2 format)
{ DXGI_FORMAT_YUY2, CONV_FLAGS_SWIZZLE, DDSPF_UYVY }, // D3DFMT_UYVY (uses DXGI 1.2 format) { DXGI_FORMAT_YUY2, CONV_FLAGS_SWIZZLE, DDSPF_UYVY }, // D3DFMT_UYVY (uses DXGI 1.2 format)
{ DXGI_FORMAT_R8G8_SNORM, CONV_FLAGS_NONE, DDSPF_V8U8 }, // D3DFMT_V8U8 { DXGI_FORMAT_R8G8_SNORM, CONV_FLAGS_NONE, DDSPF_V8U8 }, // D3DFMT_V8U8
{ DXGI_FORMAT_R8G8B8A8_SNORM, CONV_FLAGS_NONE, DDSPF_Q8W8V8U8 }, // D3DFMT_Q8W8V8U8 { DXGI_FORMAT_R8G8B8A8_SNORM, CONV_FLAGS_NONE, DDSPF_Q8W8V8U8 }, // D3DFMT_Q8W8V8U8
{ DXGI_FORMAT_R16G16_SNORM, CONV_FLAGS_NONE, DDSPF_V16U16 }, // D3DFMT_V16U16 { DXGI_FORMAT_R16G16_SNORM, CONV_FLAGS_NONE, DDSPF_V16U16 }, // D3DFMT_V16U16
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_L6V5U5 { DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_L6V5U5 | CONV_FLAGS_EXPAND,
| CONV_FLAGS_EXPAND, DDSPF_L6V5U5 }, // D3DFMT_L6V5U5 DDSPF_L6V5U5 }, // D3DFMT_L6V5U5
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_L8U8V8, DDSPF_X8L8V8U8 }, // D3DFMT_X8L8V8U8 { DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_L8U8V8, DDSPF_X8L8V8U8 }, // D3DFMT_X8L8V8U8
{ DXGI_FORMAT_R10G10B10A2_UNORM, CONV_FLAGS_WUV10, DDSPF_A2W10V10U10 }, // D3DFMT_A2W10V10U10 { DXGI_FORMAT_R10G10B10A2_UNORM, CONV_FLAGS_WUV10, DDSPF_A2W10V10U10 }, // D3DFMT_A2W10V10U10
}; };
// Note that many common DDS reader/writers (including D3DX) swap the // Note that many common DDS reader/writers (including D3DX) swap the

View File

@ -49,7 +49,8 @@ namespace
constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt, bool isrgb) noexcept : constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt, bool isrgb) noexcept :
wic(wg), wic(wg),
format(fmt), format(fmt),
srgb(isrgb) {} srgb(isrgb)
{}
}; };
constexpr WICTranslate g_WICFormats[] = constexpr WICTranslate g_WICFormats[] =
@ -264,11 +265,11 @@ REFGUID DirectX::GetWICCodec(WICCodecs codec) noexcept
case WIC_CODEC_ICO: case WIC_CODEC_ICO:
return GUID_ContainerFormatIco; return GUID_ContainerFormatIco;
#ifdef NTDDI_WIN10_RS4 #ifdef NTDDI_WIN10_RS4
case WIC_CODEC_HEIF: case WIC_CODEC_HEIF:
// This requires installing https://aka.ms/heif // This requires installing https://aka.ms/heif
return GUID_ContainerFormatHeif; return GUID_ContainerFormatHeif;
#endif #endif
default: default:
return GUID_NULL; return GUID_NULL;
@ -1062,13 +1063,13 @@ HRESULT DirectX::ComputePitch(DXGI_FORMAT fmt, size_t width, size_t height,
return E_INVALIDARG; return E_INVALIDARG;
} }
#if (__cplusplus >= 201703L) #if (__cplusplus >= 201703L)
[[fallthrough]]; [[fallthrough]];
#elif defined(__clang__) #elif defined(__clang__)
[[clang::fallthrough]]; [[clang::fallthrough]];
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
__fallthrough; __fallthrough;
#endif #endif
case XBOX_DXGI_FORMAT_D16_UNORM_S8_UINT: case XBOX_DXGI_FORMAT_D16_UNORM_S8_UINT:
case XBOX_DXGI_FORMAT_R16_UNORM_X8_TYPELESS: case XBOX_DXGI_FORMAT_R16_UNORM_X8_TYPELESS:
@ -1271,7 +1272,7 @@ HRESULT DirectX::ComputeTileShape(
const bool iscompressed = IsCompressed(fmt); const bool iscompressed = IsCompressed(fmt);
switch(dimension) switch (dimension)
{ {
case TEX_DIMENSION_TEXTURE1D: case TEX_DIMENSION_TEXTURE1D:
if (iscompressed) if (iscompressed)
@ -1283,10 +1284,10 @@ HRESULT DirectX::ComputeTileShape(
case TEX_DIMENSION_TEXTURE2D: case TEX_DIMENSION_TEXTURE2D:
tiling.depth = 1; tiling.depth = 1;
if(iscompressed) if (iscompressed)
{ {
size_t bpb = BytesPerBlock(fmt); size_t bpb = BytesPerBlock(fmt);
switch(bpb) switch (bpb)
{ {
case 8: case 8:
tiling.width = 128 * 4; tiling.width = 128 * 4;
@ -1338,10 +1339,10 @@ HRESULT DirectX::ComputeTileShape(
break; break;
case TEX_DIMENSION_TEXTURE3D: case TEX_DIMENSION_TEXTURE3D:
if(iscompressed) if (iscompressed)
{ {
size_t bpb = BytesPerBlock(fmt); size_t bpb = BytesPerBlock(fmt);
switch(bpb) switch (bpb)
{ {
case 8: case 8:
tiling.width = 32 * 4; tiling.width = 32 * 4;

View File

@ -29,7 +29,8 @@ namespace
constexpr WICConvert(const GUID& src, const GUID& tgt, TEX_ALPHA_MODE mode) noexcept : constexpr WICConvert(const GUID& src, const GUID& tgt, TEX_ALPHA_MODE mode) noexcept :
source(src), source(src),
target(tgt), target(tgt),
alphaMode(mode) {} alphaMode(mode)
{}
}; };
constexpr WICConvert g_WICConvert[] = constexpr WICConvert g_WICConvert[] =

View File

@ -67,30 +67,36 @@ static const uint candidateFixUpIndex1D[32] =
15,15,15,15, 15,15,15,15,
15,15,15,15, 15,15,15,15,
15, 2, 8, 2, 15, 2, 8, 2,
2, 8, 8,15, 2, 8, 8,15,
2, 8, 2, 2, 2, 8, 2, 2,
8, 8, 2, 2 8, 8, 2, 2
}; };
//0, 9, 18, 27, 37, 46, 55, 64 //0, 9, 18, 27, 37, 46, 55, 64
static const uint aStep1[64] = { 0,0,0,0,0,1,1,1, static const uint aStep1[64] =
1,1,1,1,1,1,2,2, {
2,2,2,2,2,2,2,3, 0,0,0,0,0,1,1,1,
3,3,3,3,3,3,3,3, 1,1,1,1,1,1,2,2,
3,4,4,4,4,4,4,4, 2,2,2,2,2,2,2,3,
4,4,5,5,5,5,5,5, 3,3,3,3,3,3,3,3,
5,5,5,6,6,6,6,6, 3,4,4,4,4,4,4,4,
6,6,6,6,7,7,7,7 }; 4,4,5,5,5,5,5,5,
5,5,5,6,6,6,6,6,
6,6,6,6,7,7,7,7
};
//0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64 //0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64
static const uint aStep2[64] = { 0, 0, 0, 1, 1, 1, 1, 2, static const uint aStep2[64] =
2, 2, 2, 2, 3, 3, 3, 3, {
4, 4, 4, 4, 5, 5, 5, 5, 0, 0, 0, 1, 1, 1, 1, 2,
6, 6, 6, 6, 6, 7, 7, 7, 2, 2, 2, 2, 3, 3, 3, 3,
7, 8, 8, 8, 8, 9, 9, 9, 4, 4, 4, 4, 5, 5, 5, 5,
9,10,10,10,10,10,11,11, 6, 6, 6, 6, 6, 7, 7, 7,
11,11,12,12,12,12,13,13, 7, 8, 8, 8, 8, 9, 9, 9,
13,13,14,14,14,14,15,15 }; 9, 10,10,10,10,10,11,11,
11,11,12,12,12,12,13,13,
13,13,14,14,14,14,15,15
};
static const float3 RGB2LUM = float3(0.2126f, 0.7152f, 0.0722f); static const float3 RGB2LUM = float3(0.2126f, 0.7152f, 0.0722f);
@ -2250,12 +2256,11 @@ void block_package(inout uint4 block, int2x3 endPoint, uint mode_type) // for mo
block.xy = 0; block.xy = 0;
block.z &= 0xFFFFFFFE; block.z &= 0xFFFFFFFE;
if (mode_type == candidateModeFlag[10]) if (mode_type == candidateModeFlag[10])
{ {
/* block.x |= candidateModeMemory[10]; /* block.x |= candidateModeMemory[10];
block.y |= ( ( endPoint[1].r << 3 ) & 0x00001FF8 ) | ( ( endPoint[1].g << 13 ) & 0x007FE000 ) | ( ( endPoint[1].b << 23 ) & 0xFF800000 ); block.y |= ( ( endPoint[1].r << 3 ) & 0x00001FF8 ) | ( ( endPoint[1].g << 13 ) & 0x007FE000 ) | ( ( endPoint[1].b << 23 ) & 0xFF800000 );
block.z |= ( endPoint[1].b >> 9 ) & 0x00000001;*/ block.z |= ( endPoint[1].b >> 9 ) & 0x00000001;*/
block.x |= ((candidateModeMemory[10] >> 0) & 1) << 0; block.x |= ((candidateModeMemory[10] >> 0) & 1) << 0;
block.x |= ((candidateModeMemory[10] >> 1) & 1) << 1; block.x |= ((candidateModeMemory[10] >> 1) & 1) << 1;

View File

@ -131,7 +131,7 @@ static const uint2 candidateFixUpIndex1DOrdered[128] = //Same with candidateFixU
{ 5,15},{10,15},{ 8,15},{13,15}, { 5,15},{10,15},{ 8,15},{13,15},
{ 3,15},{12,15},{ 3,15},{ 3, 8}, { 3,15},{12,15},{ 3,15},{ 3, 8},
}; };
//static const uint4x4 candidateRotation[4] = //static const uint4x4 candidateRotation[4] =
//{ //{
// {1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}, // {1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1},
// {0,0,0,1},{0,1,0,0},{0,0,1,0},{1,0,0,0}, // {0,0,0,1},{0,1,0,0},{0,0,1,0},{1,0,0,0},
@ -142,37 +142,49 @@ static const uint2 candidateFixUpIndex1DOrdered[128] = //Same with candidateFixU
// {2,3}, //color index and alpha index can exchange // {2,3}, //color index and alpha index can exchange
// {2,2},{4,4},{2,2}}; // {2,2},{4,4},{2,2}};
static const uint aWeight[3][16] = { {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64}, static const uint aWeight[3][16] =
{0, 9, 18, 27, 37, 46, 55, 64, 0, 0, 0, 0, 0, 0, 0, 0}, {
{0, 21, 43, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} }; {0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64},
{0, 9, 18, 27, 37, 46, 55, 64, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 21, 43, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
};
//4 bit index: 0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64 //4 bit index: 0, 4, 9, 13, 17, 21, 26, 30, 34, 38, 43, 47, 51, 55, 60, 64
static const uint aStep[3][64] = { { 0, 0, 0, 1, 1, 1, 1, 2, static const uint aStep[3][64] =
2, 2, 2, 2, 3, 3, 3, 3, {
4, 4, 4, 4, 5, 5, 5, 5, {
6, 6, 6, 6, 6, 7, 7, 7, 0, 0, 0, 1, 1, 1, 1, 2,
7, 8, 8, 8, 8, 9, 9, 9, 2, 2, 2, 2, 3, 3, 3, 3,
9,10,10,10,10,10,11,11, 4, 4, 4, 4, 5, 5, 5, 5,
11,11,12,12,12,12,13,13, 6, 6, 6, 6, 6, 7, 7, 7,
13,13,14,14,14,14,15,15 }, 7, 8, 8, 8, 8, 9, 9, 9,
9,10,10,10,10,10,11,11,
11,11,12,12,12,12,13,13,
13,13,14,14,14,14,15,15
},
//3 bit index: 0, 9, 18, 27, 37, 46, 55, 64 //3 bit index: 0, 9, 18, 27, 37, 46, 55, 64
{ 0,0,0,0,0,1,1,1, {
0,0,0,0,0,1,1,1,
1,1,1,1,1,1,2,2, 1,1,1,1,1,1,2,2,
2,2,2,2,2,2,2,3, 2,2,2,2,2,2,2,3,
3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,
3,4,4,4,4,4,4,4, 3,4,4,4,4,4,4,4,
4,4,5,5,5,5,5,5, 4,4,5,5,5,5,5,5,
5,5,5,6,6,6,6,6, 5,5,5,6,6,6,6,6,
6,6,6,6,7,7,7,7 }, 6,6,6,6,7,7,7,7
},
//2 bit index: 0, 21, 43, 64 //2 bit index: 0, 21, 43, 64
{ 0,0,0,0,0,0,0,0, {
0,0,0,0,0,0,0,0,
0,0,0,1,1,1,1,1, 0,0,0,1,1,1,1,1,
1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,
1,2,2,2,2,2,2,2, 1,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,
2,2,2,2,2,2,3,3, 2,2,2,2,2,2,3,3,
3,3,3,3,3,3,3,3 } }; 3,3,3,3,3,3,3,3
}
};
cbuffer cbCS : register(b0) cbuffer cbCS : register(b0)
{ {
@ -1561,18 +1573,18 @@ void EncodeBlockCS(uint GI : SV_GroupIndex, uint3 groupID : SV_GroupID)
// uint precisionMask = ((1 << bits) - 1) << (8 - bits); // uint precisionMask = ((1 << bits) - 1) << (8 - bits);
// uint precisionHalf = (1 << (7-bits)); // uint precisionHalf = (1 << (7-bits));
// //
// uint4 truncated = color & precisionMask; // uint4 truncated = color & precisionMask;
// uint4 rounded = min(255, color + precisionHalf) & precisionMask; // uint4 rounded = min(255, color + precisionHalf) & precisionMask;
// //
// uint4 truncated_bak = truncated = truncated | (truncated >> bits); // uint4 truncated_bak = truncated = truncated | (truncated >> bits);
// uint4 rounded_bak = rounded = rounded | (rounded >> bits); // uint4 rounded_bak = rounded = rounded | (rounded >> bits);
// //
// uint4 color_bak = color; // uint4 color_bak = color;
// //
// Ensure_A_Is_Larger( rounded, color ); // Ensure_A_Is_Larger( rounded, color );
// Ensure_A_Is_Larger( truncated, color_bak ); // Ensure_A_Is_Larger( truncated, color_bak );
// //
// if (dot(rounded - color, rounded - color) < // if (dot(rounded - color, rounded - color) <
// dot(truncated - color_bak, truncated - color_bak)) // dot(truncated - color_bak, truncated - color_bak))
// { // {
// return rounded_bak; // return rounded_bak;

View File

@ -101,7 +101,7 @@ namespace DirectX
#define BILINEAR_INTERPOLATE( res, x, y, r0, r1 ) \ #define BILINEAR_INTERPOLATE( res, x, y, r0, r1 ) \
res = XMVectorAdd(XMVectorScale(XMVectorAdd(XMVectorScale((r0)[ x.u0 ], x.weight0), XMVectorScale((r0)[ x.u1 ], x.weight1)), y.weight0), \ res = XMVectorAdd(XMVectorScale(XMVectorAdd(XMVectorScale((r0)[ x.u0 ], x.weight0), XMVectorScale((r0)[ x.u1 ], x.weight1)), y.weight0), \
XMVectorScale(XMVectorAdd(XMVectorScale((r1)[ x.u0 ], x.weight0), XMVectorScale((r1)[ x.u1 ], x.weight1)), y.weight1) ); XMVectorScale(XMVectorAdd(XMVectorScale((r1)[ x.u0 ], x.weight0), XMVectorScale((r1)[ x.u1 ], x.weight1)), y.weight1) );
#define TRILINEAR_INTERPOLATE( res, x, y, z, r0, r1, r2, r3 ) \ #define TRILINEAR_INTERPOLATE( res, x, y, z, r0, r1, r2, r3 ) \
{\ {\

View File

@ -6,7 +6,7 @@ http://go.microsoft.com/fwlink/?LinkId=248926
Copyright (c) Microsoft Corporation. Copyright (c) Microsoft Corporation.
**March 24, 2025** ## March 24, 2025
This package contains DirectXTex, a shared source library for reading and writing ``.DDS`` files, and performing various texture content processing operations including resizing, format conversion, mip-map generation, block compression for Direct3D runtime texture resources, and height-map to normal-map conversion. This library makes use of the Windows Image Component (WIC) APIs. It also includes ``.TGA`` and ``.HDR`` readers and writers since these image file formats are commonly used for texture content processing pipelines, but are not currently supported by a built-in WIC codec. This package contains DirectXTex, a shared source library for reading and writing ``.DDS`` files, and performing various texture content processing operations including resizing, format conversion, mip-map generation, block compression for Direct3D runtime texture resources, and height-map to normal-map conversion. This library makes use of the Windows Image Component (WIC) APIs. It also includes ``.TGA`` and ``.HDR`` readers and writers since these image file formats are commonly used for texture content processing pipelines, but are not currently supported by a built-in WIC codec.
@ -18,55 +18,54 @@ These components are designed to work without requiring any content from the leg
* ``DirectXTex\`` * ``DirectXTex\``
+ This contains the DirectXTex library. This includes a full-featured DDS reader and writer including legacy format conversions, a TGA reader and writer, a HDR reader and writer, a WIC-based bitmap reader and writer (BMP, JPEG, PNG, TIFF, and HD Photo), and various texture processing functions. This is intended primarily for tool usage. * This contains the DirectXTex library. This includes a full-featured DDS reader and writer including legacy format conversions, a TGA reader and writer, a HDR reader and writer, a WIC-based bitmap reader and writer (BMP, JPEG, PNG, TIFF, and HD Photo), and various texture processing functions. This is intended primarily for tool usage.
> The majority of the header files here are intended for internal implementation of the library only (``BC.h``, ``BCDirectCompute.h``, ``DDS.h``, ``DirectXTexP.h``, etc.). Only ``DirectXTex.h`` and ``DirectXTex.inl`` are meant as the 'public' header for the library. > The majority of the header files here are intended for internal implementation of the library only (``BC.h``, ``BCDirectCompute.h``, ``DDS.h``, ``DirectXTexP.h``, etc.). Only ``DirectXTex.h`` and ``DirectXTex.inl`` are meant as the 'public' header for the library.
* ``Auxiliary\`` * ``Auxiliary\``
+ Contains optional source files for the DirectXTex library, such as adapter loading functions using the OpenEXR library, Xbox texture tiling extensions, etc. * Contains optional source files for the DirectXTex library, such as adapter loading functions using the OpenEXR library, Xbox texture tiling extensions, etc.
* ``Common\`` * ``Common\``
+ Contains shared source headers used by the DirectXTex library and tools. * Contains shared source headers used by the DirectXTex library and tools.
* ``Texconv\`` * ``Texconv\``
+ This DirectXTex sample is an implementation of the [texconv](https://github.com/Microsoft/DirectXTex/wiki/Texconv) command-line texture utility from the DirectX SDK utilizing DirectXTex rather than D3DX. * This DirectXTex sample is an implementation of the [texconv](https://github.com/Microsoft/DirectXTex/wiki/Texconv) command-line texture utility from the DirectX SDK utilizing DirectXTex rather than D3DX.
It supports the same arguments as the *Texture Conversion Tool Extended* (``texconvex.exe``) legacy DirectX SDK utility. The primary differences are the ``-10`` and ``-11`` arguments are not applicable and the filter names (``POINT``, ``LINEAR``, ``CUBIC``, ``FANT`` or ``BOX``, ``TRIANGLE``, ``*_DITHER``, ``*_DITHER_DIFFUSION``). This also includes support for the JPEG XR (HD Photo) bitmap format. It supports the same arguments as the _Texture Conversion Tool Extended_ (``texconvex.exe``) legacy DirectX SDK utility. The primary differences are the ``-10`` and ``-11`` arguments are not applicable and the filter names (``POINT``, ``LINEAR``, ``CUBIC``, ``FANT`` or ``BOX``, ``TRIANGLE``, ``*_DITHER``, ``*_DITHER_DIFFUSION``). This also includes support for the JPEG XR (HD Photo) bitmap format.
* ``Texassemble\`` * ``Texassemble\``
+ This DirectXTex sample is a [command-line utility](https://github.com/Microsoft/DirectXTex/wiki/Texassemble) for creating cubemaps, volume maps, or texture arrays from a set of individual input image files. * This DirectXTex sample is a [command-line utility](https://github.com/Microsoft/DirectXTex/wiki/Texassemble) for creating cubemaps, volume maps, or texture arrays from a set of individual input image files.
* ``Texdiag\`` * ``Texdiag\``
+ This DirectXTex sample is a [command-line utility](https://github.com/Microsoft/DirectXTex/wiki/Texdiag) for analyzing image contents, primarily for debugging purposes. * This DirectXTex sample is a [command-line utility](https://github.com/Microsoft/DirectXTex/wiki/Texdiag) for analyzing image contents, primarily for debugging purposes.
* ``DDSView\`` * ``DDSView\``
+ This DirectXTex sample is a simple Direct3D 11-based viewer for DDS files. For array textures or volume maps, the "<" and ">" keyboard keys will show different images contained in the DDS. The "1" through "0" keys can also be used to jump to a specific image index. * This DirectXTex sample is a simple Direct3D 11-based viewer for DDS files. For array textures or volume maps, the "<" and ">" keyboard keys will show different images contained in the DDS. The "1" through "0" keys can also be used to jump to a specific image index.
* ``DDSTextureLoader\`` * ``DDSTextureLoader\``
+ This contains a streamlined version of the legacy DirectX SDK sample *DDSWithoutD3DX11* texture loading code for a simple light-weight runtime DDS loader. There are versions for Direct3D 9, Direct3D 11, and Direct3D 12. This performs no runtime pixel data conversions. This is ideal for runtime usage, and supports the full complement of Direct3D texture resources (1D, 2D, volume maps, cubemaps, mipmap levels, texture arrays, BC formats, etc.). * This contains a streamlined version of the legacy DirectX SDK sample _DDSWithoutD3DX11_ texture loading code for a simple light-weight runtime DDS loader. There are versions for Direct3D 9, Direct3D 11, and Direct3D 12. This performs no runtime pixel data conversions. This is ideal for runtime usage, and supports the full complement of Direct3D texture resources (1D, 2D, volume maps, cubemaps, mipmap levels, texture arrays, BC formats, etc.).
* ``ScreenGrab\`` * ``ScreenGrab\``
+ This contains texture writing modules for Direct3D 9, Direct3D 11, and Direct3D 12 primarily intended for creating screenshots. The images are written as a DDS or as an image file format using WIC. * This contains texture writing modules for Direct3D 9, Direct3D 11, and Direct3D 12 primarily intended for creating screenshots. The images are written as a DDS or as an image file format using WIC.
* ``WICTextureLoader\`` * ``WICTextureLoader\``
+ This contains a Direct3D 9, Direct3D 11 and Direct3D 12 2D texture loader that uses WIC to load a bitmap (BMP, JPEG, PNG, HD Photo, or other WIC supported file container), resize if needed based on the current feature level (or by explicit parameter), format convert to a DXGI_FORMAT if required, and then create a 2D texture. Note this does not support 1D textures, volume textures, cubemaps, or texture arrays. DDSTextureLoader is recommended for fully "precooked" textures for maximum performance and image quality, but this loader can be useful for creating simple 2D texture from standard image files at runtime. * This contains a Direct3D 9, Direct3D 11 and Direct3D 12 2D texture loader that uses WIC to load a bitmap (BMP, JPEG, PNG, HD Photo, or other WIC supported file container), resize if needed based on the current feature level (or by explicit parameter), format convert to a DXGI_FORMAT if required, and then create a 2D texture. Note this does not support 1D textures, volume textures, cubemaps, or texture arrays. DDSTextureLoader is recommended for fully "precooked" textures for maximum performance and image quality, but this loader can be useful for creating simple 2D texture from standard image files at runtime.
> DDSTextureLoader11, ScreenGrab11, and WICTextureLoader11 are 'stand-alone' versions of the same modules provided in the [DirectX Tool Kit for DX11](https://github.com/Microsoft/DirectXTK) > DDSTextureLoader11, ScreenGrab11, and WICTextureLoader11 are 'stand-alone' versions of the same modules provided in the [DirectX Tool Kit for DX11](https://github.com/Microsoft/DirectXTK)
> DDSTextureLoader12, ScreenGrab12, and WICTextureLoader12 are 'stand-alone' versions of the same modules provided in the [DirectX Tool Kit for DX12](https://github.com/Microsoft/DirectXTK12). > DDSTextureLoader12, ScreenGrab12, and WICTextureLoader12 are 'stand-alone' versions of the same modules provided in the [DirectX Tool Kit for DX12](https://github.com/Microsoft/DirectXTK12).
* ``build\`` * ``build\``
+ Contains miscellaneous build files and scripts. * Contains miscellaneous build files and scripts.
## Documentation ## Documentation
@ -86,9 +85,9 @@ For a full change history, see [CHANGELOG.md](https://github.com/microsoft/Direc
* Starting with the March 2025 release, Windows 7 and Windows 8.0 support has been retired. * Starting with the March 2025 release, Windows 7 and Windows 8.0 support has been retired.
* Starting with the July 2022 release, the ``bool forceSRGB`` parameter for the CreateTextureEx and CreateShaderResourceViewEx functions is now a ``CREATETEX_FLAGS`` typed enum bitmask flag parameter. This may have a *breaking change* impact to client code. Replace ``true`` with ``CREATETEX_FORCE_SRGB`` and ``false`` with ``CREATETEX_DEFAULT``. * Starting with the July 2022 release, the ``bool forceSRGB`` parameter for the **CreateTextureEx** and **CreateShaderResourceViewEx** functions is now a ``CREATETEX_FLAGS`` typed enum bitmask flag parameter. This may have a _breaking change_ impact to client code. Replace ``true`` with ``CREATETEX_FORCE_SRGB`` and ``false`` with ``CREATETEX_DEFAULT``.
* Starting with the June 2020 release, this library makes use of typed enum bitmask flags per the recommendation of the _C++ Standard_ section *17.5.2.1.3 Bitmask types*. This is consistent with Direct3D 12's use of the ``DEFINE_ENUM_FLAG_OPERATORS`` macro. This may have *breaking change* impacts to client code: * Starting with the June 2020 release, this library makes use of typed enum bitmask flags per the recommendation of the _C++ Standard_ section _17.5.2.1.3 Bitmask types_. This is consistent with Direct3D 12's use of the ``DEFINE_ENUM_FLAG_OPERATORS`` macro. This may have _breaking change_ impacts to client code:
* You cannot pass the ``0`` literal as your flags value. Instead you must make use of the appropriate default enum value: ``CP_FLAGS_NONE``, ``DDS_FLAGS_NONE``, ``WIC_FLAGS_NONE``, ``TEX_FR_ROTATE0``, ``TEX_FILTER_DEFAULT``, ``TEX_FILTER_DEFAULT``, ``TEX_FILTER_DEFAULT``, ``CNMAP_DEFAULT``, or ``CNMAP_DEFAULT``. * You cannot pass the ``0`` literal as your flags value. Instead you must make use of the appropriate default enum value: ``CP_FLAGS_NONE``, ``DDS_FLAGS_NONE``, ``WIC_FLAGS_NONE``, ``TEX_FR_ROTATE0``, ``TEX_FILTER_DEFAULT``, ``TEX_FILTER_DEFAULT``, ``TEX_FILTER_DEFAULT``, ``CNMAP_DEFAULT``, or ``CNMAP_DEFAULT``.
@ -100,7 +99,7 @@ For a full change history, see [CHANGELOG.md](https://github.com/microsoft/Direc
* The UWP projects and the Win10 classic desktop project include configurations for the ARM64 platform. Building these requires installing the ARM64 toolset. * The UWP projects and the Win10 classic desktop project include configurations for the ARM64 platform. Building these requires installing the ARM64 toolset.
* For ARM64/AArch64 development, the VS 2022 compiler is strongly recommended over the VS 2019 toolset. The Windows SDK (26100 or later) is not compatible with VS 2019 for Win32 on ARM64 development. *Note that the ARM32/AArch32 platform is [deprecated](https://learn.microsoft.com/windows/arm/arm32-to-arm64)*. * For ARM64/AArch64 development, the VS 2022 compiler is strongly recommended over the VS 2019 toolset. The Windows SDK (26100 or later) is not compatible with VS 2019 for Win32 on ARM64 development. _Note that the ARM32/AArch32 platform is [deprecated](https://learn.microsoft.com/windows/arm/arm32-to-arm64)_.
* When using clang/LLVM for the ARM64/AArch64 platform, the Windows 11 SDK ([22000](https://walbourn.github.io/windows-sdk-for-windows-11/)) or later is required. * When using clang/LLVM for the ARM64/AArch64 platform, the Windows 11 SDK ([22000](https://walbourn.github.io/windows-sdk-for-windows-11/)) or later is required.
@ -113,8 +112,8 @@ For a full change history, see [CHANGELOG.md](https://github.com/microsoft/Direc
|-tonemap|--tonemap|-badtails|--bad-tails|-badtails|--bad-tails| |-tonemap|--tonemap|-badtails|--bad-tails|-badtails|--bad-tails|
|-bgcolor|--gif-bg-color|-fixbc4x4|--fix-bc-4x4|-ignoremips|--ignore-mips| |-bgcolor|--gif-bg-color|-fixbc4x4|--fix-bc-4x4|-ignoremips|--ignore-mips|
|-swizzle|--swizzle|-ignoremips|--ignore-mips|-permissive|--permissive| |-swizzle|--swizzle|-ignoremips|--ignore-mips|-permissive|--permissive|
|-stripmips|--strip-mips|-inverty|--invert-y|-targetx|--target-x||-targety|--target-y| |-stripmips|--strip-mips|-inverty|--invert-y|-targetx|--target-x|
|||-keepcoverage|--keep-coverage||| |||-keepcoverage|--keep-coverage|-targety|--target-y|
|||-permissive|--permissive||| |||-permissive|--permissive|||
|||-reconstructz|--reconstruct-z||| |||-reconstructz|--reconstruct-z|||
|||-rotatecolor|--rotate-color||| |||-rotatecolor|--rotate-color|||
@ -129,7 +128,7 @@ For a full change history, see [CHANGELOG.md](https://github.com/microsoft/Direc
## Support ## Support
For questions, consider using [Stack Overflow](https://stackoverflow.com/questions/tagged/directxtk) with the *directxtk* tag, or the [DirectX Discord Server](https://discord.gg/directx) in the *dx12-developers* or *dx9-dx11-developers* channel. For questions, consider using [Stack Overflow](https://stackoverflow.com/questions/tagged/directxtk) with the _directxtk_ tag, or the [DirectX Discord Server](https://discord.gg/directx) in the _dx12-developers_ or _dx9-dx11-developers_ channel.
For bug reports and feature requests, please use GitHub [issues](https://github.com/microsoft/DirectXTex/issues) for this project. For bug reports and feature requests, please use GitHub [issues](https://github.com/microsoft/DirectXTex/issues) for this project.

View File

@ -14,17 +14,17 @@ Instead, please report them to the Microsoft Security Response Center (MSRC) at
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). 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). 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: 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.) * 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 * 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) * The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue * Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue * Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible) * Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue * Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly. This information will help us triage your report more quickly.

View File

@ -70,7 +70,7 @@ using Microsoft::WRL::ComPtr;
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
namespace namespace
{ {
#pragma pack(push,1) #pragma pack(push,1)
constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS " constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS "
@ -86,20 +86,20 @@ namespace
uint32_t ABitMask; uint32_t ABitMask;
}; };
#define DDS_FOURCC 0x00000004 // DDPF_FOURCC #define DDS_FOURCC 0x00000004 // DDPF_FOURCC
#define DDS_RGB 0x00000040 // DDPF_RGB #define DDS_RGB 0x00000040 // DDPF_RGB
#define DDS_RGBA 0x00000041 // DDPF_RGB | DDPF_ALPHAPIXELS #define DDS_RGBA 0x00000041 // DDPF_RGB | DDPF_ALPHAPIXELS
#define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE #define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE
#define DDS_LUMINANCEA 0x00020001 // DDPF_LUMINANCE | DDPF_ALPHAPIXELS #define DDS_LUMINANCEA 0x00020001 // DDPF_LUMINANCE | DDPF_ALPHAPIXELS
#define DDS_ALPHA 0x00000002 // DDPF_ALPHA #define DDS_ALPHA 0x00000002 // DDPF_ALPHA
#define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV #define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV
#define DDS_HEADER_FLAGS_TEXTURE 0x00001007 // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT #define DDS_HEADER_FLAGS_TEXTURE 0x00001007 // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT
#define DDS_HEADER_FLAGS_MIPMAP 0x00020000 // DDSD_MIPMAPCOUNT #define DDS_HEADER_FLAGS_MIPMAP 0x00020000 // DDSD_MIPMAPCOUNT
#define DDS_HEADER_FLAGS_PITCH 0x00000008 // DDSD_PITCH #define DDS_HEADER_FLAGS_PITCH 0x00000008 // DDSD_PITCH
#define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000 // DDSD_LINEARSIZE #define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000 // DDSD_LINEARSIZE
#define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE #define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE
struct DDS_HEADER struct DDS_HEADER
{ {
@ -128,7 +128,7 @@ namespace
uint32_t reserved; uint32_t reserved;
}; };
#pragma pack(pop) #pragma pack(pop)
static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch"); static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch");
static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch"); static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch");

View File

@ -108,20 +108,20 @@ namespace
uint32_t ABitMask; uint32_t ABitMask;
}; };
#define DDS_FOURCC 0x00000004 // DDPF_FOURCC #define DDS_FOURCC 0x00000004 // DDPF_FOURCC
#define DDS_RGB 0x00000040 // DDPF_RGB #define DDS_RGB 0x00000040 // DDPF_RGB
#define DDS_RGBA 0x00000041 // DDPF_RGB | DDPF_ALPHAPIXELS #define DDS_RGBA 0x00000041 // DDPF_RGB | DDPF_ALPHAPIXELS
#define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE #define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE
#define DDS_LUMINANCEA 0x00020001 // DDPF_LUMINANCE | DDPF_ALPHAPIXELS #define DDS_LUMINANCEA 0x00020001 // DDPF_LUMINANCE | DDPF_ALPHAPIXELS
#define DDS_ALPHA 0x00000002 // DDPF_ALPHA #define DDS_ALPHA 0x00000002 // DDPF_ALPHA
#define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV #define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV
#define DDS_HEADER_FLAGS_TEXTURE 0x00001007 // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT #define DDS_HEADER_FLAGS_TEXTURE 0x00001007 // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT
#define DDS_HEADER_FLAGS_MIPMAP 0x00020000 // DDSD_MIPMAPCOUNT #define DDS_HEADER_FLAGS_MIPMAP 0x00020000 // DDSD_MIPMAPCOUNT
#define DDS_HEADER_FLAGS_PITCH 0x00000008 // DDSD_PITCH #define DDS_HEADER_FLAGS_PITCH 0x00000008 // DDSD_PITCH
#define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000 // DDSD_LINEARSIZE #define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000 // DDSD_LINEARSIZE
#define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE #define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE
struct DDS_HEADER struct DDS_HEADER
{ {
@ -154,7 +154,7 @@ namespace
static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch"); static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch");
static_assert(sizeof(DDS_HEADER_DXT10) == 20, "DDS DX10 Extended Header size mismatch"); static_assert(sizeof(DDS_HEADER_DXT10) == 20, "DDS DX10 Extended Header size mismatch");
#pragma pack(pop) #pragma pack(pop)
constexpr size_t DDS_MIN_HEADER_SIZE = sizeof(uint32_t) + sizeof(DDS_HEADER); constexpr size_t DDS_MIN_HEADER_SIZE = sizeof(uint32_t) + sizeof(DDS_HEADER);
constexpr size_t DDS_DX10_HEADER_SIZE = sizeof(uint32_t) + sizeof(DDS_HEADER) + sizeof(DDS_HEADER_DXT10); constexpr size_t DDS_DX10_HEADER_SIZE = sizeof(uint32_t) + sizeof(DDS_HEADER) + sizeof(DDS_HEADER_DXT10);

View File

@ -64,7 +64,7 @@ using Microsoft::WRL::ComPtr;
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
namespace namespace
{ {
#pragma pack(push,1) #pragma pack(push,1)
constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS " constexpr uint32_t DDS_MAGIC = 0x20534444; // "DDS "
@ -80,22 +80,22 @@ namespace
uint32_t ABitMask; uint32_t ABitMask;
}; };
#define DDS_FOURCC 0x00000004 // DDPF_FOURCC #define DDS_FOURCC 0x00000004 // DDPF_FOURCC
#define DDS_RGB 0x00000040 // DDPF_RGB #define DDS_RGB 0x00000040 // DDPF_RGB
#define DDS_RGBA 0x00000041 // DDPF_RGB | DDPF_ALPHAPIXELS #define DDS_RGBA 0x00000041 // DDPF_RGB | DDPF_ALPHAPIXELS
#define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE #define DDS_LUMINANCE 0x00020000 // DDPF_LUMINANCE
#define DDS_LUMINANCEA 0x00020001 // DDPF_LUMINANCE | DDPF_ALPHAPIXELS #define DDS_LUMINANCEA 0x00020001 // DDPF_LUMINANCE | DDPF_ALPHAPIXELS
#define DDS_ALPHA 0x00000002 // DDPF_ALPHA #define DDS_ALPHA 0x00000002 // DDPF_ALPHA
#define DDS_BUMPLUMINANCE 0x00040000 // DDPF_BUMPLUMINANCE #define DDS_BUMPLUMINANCE 0x00040000 // DDPF_BUMPLUMINANCE
#define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV #define DDS_BUMPDUDV 0x00080000 // DDPF_BUMPDUDV
#define DDS_BUMPDUDVA 0x00080001 // DDPF_BUMPDUDV | DDPF_ALPHAPIXELS #define DDS_BUMPDUDVA 0x00080001 // DDPF_BUMPDUDV | DDPF_ALPHAPIXELS
#define DDS_HEADER_FLAGS_TEXTURE 0x00001007 // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT #define DDS_HEADER_FLAGS_TEXTURE 0x00001007 // DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT
#define DDS_HEADER_FLAGS_MIPMAP 0x00020000 // DDSD_MIPMAPCOUNT #define DDS_HEADER_FLAGS_MIPMAP 0x00020000 // DDSD_MIPMAPCOUNT
#define DDS_HEADER_FLAGS_PITCH 0x00000008 // DDSD_PITCH #define DDS_HEADER_FLAGS_PITCH 0x00000008 // DDSD_PITCH
#define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000 // DDSD_LINEARSIZE #define DDS_HEADER_FLAGS_LINEARSIZE 0x00080000 // DDSD_LINEARSIZE
#define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE #define DDS_SURFACE_FLAGS_TEXTURE 0x00001000 // DDSCAPS_TEXTURE
struct DDS_HEADER struct DDS_HEADER
{ {
@ -115,7 +115,7 @@ namespace
uint32_t reserved2; uint32_t reserved2;
}; };
#pragma pack(pop) #pragma pack(pop)
static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch"); static_assert(sizeof(DDS_PIXELFORMAT) == 32, "DDS pixel format size mismatch");
static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch"); static_assert(sizeof(DDS_HEADER) == 124, "DDS Header size mismatch");

View File

@ -228,7 +228,7 @@ namespace
{ nullptr, 0 } { nullptr, 0 }
}; };
#define DEFFMT(fmt) { L## #fmt, DXGI_FORMAT_ ## fmt } #define DEFFMT(fmt) { L## #fmt, DXGI_FORMAT_ ## fmt }
const SValue<DXGI_FORMAT> g_pFormats[] = const SValue<DXGI_FORMAT> g_pFormats[] =
{ {
@ -307,7 +307,7 @@ namespace
{ nullptr, DXGI_FORMAT_UNKNOWN } { nullptr, DXGI_FORMAT_UNKNOWN }
}; };
#undef DEFFMT #undef DEFFMT
const SValue<DXGI_FORMAT> g_pFormatAliases[] = const SValue<DXGI_FORMAT> g_pFormatAliases[] =
{ {
@ -348,15 +348,15 @@ namespace
constexpr uint32_t CODEC_TGA = 0xFFFF0002; constexpr uint32_t CODEC_TGA = 0xFFFF0002;
constexpr uint32_t CODEC_HDR = 0xFFFF0005; constexpr uint32_t CODEC_HDR = 0xFFFF0005;
#ifdef USE_OPENEXR #ifdef USE_OPENEXR
constexpr uint32_t CODEC_EXR = 0xFFFF0008; constexpr uint32_t CODEC_EXR = 0xFFFF0008;
#endif #endif
#ifdef USE_LIBJPEG #ifdef USE_LIBJPEG
constexpr uint32_t CODEC_JPEG = 0xFFFF0009; constexpr uint32_t CODEC_JPEG = 0xFFFF0009;
#endif #endif
#ifdef USE_LIBPNG #ifdef USE_LIBPNG
constexpr uint32_t CODEC_PNG = 0xFFFF000A; constexpr uint32_t CODEC_PNG = 0xFFFF000A;
#endif #endif
const SValue<uint32_t> g_pExtFileTypes[] = const SValue<uint32_t> g_pExtFileTypes[] =
{ {
@ -612,18 +612,18 @@ namespace
case CODEC_HDR: case CODEC_HDR:
return SaveToHDRFile(img, szOutputFile); return SaveToHDRFile(img, szOutputFile);
#ifdef USE_OPENEXR #ifdef USE_OPENEXR
case CODEC_EXR: case CODEC_EXR:
return SaveToEXRFile(img, szOutputFile); return SaveToEXRFile(img, szOutputFile);
#endif #endif
#ifdef USE_LIBJPEG #ifdef USE_LIBJPEG
case CODEC_JPEG: case CODEC_JPEG:
return SaveToJPEGFile(img, szOutputFile); return SaveToJPEGFile(img, szOutputFile);
#endif #endif
#ifdef USE_LIBPNG #ifdef USE_LIBPNG
case CODEC_PNG: case CODEC_PNG:
return SaveToPNGFile(img, szOutputFile); return SaveToPNGFile(img, szOutputFile);
#endif #endif
default: default:
{ {
@ -1386,7 +1386,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
default: default:
break; break;
} }
} }
} }
else if (_wcsicmp(ext.c_str(), L".tga") == 0) else if (_wcsicmp(ext.c_str(), L".tga") == 0)
@ -2028,7 +2028,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
hr = FlipRotate(*img, flipRotate, tmp); hr = FlipRotate(*img, flipRotate, tmp);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
hr = CopyRectangle(*tmp.GetImage(0,0,0), rect, *dest, dwFilter | dwFilterOpts, offsetx, offsety); hr = CopyRectangle(*tmp.GetImage(0, 0, 0), rect, *dest, dwFilter | dwFilterOpts, offsetx, offsety);
} }
} }
else else
@ -2374,7 +2374,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
hr = FlipRotate(*dest, flipRotate, tmp); hr = FlipRotate(*dest, flipRotate, tmp);
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
hr = CopyRectangle(*tmp.GetImage(0,0,0), Rect(0, 0, twidth, theight), *dest, dwFilter | dwFilterOpts, 0, 0); hr = CopyRectangle(*tmp.GetImage(0, 0, 0), Rect(0, 0, twidth, theight), *dest, dwFilter | dwFilterOpts, 0, 0);
} }
} }
} }

View File

@ -324,7 +324,7 @@ namespace
{ nullptr, 0 } { nullptr, 0 }
}; };
#define DEFFMT(fmt) { L## #fmt, DXGI_FORMAT_ ## fmt } #define DEFFMT(fmt) { L## #fmt, DXGI_FORMAT_ ## fmt }
const SValue<DXGI_FORMAT> g_pFormats[] = const SValue<DXGI_FORMAT> g_pFormats[] =
{ {
@ -510,7 +510,7 @@ namespace
{ nullptr, DXGI_FORMAT_UNKNOWN } { nullptr, DXGI_FORMAT_UNKNOWN }
}; };
#undef DEFFMT #undef DEFFMT
const SValue<uint32_t> g_pFilters[] = const SValue<uint32_t> g_pFilters[] =
{ {
@ -556,15 +556,15 @@ namespace
constexpr uint32_t CODEC_PPM = 0xFFFF0006; constexpr uint32_t CODEC_PPM = 0xFFFF0006;
constexpr uint32_t CODEC_PFM = 0xFFFF0007; constexpr uint32_t CODEC_PFM = 0xFFFF0007;
#ifdef USE_OPENEXR #ifdef USE_OPENEXR
constexpr uint32_t CODEC_EXR = 0xFFFF0008; constexpr uint32_t CODEC_EXR = 0xFFFF0008;
#endif #endif
#ifdef USE_LIBJPEG #ifdef USE_LIBJPEG
constexpr uint32_t CODEC_JPEG = 0xFFFF0009; constexpr uint32_t CODEC_JPEG = 0xFFFF0009;
#endif #endif
#ifdef USE_LIBPNG #ifdef USE_LIBPNG
constexpr uint32_t CODEC_PNG = 0xFFFF000A; constexpr uint32_t CODEC_PNG = 0xFFFF000A;
#endif #endif
const SValue<uint32_t> g_pSaveFileTypes[] = // valid formats to write to const SValue<uint32_t> g_pSaveFileTypes[] = // valid formats to write to
{ {
@ -1421,10 +1421,10 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
case OPT_PAPER_WHITE_NITS: case OPT_PAPER_WHITE_NITS:
case OPT_PRESERVE_ALPHA_COVERAGE: case OPT_PRESERVE_ALPHA_COVERAGE:
case OPT_SWIZZLE: case OPT_SWIZZLE:
#ifdef USE_XBOX_EXTS #ifdef USE_XBOX_EXTS
case OPT_XGMODE: case OPT_XGMODE:
#endif #endif
// These support either "-arg:value" or "-arg value" // These support either "-arg:value" or "-arg value"
if (!*pValue) if (!*pValue)
{ {
if ((iArg + 1 >= argc)) if ((iArg + 1 >= argc))
@ -1895,7 +1895,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
} }
break; break;
#ifdef USE_XBOX_EXTS #ifdef USE_XBOX_EXTS
case OPT_XGMODE: case OPT_XGMODE:
{ {
#ifdef _USE_SCARLETT #ifdef _USE_SCARLETT
@ -1927,7 +1927,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
XGSetHardwareVersion(static_cast<XG_HARDWARE_VERSION>(mode)); XGSetHardwareVersion(static_cast<XG_HARDWARE_VERSION>(mode));
break; break;
} }
#endif // USE_XBOX_EXTS #endif // USE_XBOX_EXTS
} }
} }
else if (wcspbrk(pArg, L"?*") != nullptr) else if (wcspbrk(pArg, L"?*") != nullptr)
@ -2014,8 +2014,8 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
#ifndef USE_XBOX_EXTS #ifndef USE_XBOX_EXTS
constexpr constexpr
#endif #endif
bool isXbox = false; bool isXbox = false;
if (_wcsicmp(ext.c_str(), L".dds") == 0 || _wcsicmp(ext.c_str(), L".ddx") == 0) if (_wcsicmp(ext.c_str(), L".dds") == 0 || _wcsicmp(ext.c_str(), L".ddx") == 0)
{ {
#ifdef USE_XBOX_EXTS #ifdef USE_XBOX_EXTS
@ -2038,7 +2038,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
} }
} }
else else
#endif // USE_XBOX_EXTS #endif // USE_XBOX_EXTS
{ {
DDS_FLAGS ddsFlags = DDS_FLAGS_ALLOW_LARGE_FILES; DDS_FLAGS ddsFlags = DDS_FLAGS_ALLOW_LARGE_FILES;
if (dwOptions & (UINT64_C(1) << OPT_DDS_DWORD_ALIGN)) if (dwOptions & (UINT64_C(1) << OPT_DDS_DWORD_ALIGN))
@ -3750,7 +3750,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
} }
} }
else else
#endif // USE_XBOX_EXTS #endif // USE_XBOX_EXTS
{ {
DDS_FLAGS ddsFlags = DDS_FLAGS_NONE; DDS_FLAGS ddsFlags = DDS_FLAGS_NONE;
if (dwOptions & (UINT64_C(1) << OPT_USE_DX10)) if (dwOptions & (UINT64_C(1) << OPT_USE_DX10))
@ -3856,11 +3856,11 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
{ {
options.pstrName = const_cast<wchar_t*>(L"HeifCompressionMethod"); options.pstrName = const_cast<wchar_t*>(L"HeifCompressionMethod");
varValues.vt = VT_UI1; varValues.vt = VT_UI1;
#if defined(NTDDI_WIN10_CU) #if defined(NTDDI_WIN10_CU)
varValues.bVal = WICHeifCompressionNone; varValues.bVal = WICHeifCompressionNone;
#else #else
varValues.bVal = 0x1 /* WICHeifCompressionNone */; varValues.bVal = 0x1 /* WICHeifCompressionNone */;
#endif #endif
} }
else if (wicQuality >= 0.f) else if (wicQuality >= 0.f)
{ {

View File

@ -189,7 +189,7 @@ namespace
{ nullptr, 0 } { nullptr, 0 }
}; };
#define DEFFMT(fmt) { L## #fmt, DXGI_FORMAT_ ## fmt } #define DEFFMT(fmt) { L## #fmt, DXGI_FORMAT_ ## fmt }
const SValue<DXGI_FORMAT> g_pFormats[] = const SValue<DXGI_FORMAT> g_pFormats[] =
{ {
@ -354,7 +354,7 @@ namespace
{ nullptr, DXGI_FORMAT_UNKNOWN } { nullptr, DXGI_FORMAT_UNKNOWN }
}; };
#undef DEFFMT #undef DEFFMT
const SValue<uint32_t> g_pFilters[] = const SValue<uint32_t> g_pFilters[] =
{ {
@ -383,15 +383,15 @@ namespace
constexpr uint32_t CODEC_TGA = 0xFFFF0002; constexpr uint32_t CODEC_TGA = 0xFFFF0002;
constexpr uint32_t CODEC_HDR = 0xFFFF0005; constexpr uint32_t CODEC_HDR = 0xFFFF0005;
#ifdef USE_OPENEXR #ifdef USE_OPENEXR
constexpr uint32_t CODEC_EXR = 0xFFFF0008; constexpr uint32_t CODEC_EXR = 0xFFFF0008;
#endif #endif
#ifdef USE_LIBJPEG #ifdef USE_LIBJPEG
constexpr uint32_t CODEC_JPEG = 0xFFFF0009; constexpr uint32_t CODEC_JPEG = 0xFFFF0009;
#endif #endif
#ifdef USE_LIBPNG #ifdef USE_LIBPNG
constexpr uint32_t CODEC_PNG = 0xFFFF000A; constexpr uint32_t CODEC_PNG = 0xFFFF000A;
#endif #endif
const SValue<uint32_t> g_pDumpFileTypes[] = const SValue<uint32_t> g_pDumpFileTypes[] =
{ {
@ -633,18 +633,18 @@ namespace
case CODEC_HDR: case CODEC_HDR:
return SaveToHDRFile(*image, fileName); return SaveToHDRFile(*image, fileName);
#ifdef USE_OPENEXR #ifdef USE_OPENEXR
case CODEC_EXR: case CODEC_EXR:
return SaveToEXRFile(*image, fileName); return SaveToEXRFile(*image, fileName);
#endif #endif
#ifdef USE_LIBJPEG #ifdef USE_LIBJPEG
case CODEC_JPEG: case CODEC_JPEG:
return SaveToJPEGFile(*image, fileName); return SaveToJPEGFile(*image, fileName);
#endif #endif
#ifdef USE_LIBPNG #ifdef USE_LIBPNG
case CODEC_PNG: case CODEC_PNG:
return SaveToPNGFile(*image, fileName); return SaveToPNGFile(*image, fileName);
#endif #endif
default: default:
return SaveToWICFile(*image, WIC_FLAGS_NONE, GetWICCodec(static_cast<WICCodecs>(codec)), fileName); return SaveToWICFile(*image, WIC_FLAGS_NONE, GetWICCodec(static_cast<WICCodecs>(codec)), fileName);
} }

View File

@ -64,22 +64,21 @@ using Microsoft::WRL::ComPtr;
namespace namespace
{ {
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) ) #if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
template<UINT TNameLength> template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char(&name)[TNameLength]) noexcept inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char(&name)[TNameLength]) noexcept
{ {
resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name); resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);
} }
#else #else
template<UINT TNameLength> template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_ const char(&)[TNameLength]) noexcept inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_ const char(&)[TNameLength]) noexcept
{ {}
} #endif
#endif
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
// WIC Pixel Format Translation Data // WIC Pixel Format Translation Data
//------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------
struct WICTranslate struct WICTranslate
{ {
const GUID& wic; const GUID& wic;
@ -87,7 +86,8 @@ namespace
constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt) noexcept : constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt) noexcept :
wic(wg), wic(wg),
format(fmt) {} format(fmt)
{}
}; };
constexpr WICTranslate g_WICFormats[] = constexpr WICTranslate g_WICFormats[] =
@ -125,7 +125,8 @@ namespace
constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept : constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept :
source(src), source(src),
target(tgt) {} target(tgt)
{}
}; };
constexpr WICConvert g_WICConvert[] = constexpr WICConvert g_WICConvert[] =

View File

@ -49,9 +49,10 @@ namespace DirectX
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec" #pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
#endif #endif
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS);
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop

View File

@ -78,7 +78,8 @@ namespace
constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt) noexcept : constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt) noexcept :
wic(wg), wic(wg),
format(fmt) {} format(fmt)
{}
}; };
constexpr WICTranslate g_WICFormats[] = constexpr WICTranslate g_WICFormats[] =
@ -118,7 +119,8 @@ namespace
constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept : constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept :
source(src), source(src),
target(tgt) {} target(tgt)
{}
}; };
constexpr WICConvert g_WICConvert[] = constexpr WICConvert g_WICConvert[] =
@ -209,18 +211,17 @@ namespace
} }
//--------------------------------------------------------------------------------- //---------------------------------------------------------------------------------
#if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) ) #if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
template<UINT TNameLength> template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D12DeviceChild* resource, _In_z_ const wchar_t(&name)[TNameLength]) noexcept inline void SetDebugObjectName(_In_ ID3D12DeviceChild* resource, _In_z_ const wchar_t(&name)[TNameLength]) noexcept
{ {
resource->SetName(name); resource->SetName(name);
} }
#else #else
template<UINT TNameLength> template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept
{ {}
} #endif
#endif
inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept
{ {

View File

@ -63,9 +63,10 @@ namespace DirectX
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec" #pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
#endif #endif
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS);
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop

View File

@ -66,7 +66,8 @@ namespace
constexpr WICTranslate(const GUID& wg, D3DFORMAT fmt) noexcept : constexpr WICTranslate(const GUID& wg, D3DFORMAT fmt) noexcept :
wic(wg), wic(wg),
format(fmt) {} format(fmt)
{}
}; };
constexpr WICTranslate g_WICFormats[] = constexpr WICTranslate g_WICFormats[] =
@ -102,7 +103,8 @@ namespace
constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept : constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept :
source(src), source(src),
target(tgt) {} target(tgt)
{}
}; };
constexpr WICConvert g_WICConvert[] = constexpr WICConvert g_WICConvert[] =

View File

@ -45,9 +45,10 @@ namespace DirectX
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec" #pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
#endif #endif
DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS) DEFINE_ENUM_FLAG_OPERATORS(WIC_LOADER_FLAGS);
#ifdef __clang__ #ifdef __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop

View File

@ -3,28 +3,27 @@ Copyright (c) Microsoft Corporation.
Licensed under the MIT License. Licensed under the MIT License.
#> #>
function Execute-Setup { function Invoke-Setup {
# Temporary work-around while OneFuzz does not run script from setup dir # Temporary work-around while OneFuzz does not run script from setup dir
Set-Location -Path $PSScriptRoot Set-Location -Path $PSScriptRoot
Write-Log "Executing custom setup script in $(pwd)" Write-OneFuzzLog "Executing custom setup script in $(Get-Location)"
# Exclude any uploaded DLL from known DLLs # Exclude any uploaded DLL from known DLLs
gci -filter '*.dll' | Exclude-Library Get-ChildItem -filter '*.dll' | Add-Exclude-Library
# Done. Useful to know that the script did not prematurely error out # Done. Useful to know that the script did not prematurely error out
Write-Log 'Setup script finished successfully' Write-OneFuzzLog 'Setup script finished successfully'
} }
# Write log statements into the event log. # Write log statements into the event log.
function Write-Log { function Write-OneFuzzLog {
Param( Param(
[Parameter(Position=0, [Parameter(Position=0,
Mandatory, Mandatory,
ValueFromPipeline, ValueFromPipeline,
ValueFromRemainingArguments)] ValueFromRemainingArguments)]
[String[]] $Messages, [String[]] $Messages)
[Parameter()] [Int] $EventId=0)
Begin { Begin {
$EventSource = 'onefuzz-setup.ps1' $EventSource = 'onefuzz-setup.ps1'
$EventLog = 'Application' $EventLog = 'Application'
@ -34,15 +33,15 @@ function Write-Log {
} }
Process { Process {
$Messages.ForEach({ $Messages.ForEach({
Write-EventLog -LogName $EventLog -Source $EventSource -EventId $EventId -EntryType Information -Message $_ Write-EventLog -LogName $EventLog -Source $EventSource -EventId 0 -EntryType Information -Message $_
}) })
} }
End {} End {}
} }
# This function is used to exclude DLL's that the fuzzer is dependent on. The dependent DLL's # This function is used to exclude DLL's that the fuzzer is dependent on. The dependent DLL's
# have been built with ASan and copied into the setup directory along with the fuzzer. # have been built with ASan and copied into the setup directory along with the fuzzer.
function Exclude-Library { function Add-Exclude-Library {
Param( Param(
[Parameter(Position=0, [Parameter(Position=0,
Mandatory, Mandatory,
@ -59,34 +58,34 @@ function Exclude-Library {
$ExistingExclusions = @() $ExistingExclusions = @()
# Normalize DLL name to lowercase for comparison # Normalize DLL name to lowercase for comparison
if ($ExistingProperty -ne $null) { if ($null -ne $ExistingProperty) {
$ExistingExclusions = $ExistingProperty.$Name.ForEach("ToLower") $ExistingExclusions = $ExistingProperty.$Name.ForEach("ToLower")
} }
# Normalize DLL name to lowercase for comparison, remove duplicates # Normalize DLL name to lowercase for comparison, remove duplicates
$Libs = $Libraries.ForEach("ToLower") | Select-Object -Unique $Libs = $Libraries.ForEach("ToLower") | Select-Object -Unique
Write-Log "Excluding libraries $Libs" Write-OneFuzzLog "Excluding libraries $Libs"
# Discard empty strings and libraries already excluded # Discard empty strings and libraries already excluded
$Libs = $Libs.Where({$_.Length -gt 0 -and !($ExistingExclusions.Contains($_))}) $Libs = $Libs.Where({$_.Length -gt 0 -and !($ExistingExclusions.Contains($_))})
# If anything remains either add or update registry key # If anything remains either add or update registry key
if ($Libs.Length -gt 0) { if ($Libs.Length -gt 0) {
if ($ExistingProperty -eq $null) { if ($null -eq $ExistingProperty) {
# Create registry key to exclude DLLs # Create registry key to exclude DLLs
New-ItemProperty -Path $Path -Name $Name -PropertyType MultiString -Value $Libs New-ItemProperty -Path $Path -Name $Name -PropertyType MultiString -Value $Libs
Write-Log "Created known DLLs exclusions with $Libs" Write-OneFuzzLog "Created known DLLs exclusions with $Libs"
} else { } else {
# Update registry key to exclude DLLs # Update registry key to exclude DLLs
Set-ItemProperty -Path $Path -Name $Name -Value ($ExistingProperty.$Name + $Libs) Set-ItemProperty -Path $Path -Name $Name -Value ($ExistingProperty.$Name + $Libs)
Write-Log "Updated known DLLs exclusions with $Libs" Write-OneFuzzLog "Updated known DLLs exclusions with $Libs"
} }
} else { } else {
# DLLs already excluded # DLLs already excluded
Write-Log "Known DLL exclusions already exist for $Libraries" Write-OneFuzzLog "Known DLL exclusions already exist for $Libraries"
} }
} }
End {} End {}
} }
Execute-Setup Invoke-Setup