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

@ -322,7 +322,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug'
inputs:
@ -334,7 +335,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR'
inputs:
@ -346,7 +348,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg'
inputs:
@ -358,7 +361,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng'
inputs:

View File

@ -186,7 +186,8 @@ jobs:
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out5
-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
-DBUILD_SHARED_LIBS=ON
- task: CMake@1
displayName: 'CMake (DLL): Build x64 Debug (Xbox Series X|S)'
inputs:
@ -199,7 +200,8 @@ jobs:
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out6
-DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF -DBUILD_SHARED_LIBS=ON
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF
-DBUILD_SHARED_LIBS=ON
- task: CMake@1
displayName: 'CMake (DLL): Build x64 Debug (Xbox One)'
inputs:

View File

@ -273,7 +273,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug'
inputs:
@ -285,7 +286,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR'
inputs:
@ -297,7 +299,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg'
inputs:
@ -309,7 +312,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng'
inputs:

View File

@ -78,8 +78,10 @@ variables:
value: '$(Build.SourcesDirectory)/build'
- name: WIN11_SDK
value: '10.0.22000.0'
- name: BASE_URL
value: https://github.com/brechtsanders/winlibs_mingw/releases/download
- name: URL_MINGW32
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: $(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: HASH_MINGW32
value: 'fcd1e11b896190da01c83d5b5fb0d37b7c61585e53446c2dab0009debc3915e757213882c35e35396329338de6f0222ba012e23a5af86932db45186a225d1272'
- name: CompileShadersOutput
@ -170,7 +172,8 @@ jobs:
-B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x86
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
- task: CMake@1
displayName: CMake (MinGW32) Build
inputs:
@ -184,7 +187,8 @@ jobs:
-B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x86
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
- task: CMake@1
displayName: CMake (MinGW32) Build w/ OpenEXR
inputs:
@ -198,7 +202,8 @@ jobs:
-B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x86
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
- task: CMake@1
displayName: CMake (MinGW32) Build w/ libjpeg
inputs:
@ -212,7 +217,8 @@ jobs:
-B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x86
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
- task: CMake@1
displayName: CMake (MinGW32) Build w/ libpng
inputs:
@ -294,7 +300,8 @@ jobs:
-B out -DCMAKE_BUILD_TYPE="Debug" -DDIRECTX_ARCH=x64
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
- task: CMake@1
displayName: CMake (MinGW-W64) Build
inputs:
@ -308,7 +315,8 @@ jobs:
-B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
- task: CMake@1
displayName: CMake (MinGW-W64) Build w/ OpenEXR
inputs:
@ -322,7 +330,8 @@ jobs:
-B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
- task: CMake@1
displayName: CMake (MinGW-W64) Build w/ libjpeg
inputs:
@ -336,7 +345,8 @@ jobs:
-B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
-DCMAKE_CXX_COMPILER="g++.exe" -G "MinGW Makefiles"
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
- task: CMake@1
displayName: CMake (MinGW-W64) Build w/ libpng
inputs:

View File

@ -67,6 +67,10 @@ variables:
value: '$(Build.SourcesDirectory)/build'
- name: LOCAL_PKG_DIR
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:
- job: BUILD_WSL
@ -95,7 +99,9 @@ jobs:
displayName: CMake DirectX-Headers
inputs:
cwd: DirectX-Headers
cmakeArgs: . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
cmakeArgs: >
. -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF
-DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
- task: CMake@1
displayName: CMake DirectX-Headers (Build)
inputs:
@ -127,11 +133,11 @@ jobs:
targetType: inline
script: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -OutFile $(LOCAL_PKG_DIR)/include/sal.h
Invoke-WebRequest -Uri "$(SAL_URL)" -OutFile $(LOCAL_PKG_DIR)/include/sal.h
$fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String
$filehash = $fileHash.Trim()
Write-Host "##[debug]SHA512: " $filehash
if ($fileHash -ne "1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0") {
if ($fileHash -ne "$(SAL_HASH)") {
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
}
@ -139,7 +145,9 @@ jobs:
displayName: CMake DirectXTex (Config) dbg
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
cmakeArgs: >
-B out -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
- task: CMake@1
displayName: CMake DirectXTex (Build) dbg
inputs:
@ -149,7 +157,9 @@ jobs:
displayName: CMake DirectXTex (Config) rel
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
cmakeArgs: >
-B out2 -DCMAKE_BUILD_TYPE=Release
-DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
- task: CMake@1
displayName: CMake DirectXTex (Build) rel
inputs:
@ -196,7 +206,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) dbg
inputs:
@ -208,7 +219,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out2 -DCMAKE_BUILD_TYPE=Release -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) rel
inputs:
@ -220,7 +232,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ OpenEXR
inputs:
@ -232,7 +245,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ libjpeg
inputs:
@ -244,7 +258,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ libpng
inputs:

View File

@ -67,6 +67,10 @@ variables:
value: '$(Build.SourcesDirectory)/build'
- name: LOCAL_PKG_DIR
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:
- job: BUILD_WSL
@ -95,7 +99,9 @@ jobs:
displayName: CMake DirectX-Headers
inputs:
cwd: DirectX-Headers
cmakeArgs: . -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF -DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
cmakeArgs: >
. -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF
-DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
- task: CMake@1
displayName: CMake DirectX-Headers (Build)
inputs:
@ -127,11 +133,11 @@ jobs:
targetType: inline
script: |
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/corert/master/src/Native/inc/unix/sal.h -OutFile $(LOCAL_PKG_DIR)/include/sal.h
Invoke-WebRequest -Uri "$(SAL_URL)" -OutFile $(LOCAL_PKG_DIR)/include/sal.h
$fileHash = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String
$filehash = $fileHash.Trim()
Write-Host "##[debug]SHA512: " $filehash
if ($fileHash -ne "1643571673195d9eb892d2f2ac76eac7113ef7aa0ca116d79f3e4d3dc9df8a31600a9668b7e7678dfbe5a76906f9e0734ef8d6db0903ccc68fc742dd8238d8b0") {
if ($fileHash -ne "$(SAL_HASH)") {
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
}
@ -139,7 +145,9 @@ jobs:
displayName: CMake DirectXTex (Config) dbg
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: -B out -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
cmakeArgs: >
-B out -DCMAKE_BUILD_TYPE=Debug
-DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
- task: CMake@1
displayName: CMake DirectXTex (Build) dbg
inputs:
@ -149,7 +157,9 @@ jobs:
displayName: CMake DirectXTex (Config) rel
inputs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: -B out2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
cmakeArgs: >
-B out2 -DCMAKE_BUILD_TYPE=Release
-DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
- task: CMake@1
displayName: CMake DirectXTex (Build) rel
inputs:
@ -196,7 +206,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) dbg
inputs:
@ -208,7 +219,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out2 -DCMAKE_BUILD_TYPE=Release -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) rel
inputs:
@ -220,7 +232,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ OpenEXR
inputs:
@ -232,7 +245,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ libjpeg
inputs:
@ -244,7 +258,8 @@ jobs:
cwd: $(Build.SourcesDirectory)
cmakeArgs: >
-B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -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)"
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
- task: CMake@1
displayName: CMake DirectXTex (Build) w/ libpng
inputs:

View File

@ -56,7 +56,10 @@ jobs:
displayName: 'CMake (MSVC): Config with ASan'
inputs:
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: >
-G "$(VS_GENERATOR)" -A x64 -B out
-DCMAKE_SYSTEM_VERSION=$(WIN11_SDK) -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF
-DBUILD_FUZZING=ON -DBUILD_TESTING=OFF
- task: CMake@1
displayName: 'CMake (MSVC): Build with ASan'
inputs:

View File

@ -68,7 +68,8 @@ jobs:
displayName: 'CMake (MSVC): Config x64'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON'
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON
- task: CodeQL3000Init@0
inputs:
Enabled: true
@ -130,7 +131,9 @@ jobs:
displayName: 'CMake (MSVC): Config x64'
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: '-G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF'
cmakeArgs: >
-G "$(VS_GENERATOR)" -A x64 -B out
-DENABLE_SPECTRE_MITIGATION=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF
- task: CMake@1
displayName: 'CMake (MSVC): Build x64 Release'
inputs:

View File

@ -20,7 +20,7 @@ parameters:
steps:
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} pcdbg
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -30,7 +30,7 @@ steps:
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} pcrel
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -40,7 +40,7 @@ steps:
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} xbdbg
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -50,7 +50,7 @@ steps:
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} xbrel
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -60,7 +60,7 @@ steps:
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} scardbg
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -70,7 +70,7 @@ steps:
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} scarrel
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -80,7 +80,7 @@ steps:
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} dbg
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -90,7 +90,7 @@ steps:
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} rel
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -100,7 +100,7 @@ steps:
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} scardbg
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
@ -110,7 +110,7 @@ steps:
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} scarrel
continueOnError: True
continueOnError: true
inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}

View File

@ -1,5 +1,13 @@
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}]
indent_size = 4
indent_style = space

1
.gitattributes vendored
View File

@ -14,6 +14,7 @@
*.vcxproj eol=crlf
*.filters eol=crlf
*.sln eol=crlf
*.yml eol=crlf
# Explicitly declare resource files as 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:
push:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets
- build/*.xvd
pull_request:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE

View File

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

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:
push:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets
- build/*.xvd
pull_request:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE

View File

@ -7,7 +7,7 @@ name: MSBuild
on:
push:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -15,7 +15,7 @@ on:
- '.nuget/*'
- build/*
pull_request:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -28,7 +28,7 @@ permissions:
jobs:
build:
runs-on: windows-${{ matrix.vs }}
runs-on: windows-2022 # has v142 tools but not v142 spectre libs
strategy:
fail-fast: false
@ -37,6 +37,9 @@ jobs:
vs: [2019, 2022]
build_type: [Debug, Release]
platform: [x86, x64, ARM64]
exclude:
- vs: 2019
platform: ARM64
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@ -47,23 +50,35 @@ jobs:
- if: matrix.platform != 'ARM64'
name: Build
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)'
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'
name: 'Build (UWP)'
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)'
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)'
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:
push:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets
- build/*.xvd
pull_request:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE

View File

@ -7,7 +7,7 @@ name: 'CTest (Windows)'
on:
push:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets
- build/*.xvd
pull_request:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -160,8 +160,10 @@ jobs:
- name: 'Configure CMake'
working-directory: ${{ github.workspace }}
run: >
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF
-DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-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'
@ -175,8 +177,10 @@ jobs:
- name: 'Configure CMake (DLL)'
working-directory: ${{ github.workspace }}
run: >
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
cmake --preset=${{ matrix.build_type }} -DBUILD_TESTING=ON -DBUILD_TOOLS=OFF -DBUILD_SAMPLE=OFF
-DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=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)'

View File

@ -7,7 +7,7 @@ name: 'CMake (UWP)'
on:
push:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets
- build/*.xvd
pull_request:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE

View File

@ -7,7 +7,7 @@ name: 'CMake (Windows using VCPKG)'
on:
push:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -18,7 +18,7 @@ on:
- build/*.targets
- build/*.xvd
pull_request:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -43,40 +43,40 @@ jobs:
toolver: ['14.29', '14']
build_type: [x64-Debug-VCPKG]
arch: [amd64]
shared: [OFF]
shared: ['OFF']
include:
- toolver: '14'
build_type: x64-Debug-Clang-VCPKG
arch: amd64
shared: OFF
shared: 'OFF'
- toolver: '14'
build_type: x86-Debug-VCPKG
arch: amd64_x86
shared: OFF
shared: 'OFF'
- toolver: '14'
build_type: arm64-Debug-VCPKG
arch: amd64_arm64
shared: OFF
shared: 'OFF'
- toolver: '14'
build_type: arm64ec-Debug-VCPKG
arch: amd64_arm64
shared: OFF
shared: 'OFF'
- toolver: '14'
build_type: x64-Debug-MinGW
arch: amd64
shared: OFF
shared: 'OFF'
- toolver: '14'
build_type: x64-Release-MinGW
arch: amd64
shared: OFF
shared: 'OFF'
- toolver: '14'
build_type: x64-Debug-MinGW
arch: amd64
shared: ON
shared: 'ON'
- toolver: '14'
build_type: x64-Release-MinGW
arch: amd64
shared: ON
shared: 'ON'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@ -149,9 +149,11 @@ jobs:
- name: 'Configure CMake'
working-directory: ${{ github.workspace }}
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
-DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
-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}"
- name: 'Build'

View File

@ -7,7 +7,7 @@ name: 'CMake (WSL)'
on:
push:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -20,7 +20,7 @@ on:
- build/*.targets
- build/*.xvd
pull_request:
branches: [ "main" ]
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
@ -33,6 +33,9 @@ on:
- build/*.targets
- build/*.xvd
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest

View File

@ -169,7 +169,8 @@ namespace
{
public:
OutputStream(HANDLE hFile, const char fileName[]) :
OStream(fileName), m_hFile(hFile) {}
OStream(fileName), m_hFile(hFile)
{}
OutputStream(const OutputStream&) = delete;
OutputStream& operator = (const OutputStream&) = delete;

View File

@ -62,9 +62,13 @@ namespace Xbox
{
public:
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
: 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& __cdecl operator= (XboxImage&& moveFrom) noexcept;

View File

@ -251,7 +251,7 @@ Release available for download on [GitHub](https://github.com/microsoft/DirectXT
### June 1, 2020
* 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 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``
@ -564,9 +564,9 @@ Release available for download on [GitHub](https://github.com/microsoft/DirectXT
### June 15, 2013
* Custom filtering implementation for **Resize** & **GenerateMipMaps(3D)** - Point, Box, Linear, Cubic, and Triangle
+ ``TEX_FILTER_TRIANGLE`` finite low-pass triangle filter
+ ``TEX_FILTER_WRAP``, ``TEX_FILTER_MIRROR`` texture semantics for custom filtering
+ ``TEX_FILTER_BOX`` alias for ``TEX_FILTER_FANT WIC``
* ``TEX_FILTER_TRIANGLE`` finite low-pass triangle filter
* ``TEX_FILTER_WRAP``, ``TEX_FILTER_MIRROR`` texture semantics for custom filtering
* ``TEX_FILTER_BOX`` alias for ``TEX_FILTER_FANT WIC``
* Ordered and error diffusion dithering for non-WIC conversion
* sRGB gamma correct custom filtering and conversion
* ``DDS_FLAGS_EXPAND_LUMINANCE`` - Reader conversion option for L8, L16, and A8L8 legacy DDS files

View File

@ -153,8 +153,7 @@ namespace
#else
template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_ const char(&)[TNameLength]) noexcept
{
}
{}
#endif
//--------------------------------------------------------------------------------------

View File

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

View File

@ -183,8 +183,7 @@ namespace
#else
template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept
{
}
{}
#endif
inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept

View File

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

View File

@ -101,8 +101,7 @@ GPUCompressBC::GPUCompressBC() noexcept :
m_bc7_mode137(false),
m_width(0),
m_height(0)
{
}
{}
//-------------------------------------------------------------------------------------

View File

@ -441,9 +441,13 @@ namespace DirectX
{
public:
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
: 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& __cdecl operator= (ScratchImage&& moveFrom) noexcept;
@ -537,8 +541,7 @@ namespace DirectX
width(tile.WidthInTexels),
height(tile.HeightInTexels),
depth(tile.DepthInTexels)
{
}
{}
void GetTileShape11(D3D11_TILE_SHAPE& tile) const
{
@ -553,8 +556,7 @@ namespace DirectX
width(tile.WidthInTexels),
height(tile.HeightInTexels),
depth(tile.DepthInTexels)
{
}
{}
void GetTileShape12(D3D12_TILE_SHAPE& tile) const
{

View File

@ -14,17 +14,27 @@
//=====================================================================================
// Bitmask flags enumerator operators
//=====================================================================================
DEFINE_ENUM_FLAG_OPERATORS(CP_FLAGS)
DEFINE_ENUM_FLAG_OPERATORS(DDS_FLAGS)
DEFINE_ENUM_FLAG_OPERATORS(TGA_FLAGS)
DEFINE_ENUM_FLAG_OPERATORS(WIC_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 push
#pragma clang diagnostic ignored "-Wdeprecated-dynamic-exception-spec"
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
#endif
DEFINE_ENUM_FLAG_OPERATORS(CP_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(DDS_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(TGA_FLAGS);
DEFINE_ENUM_FLAG_OPERATORS(WIC_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
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

@ -105,19 +105,18 @@ namespace
{ 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_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND
| CONV_FLAGS_NOALPHA
| CONV_FLAGS_888, DDSPF_R8G8B8 }, // D3DFMT_R8G8B8
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_NOALPHA | CONV_FLAGS_888,
DDSPF_R8G8B8 }, // D3DFMT_R8G8B8
{ 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
| CONV_FLAGS_NOALPHA, DDSPF_X1R5G5B5 }, // D3DFMT_X1R5G5B5
{ DXGI_FORMAT_B5G5R5A1_UNORM, CONV_FLAGS_5551 | CONV_FLAGS_NOALPHA,
DDSPF_X1R5G5B5 }, // D3DFMT_X1R5G5B5
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND
| CONV_FLAGS_8332, DDSPF_A8R3G3B2 }, // D3DFMT_A8R3G3B2
{ DXGI_FORMAT_B5G6R5_UNORM, CONV_FLAGS_EXPAND
| CONV_FLAGS_332, DDSPF_R3G3B2 }, // D3DFMT_R3G3B2
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_8332,
DDSPF_A8R3G3B2 }, // D3DFMT_A8R3G3B2
{ DXGI_FORMAT_B5G6R5_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_332,
DDSPF_R3G3B2 }, // D3DFMT_R3G3B2
{ DXGI_FORMAT_R8_UNORM, CONV_FLAGS_NONE, DDSPF_L8 }, // D3DFMT_L8
{ DXGI_FORMAT_R16_UNORM, CONV_FLAGS_NONE, DDSPF_L16 }, // D3DFMT_L16
@ -142,17 +141,16 @@ namespace
{ 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
| CONV_FLAGS_PAL8
| 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, { sizeof(DDS_PIXELFORMAT), DDS_PAL8, 0, 8, 0, 0, 0, 0 } }, // D3DFMT_P8
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_PAL8 | 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,
{ 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_NOALPHA
| CONV_FLAGS_4444, DDSPF_X4R4G4B4 }, // D3DFMT_X4R4G4B4 (uses DXGI 1.2 format)
{ DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_EXPAND
| CONV_FLAGS_44, DDSPF_A4L4 }, // D3DFMT_A4L4 (uses DXGI 1.2 format)
{ DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_NOALPHA | CONV_FLAGS_4444,
DDSPF_X4R4G4B4 }, // D3DFMT_X4R4G4B4 (uses DXGI 1.2 format)
{ DXGI_FORMAT_B4G4R4A4_UNORM, CONV_FLAGS_EXPAND | CONV_FLAGS_44,
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_SWIZZLE, DDSPF_UYVY }, // D3DFMT_UYVY (uses DXGI 1.2 format)
@ -161,8 +159,8 @@ namespace
{ DXGI_FORMAT_R8G8B8A8_SNORM, CONV_FLAGS_NONE, DDSPF_Q8W8V8U8 }, // D3DFMT_Q8W8V8U8
{ DXGI_FORMAT_R16G16_SNORM, CONV_FLAGS_NONE, DDSPF_V16U16 }, // D3DFMT_V16U16
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_L6V5U5
| CONV_FLAGS_EXPAND, DDSPF_L6V5U5 }, // D3DFMT_L6V5U5
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_L6V5U5 | CONV_FLAGS_EXPAND,
DDSPF_L6V5U5 }, // D3DFMT_L6V5U5
{ DXGI_FORMAT_R8G8B8A8_UNORM, CONV_FLAGS_L8U8V8, DDSPF_X8L8V8U8 }, // D3DFMT_X8L8V8U8
{ DXGI_FORMAT_R10G10B10A2_UNORM, CONV_FLAGS_WUV10, DDSPF_A2W10V10U10 }, // D3DFMT_A2W10V10U10
};

View File

@ -49,7 +49,8 @@ namespace
constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt, bool isrgb) noexcept :
wic(wg),
format(fmt),
srgb(isrgb) {}
srgb(isrgb)
{}
};
constexpr WICTranslate g_WICFormats[] =

View File

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

View File

@ -73,24 +73,30 @@ static const uint candidateFixUpIndex1D[32] =
};
//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] =
{
0,0,0,0,0,1,1,1,
1,1,1,1,1,1,2,2,
2,2,2,2,2,2,2,3,
3,3,3,3,3,3,3,3,
3,4,4,4,4,4,4,4,
4,4,5,5,5,5,5,5,
5,5,5,6,6,6,6,6,
6,6,6,6,7,7,7,7 };
6,6,6,6,7,7,7,7
};
//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] =
{
0, 0, 0, 1, 1, 1, 1, 2,
2, 2, 2, 2, 3, 3, 3, 3,
4, 4, 4, 4, 5, 5, 5, 5,
6, 6, 6, 6, 6, 7, 7, 7,
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 };
13,13,14,14,14,14,15,15
};
static const float3 RGB2LUM = float3(0.2126f, 0.7152f, 0.0722f);
@ -2250,7 +2256,6 @@ void block_package(inout uint4 block, int2x3 endPoint, uint mode_type) // for mo
block.xy = 0;
block.z &= 0xFFFFFFFE;
if (mode_type == candidateModeFlag[10])
{
/* block.x |= candidateModeMemory[10];

View File

@ -142,37 +142,49 @@ static const uint2 candidateFixUpIndex1DOrdered[128] = //Same with candidateFixU
// {2,3}, //color index and alpha index can exchange
// {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, 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} };
{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
static const uint aStep[3][64] = { { 0, 0, 0, 1, 1, 1, 1, 2,
static const uint aStep[3][64] =
{
{
0, 0, 0, 1, 1, 1, 1, 2,
2, 2, 2, 2, 3, 3, 3, 3,
4, 4, 4, 4, 5, 5, 5, 5,
6, 6, 6, 6, 6, 7, 7, 7,
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 },
13,13,14,14,14,14,15,15
},
//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,
2,2,2,2,2,2,2,3,
3,3,3,3,3,3,3,3,
3,4,4,4,4,4,4,4,
4,4,5,5,5,5,5,5,
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
{ 0,0,0,0,0,0,0,0,
{
0,0,0,0,0,0,0,0,
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,2,2,2,2,2,2,2,
2,2,2,2,2,2,2,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
}
};
cbuffer cbCS : register(b0)
{

View File

@ -6,7 +6,7 @@ http://go.microsoft.com/fwlink/?LinkId=248926
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.
@ -18,55 +18,54 @@ These components are designed to work without requiring any content from the leg
* ``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.
* ``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\``
+ Contains shared source headers used by the DirectXTex library and tools.
* Contains shared source headers used by the DirectXTex library and tools.
* ``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\``
+ 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\``
+ 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\``
+ 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\``
+ 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\``
+ 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\``
+ 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)
> 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\``
+ Contains miscellaneous build files and scripts.
* Contains miscellaneous build files and scripts.
## 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 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``.
@ -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.
* 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.
@ -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|
|-bgcolor|--gif-bg-color|-fixbc4x4|--fix-bc-4x4|-ignoremips|--ignore-mips|
|-swizzle|--swizzle|-ignoremips|--ignore-mips|-permissive|--permissive|
|-stripmips|--strip-mips|-inverty|--invert-y|-targetx|--target-x||-targety|--target-y|
|||-keepcoverage|--keep-coverage|||
|-stripmips|--strip-mips|-inverty|--invert-y|-targetx|--target-x|
|||-keepcoverage|--keep-coverage|-targety|--target-y|
|||-permissive|--permissive|||
|||-reconstructz|--reconstruct-z|||
|||-rotatecolor|--rotate-color|||
@ -129,7 +128,7 @@ For a full change history, see [CHANGELOG.md](https://github.com/microsoft/Direc
## 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.

View File

@ -73,8 +73,7 @@ namespace
#else
template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_ const char(&)[TNameLength]) noexcept
{
}
{}
#endif
//-------------------------------------------------------------------------------------
@ -87,7 +86,8 @@ namespace
constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt) noexcept :
wic(wg),
format(fmt) {}
format(fmt)
{}
};
constexpr WICTranslate g_WICFormats[] =
@ -125,7 +125,8 @@ namespace
constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept :
source(src),
target(tgt) {}
target(tgt)
{}
};
constexpr WICConvert g_WICConvert[] =

View File

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

View File

@ -78,7 +78,8 @@ namespace
constexpr WICTranslate(const GUID& wg, DXGI_FORMAT fmt) noexcept :
wic(wg),
format(fmt) {}
format(fmt)
{}
};
constexpr WICTranslate g_WICFormats[] =
@ -118,7 +119,8 @@ namespace
constexpr WICConvert(const GUID& src, const GUID& tgt) noexcept :
source(src),
target(tgt) {}
target(tgt)
{}
};
constexpr WICConvert g_WICConvert[] =
@ -218,8 +220,7 @@ namespace
#else
template<UINT TNameLength>
inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept
{
}
{}
#endif
inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept

View File

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

View File

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

View File

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

View File

@ -3,28 +3,27 @@ Copyright (c) Microsoft Corporation.
Licensed under the MIT License.
#>
function Execute-Setup {
function Invoke-Setup {
# Temporary work-around while OneFuzz does not run script from setup dir
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
gci -filter '*.dll' | Exclude-Library
Get-ChildItem -filter '*.dll' | Add-Exclude-Library
# 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.
function Write-Log {
function Write-OneFuzzLog {
Param(
[Parameter(Position=0,
Mandatory,
ValueFromPipeline,
ValueFromRemainingArguments)]
[String[]] $Messages,
[Parameter()] [Int] $EventId=0)
[String[]] $Messages)
Begin {
$EventSource = 'onefuzz-setup.ps1'
$EventLog = 'Application'
@ -34,7 +33,7 @@ function Write-Log {
}
Process {
$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 {}
@ -42,7 +41,7 @@ function Write-Log {
# 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.
function Exclude-Library {
function Add-Exclude-Library {
Param(
[Parameter(Position=0,
Mandatory,
@ -59,34 +58,34 @@ function Exclude-Library {
$ExistingExclusions = @()
# Normalize DLL name to lowercase for comparison
if ($ExistingProperty -ne $null) {
if ($null -ne $ExistingProperty) {
$ExistingExclusions = $ExistingProperty.$Name.ForEach("ToLower")
}
# Normalize DLL name to lowercase for comparison, remove duplicates
$Libs = $Libraries.ForEach("ToLower") | Select-Object -Unique
Write-Log "Excluding libraries $Libs"
Write-OneFuzzLog "Excluding libraries $Libs"
# Discard empty strings and libraries already excluded
$Libs = $Libs.Where({$_.Length -gt 0 -and !($ExistingExclusions.Contains($_))})
# If anything remains either add or update registry key
if ($Libs.Length -gt 0) {
if ($ExistingProperty -eq $null) {
if ($null -eq $ExistingProperty) {
# Create registry key to exclude DLLs
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 {
# Update registry key to exclude DLLs
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 {
# DLLs already excluded
Write-Log "Known DLL exclusions already exist for $Libraries"
Write-OneFuzzLog "Known DLL exclusions already exist for $Libraries"
}
}
End {}
}
Execute-Setup
Invoke-Setup