mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-08-24 08:21:41 +02:00
Add GitHub Action for super-lint (#618)
This commit is contained in:
parent
c8959b2911
commit
cb3be57e9c
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -59,27 +59,27 @@ resources:
|
|||||||
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
|
||||||
@ -292,7 +292,7 @@ jobs:
|
|||||||
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
|
||||||
@ -322,7 +322,8 @@ jobs:
|
|||||||
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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Debug'
|
displayName: 'CMake (MSVC): Build x64 Debug'
|
||||||
inputs:
|
inputs:
|
||||||
@ -334,7 +335,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
|
-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
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR'
|
displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR'
|
||||||
inputs:
|
inputs:
|
||||||
@ -346,7 +348,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
|
-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
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg'
|
displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg'
|
||||||
inputs:
|
inputs:
|
||||||
@ -358,7 +361,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
|
-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
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng'
|
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng'
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -42,29 +42,29 @@ resources:
|
|||||||
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
|
||||||
@ -186,7 +186,8 @@ jobs:
|
|||||||
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
|
||||||
|
-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:
|
||||||
@ -199,14 +200,15 @@ jobs:
|
|||||||
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_SHARED_LIBS=ON
|
-DBUILD_XBOX_EXTS_XBOXONE=ON -DBUILD_SAMPLE=OFF
|
||||||
|
-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
|
||||||
|
|
||||||
- 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
|
||||||
@ -300,7 +302,7 @@ jobs:
|
|||||||
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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -54,27 +54,27 @@ resources:
|
|||||||
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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -59,27 +59,27 @@ resources:
|
|||||||
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
|
||||||
@ -243,7 +243,7 @@ jobs:
|
|||||||
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
|
||||||
@ -273,7 +273,8 @@ jobs:
|
|||||||
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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-windows
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Debug'
|
displayName: 'CMake (MSVC): Build x64 Debug'
|
||||||
inputs:
|
inputs:
|
||||||
@ -285,7 +286,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-G "$(VS_GENERATOR)" -A x64 -B out2 -DENABLE_OPENEXR_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
|
-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
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR'
|
displayName: 'CMake (MSVC): Build x64 Debug w/ OpenEXR'
|
||||||
inputs:
|
inputs:
|
||||||
@ -297,7 +299,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-G "$(VS_GENERATOR)" -A x64 -B out3 -DENABLE_LIBJPEG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
|
-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
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg'
|
displayName: 'CMake (MSVC): Build x64 Debug w/ libjpeg'
|
||||||
inputs:
|
inputs:
|
||||||
@ -309,7 +312,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-G "$(VS_GENERATOR)" -A x64 -B out4 -DENABLE_LIBPNG_SUPPORT=ON -DBUILD_TESTING=OFF -DCMAKE_SYSTEM_VERSION=$(WIN10_SDK)
|
-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
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng'
|
displayName: 'CMake (MSVC): Build x64 Debug w/ libpng'
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -38,7 +38,7 @@ 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
|
||||||
@ -115,7 +115,7 @@ jobs:
|
|||||||
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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -42,22 +42,22 @@ 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
|
||||||
@ -120,7 +120,7 @@ jobs:
|
|||||||
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
|
||||||
@ -239,7 +239,7 @@ jobs:
|
|||||||
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
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# 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:
|
||||||
@ -61,20 +61,20 @@ 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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -67,26 +67,28 @@ 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: $(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'
|
value: 'fcd1e11b896190da01c83d5b5fb0d37b7c61585e53446c2dab0009debc3915e757213882c35e35396329338de6f0222ba012e23a5af86932db45186a225d1272'
|
||||||
- name: CompileShadersOutput
|
- name: CompileShadersOutput
|
||||||
value: '$(Build.BinariesDirectory)\Shaders'
|
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
|
||||||
@ -170,7 +172,8 @@ jobs:
|
|||||||
-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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake (MinGW32) Build
|
displayName: CMake (MinGW32) Build
|
||||||
inputs:
|
inputs:
|
||||||
@ -184,7 +187,8 @@ jobs:
|
|||||||
-B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x86
|
-B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake (MinGW32) Build w/ OpenEXR
|
displayName: CMake (MinGW32) Build w/ OpenEXR
|
||||||
inputs:
|
inputs:
|
||||||
@ -198,7 +202,8 @@ jobs:
|
|||||||
-B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x86
|
-B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake (MinGW32) Build w/ libjpeg
|
displayName: CMake (MinGW32) Build w/ libjpeg
|
||||||
inputs:
|
inputs:
|
||||||
@ -212,14 +217,15 @@ jobs:
|
|||||||
-B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x86
|
-B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x86-mingw-static
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake (MinGW32) Build w/ libpng
|
displayName: CMake (MinGW32) Build w/ libpng
|
||||||
inputs:
|
inputs:
|
||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: --build out4
|
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
|
||||||
@ -294,7 +300,8 @@ jobs:
|
|||||||
-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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake (MinGW-W64) Build
|
displayName: CMake (MinGW-W64) Build
|
||||||
inputs:
|
inputs:
|
||||||
@ -308,7 +315,8 @@ jobs:
|
|||||||
-B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
|
-B out2 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
|
||||||
-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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake (MinGW-W64) Build w/ OpenEXR
|
displayName: CMake (MinGW-W64) Build w/ OpenEXR
|
||||||
inputs:
|
inputs:
|
||||||
@ -322,7 +330,8 @@ jobs:
|
|||||||
-B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
|
-B out3 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
|
||||||
-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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake (MinGW-W64) Build w/ libjpeg
|
displayName: CMake (MinGW-W64) Build w/ libjpeg
|
||||||
inputs:
|
inputs:
|
||||||
@ -336,7 +345,8 @@ jobs:
|
|||||||
-B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
|
-B out4 -DCMAKE_BUILD_TYPE="Debug" -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64 -DBUILD_TESTING=OFF
|
||||||
-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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-mingw-static
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake (MinGW-W64) Build w/ libpng
|
displayName: CMake (MinGW-W64) Build w/ libpng
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -25,23 +25,23 @@ resources:
|
|||||||
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
|
||||||
@ -99,7 +99,7 @@ jobs:
|
|||||||
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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -25,23 +25,23 @@ resources:
|
|||||||
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
|
||||||
@ -99,7 +99,7 @@ jobs:
|
|||||||
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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -44,7 +44,7 @@ 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
|
||||||
@ -109,7 +109,7 @@ jobs:
|
|||||||
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:
|
||||||
@ -191,7 +191,7 @@ jobs:
|
|||||||
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:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -39,16 +39,16 @@ 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
|
||||||
@ -104,7 +104,7 @@ jobs:
|
|||||||
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:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -67,18 +67,18 @@ 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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -56,20 +56,24 @@ 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
|
||||||
@ -95,7 +99,9 @@ jobs:
|
|||||||
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: >
|
||||||
|
. -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF
|
||||||
|
-DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake DirectX-Headers (Build)
|
displayName: CMake DirectX-Headers (Build)
|
||||||
inputs:
|
inputs:
|
||||||
@ -127,11 +133,11 @@ jobs:
|
|||||||
targetType: inline
|
targetType: inline
|
||||||
script: |
|
script: |
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
$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 = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String
|
||||||
$filehash = $fileHash.Trim()
|
$filehash = $fileHash.Trim()
|
||||||
Write-Host "##[debug]SHA512: " $filehash
|
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
|
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +145,9 @@ jobs:
|
|||||||
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: >
|
||||||
|
-B out -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
-DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) dbg
|
displayName: CMake DirectXTex (Build) dbg
|
||||||
inputs:
|
inputs:
|
||||||
@ -149,14 +157,16 @@ jobs:
|
|||||||
displayName: CMake DirectXTex (Config) rel
|
displayName: CMake DirectXTex (Config) rel
|
||||||
inputs:
|
inputs:
|
||||||
cwd: $(Build.SourcesDirectory)
|
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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) rel
|
displayName: CMake DirectXTex (Build) rel
|
||||||
inputs:
|
inputs:
|
||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: --build out2 -v
|
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
|
||||||
@ -196,7 +206,8 @@ jobs:
|
|||||||
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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) dbg
|
displayName: CMake DirectXTex (Build) dbg
|
||||||
inputs:
|
inputs:
|
||||||
@ -208,7 +219,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-B out2 -DCMAKE_BUILD_TYPE=Release -DDIRECTX_ARCH=x64
|
-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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) rel
|
displayName: CMake DirectXTex (Build) rel
|
||||||
inputs:
|
inputs:
|
||||||
@ -220,7 +232,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64
|
-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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) w/ OpenEXR
|
displayName: CMake DirectXTex (Build) w/ OpenEXR
|
||||||
inputs:
|
inputs:
|
||||||
@ -232,7 +245,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64
|
-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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) w/ libjpeg
|
displayName: CMake DirectXTex (Build) w/ libjpeg
|
||||||
inputs:
|
inputs:
|
||||||
@ -244,7 +258,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64
|
-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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) w/ libpng
|
displayName: CMake DirectXTex (Build) w/ libpng
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -56,20 +56,24 @@ 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
|
||||||
@ -95,7 +99,9 @@ jobs:
|
|||||||
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: >
|
||||||
|
. -DDXHEADERS_BUILD_TEST=OFF -DDXHEADERS_BUILD_GOOGLE_TEST=OFF
|
||||||
|
-DCMAKE_INSTALL_PREFIX=$(LOCAL_PKG_DIR)
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake DirectX-Headers (Build)
|
displayName: CMake DirectX-Headers (Build)
|
||||||
inputs:
|
inputs:
|
||||||
@ -127,11 +133,11 @@ jobs:
|
|||||||
targetType: inline
|
targetType: inline
|
||||||
script: |
|
script: |
|
||||||
$ProgressPreference = 'SilentlyContinue'
|
$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 = Get-FileHash -Algorithm SHA512 $(LOCAL_PKG_DIR)/include/sal.h | ForEach { $_.Hash} | Out-String
|
||||||
$filehash = $fileHash.Trim()
|
$filehash = $fileHash.Trim()
|
||||||
Write-Host "##[debug]SHA512: " $filehash
|
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
|
Write-Error -Message "##[error]Computed hash does not match!" -ErrorAction Stop
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -139,7 +145,9 @@ jobs:
|
|||||||
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: >
|
||||||
|
-B out -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
-DCMAKE_PREFIX_PATH=$(LOCAL_PKG_DIR)/share;$(LOCAL_PKG_DIR)/cmake
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) dbg
|
displayName: CMake DirectXTex (Build) dbg
|
||||||
inputs:
|
inputs:
|
||||||
@ -149,14 +157,16 @@ jobs:
|
|||||||
displayName: CMake DirectXTex (Config) rel
|
displayName: CMake DirectXTex (Config) rel
|
||||||
inputs:
|
inputs:
|
||||||
cwd: $(Build.SourcesDirectory)
|
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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) rel
|
displayName: CMake DirectXTex (Build) rel
|
||||||
inputs:
|
inputs:
|
||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: --build out2 -v
|
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
|
||||||
@ -196,7 +206,8 @@ jobs:
|
|||||||
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)"
|
||||||
|
-DVCPKG_MANIFEST_DIR="$(VCPKG_MANIFEST_DIR)" -DVCPKG_TARGET_TRIPLET=x64-linux
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) dbg
|
displayName: CMake DirectXTex (Build) dbg
|
||||||
inputs:
|
inputs:
|
||||||
@ -208,7 +219,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-B out2 -DCMAKE_BUILD_TYPE=Release -DDIRECTX_ARCH=x64
|
-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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) rel
|
displayName: CMake DirectXTex (Build) rel
|
||||||
inputs:
|
inputs:
|
||||||
@ -220,7 +232,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-B out3 -DCMAKE_BUILD_TYPE=Debug -DENABLE_OPENEXR_SUPPORT=ON -DDIRECTX_ARCH=x64
|
-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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) w/ OpenEXR
|
displayName: CMake DirectXTex (Build) w/ OpenEXR
|
||||||
inputs:
|
inputs:
|
||||||
@ -232,7 +245,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-B out4 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBJPEG_SUPPORT=ON -DDIRECTX_ARCH=x64
|
-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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) w/ libjpeg
|
displayName: CMake DirectXTex (Build) w/ libjpeg
|
||||||
inputs:
|
inputs:
|
||||||
@ -244,7 +258,8 @@ jobs:
|
|||||||
cwd: $(Build.SourcesDirectory)
|
cwd: $(Build.SourcesDirectory)
|
||||||
cmakeArgs: >
|
cmakeArgs: >
|
||||||
-B out5 -DCMAKE_BUILD_TYPE=Debug -DENABLE_LIBPNG_SUPPORT=ON -DDIRECTX_ARCH=x64
|
-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
|
- task: CMake@1
|
||||||
displayName: CMake DirectXTex (Build) w/ libpng
|
displayName: CMake DirectXTex (Build) w/ libpng
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -38,7 +38,7 @@ 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
|
||||||
|
@ -54,7 +54,7 @@ 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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -38,7 +38,7 @@ 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
|
||||||
@ -56,7 +56,10 @@ jobs:
|
|||||||
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: >
|
||||||
|
-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
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build with ASan'
|
displayName: 'CMake (MSVC): Build with ASan'
|
||||||
inputs:
|
inputs:
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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:
|
||||||
@ -41,7 +41,7 @@ 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
|
||||||
@ -68,7 +68,8 @@ jobs:
|
|||||||
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: >
|
||||||
|
-G "$(VS_GENERATOR)" -A x64 -B out -DENABLE_SPECTRE_MITIGATION=ON
|
||||||
- task: CodeQL3000Init@0
|
- task: CodeQL3000Init@0
|
||||||
inputs:
|
inputs:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
@ -114,7 +115,7 @@ jobs:
|
|||||||
- task: ComponentGovernanceComponentDetection@0
|
- task: ComponentGovernanceComponentDetection@0
|
||||||
displayName: Component Detection
|
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
|
||||||
@ -130,7 +131,9 @@ jobs:
|
|||||||
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: >
|
||||||
|
-G "$(VS_GENERATOR)" -A x64 -B out
|
||||||
|
-DENABLE_SPECTRE_MITIGATION=ON -DBUILD_SHARED_LIBS=ON -DBUILD_TOOLS=OFF
|
||||||
- task: CMake@1
|
- task: CMake@1
|
||||||
displayName: 'CMake (MSVC): Build x64 Release'
|
displayName: 'CMake (MSVC): Build x64 Release'
|
||||||
inputs:
|
inputs:
|
||||||
@ -163,7 +166,7 @@ jobs:
|
|||||||
- task: ComponentGovernanceComponentDetection@0
|
- task: ComponentGovernanceComponentDetection@0
|
||||||
displayName: Component Detection
|
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
|
||||||
|
@ -6,21 +6,21 @@
|
|||||||
# 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 }}
|
||||||
@ -28,9 +28,9 @@ steps:
|
|||||||
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 }}
|
||||||
@ -38,9 +38,9 @@ steps:
|
|||||||
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 }}
|
||||||
@ -48,9 +48,9 @@ steps:
|
|||||||
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 }}
|
||||||
@ -58,9 +58,9 @@ steps:
|
|||||||
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 }}
|
||||||
@ -68,9 +68,9 @@ steps:
|
|||||||
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 }}
|
||||||
@ -78,9 +78,9 @@ steps:
|
|||||||
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 }}
|
||||||
@ -88,9 +88,9 @@ steps:
|
|||||||
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 }}
|
||||||
@ -98,9 +98,9 @@ steps:
|
|||||||
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 }}
|
||||||
@ -108,9 +108,9 @@ steps:
|
|||||||
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 }}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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
|
||||||
@ -14,7 +14,7 @@ steps:
|
|||||||
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
|
||||||
@ -22,7 +22,7 @@ steps:
|
|||||||
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
|
||||||
@ -30,7 +30,7 @@ steps:
|
|||||||
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
|
||||||
@ -38,8 +38,8 @@ steps:
|
|||||||
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
|
||||||
@ -47,7 +47,7 @@ steps:
|
|||||||
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
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# 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
|
||||||
@ -14,7 +14,7 @@ steps:
|
|||||||
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
|
||||||
@ -22,7 +22,7 @@ steps:
|
|||||||
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
|
||||||
@ -30,7 +30,7 @@ steps:
|
|||||||
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
|
||||||
@ -38,7 +38,7 @@ steps:
|
|||||||
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
|
||||||
@ -46,7 +46,7 @@ steps:
|
|||||||
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
|
||||||
@ -54,7 +54,7 @@ steps:
|
|||||||
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
|
||||||
@ -62,7 +62,7 @@ steps:
|
|||||||
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
|
||||||
@ -70,8 +70,8 @@ steps:
|
|||||||
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
|
||||||
@ -79,7 +79,7 @@ steps:
|
|||||||
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
|
||||||
|
@ -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
1
.gitattributes
vendored
@ -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
|
||||||
|
9
.github/linters/.editorconfig-checker.json
vendored
Normal file
9
.github/linters/.editorconfig-checker.json
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"Format": "github-actions",
|
||||||
|
"exclude": [
|
||||||
|
".git",
|
||||||
|
"LICENSE",
|
||||||
|
"Tests",
|
||||||
|
"Common/d3dx12.h"
|
||||||
|
]
|
||||||
|
}
|
20
.github/linters/.markdown-lint.yml
vendored
Normal file
20
.github/linters/.markdown-lint.yml
vendored
Normal 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
|
5
.github/linters/.powershell-psscriptanalyzer.psd1
vendored
Normal file
5
.github/linters/.powershell-psscriptanalyzer.psd1
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# PSScriptAnalyzerSettings.psd1
|
||||||
|
@{
|
||||||
|
Severity=@('Error','Warning')
|
||||||
|
ExcludeRules=@('PSAvoidUsingWriteHost')
|
||||||
|
}
|
17
.github/linters/.yaml-lint.yml
vendored
Normal file
17
.github/linters/.yaml-lint.yml
vendored
Normal 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
|
4
.github/workflows/bvt.yml
vendored
4
.github/workflows/bvt.yml
vendored
@ -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
|
||||||
|
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
@ -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
|
||||||
|
46
.github/workflows/lint.yml
vendored
Normal file
46
.github/workflows/lint.yml
vendored
Normal 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
|
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -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
|
||||||
|
35
.github/workflows/msbuild.yml
vendored
35
.github/workflows/msbuild.yml
vendored
@ -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,6 +37,9 @@ 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
|
||||||
@ -47,23 +50,35 @@ jobs:
|
|||||||
- 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
|
||||||
|
4
.github/workflows/msvc.yml
vendored
4
.github/workflows/msvc.yml
vendored
@ -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
|
||||||
|
16
.github/workflows/test.yml
vendored
16
.github/workflows/test.yml
vendored
@ -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
|
||||||
@ -160,8 +160,10 @@ jobs:
|
|||||||
- 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
|
||||||
|
-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'
|
||||||
@ -175,8 +177,10 @@ jobs:
|
|||||||
- 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
|
||||||
|
-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
|
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}" -DBUILD_SHARED_LIBS=ON
|
||||||
|
|
||||||
- name: 'Build (DLL)'
|
- name: 'Build (DLL)'
|
||||||
|
4
.github/workflows/uwp.yml
vendored
4
.github/workflows/uwp.yml
vendored
@ -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
|
||||||
|
28
.github/workflows/vcpkg.yml
vendored
28
.github/workflows/vcpkg.yml
vendored
@ -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,40 +43,40 @@ 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
|
||||||
@ -149,9 +149,11 @@ jobs:
|
|||||||
- 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
|
||||||
|
-DENABLE_OPENEXR_SUPPORT=ON -DENABLE_LIBJPEG_SUPPORT=ON -DENABLE_LIBPNG_SUPPORT=ON
|
||||||
-DBUILD_SHARED_LIBS=${{ matrix.shared }}
|
-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}"
|
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
|
||||||
|
|
||||||
- name: 'Build'
|
- name: 'Build'
|
||||||
|
7
.github/workflows/wsl.yml
vendored
7
.github/workflows/wsl.yml
vendored
@ -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
|
||||||
|
@ -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();
|
||||||
|
|
||||||
@ -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
|
||||||
|
@ -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&)
|
||||||
{
|
{
|
||||||
|
@ -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&)
|
||||||
{
|
{
|
||||||
|
@ -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;
|
||||||
|
@ -251,7 +251,7 @@ 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``
|
||||||
@ -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
|
||||||
|
@ -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')
|
||||||
{
|
{
|
||||||
|
@ -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,
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
@ -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");
|
||||||
|
@ -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];
|
||||||
|
@ -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)
|
||||||
{
|
{}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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)); }
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
||||||
|
@ -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_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
|
||||||
@ -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_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)
|
||||||
@ -161,8 +159,8 @@ namespace
|
|||||||
{ 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
|
||||||
};
|
};
|
||||||
|
@ -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;
|
||||||
@ -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;
|
||||||
|
@ -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[] =
|
||||||
|
@ -73,24 +73,30 @@ static const uint candidateFixUpIndex1D[32] =
|
|||||||
};
|
};
|
||||||
|
|
||||||
//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] =
|
||||||
|
{
|
||||||
|
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
|
||||||
|
};
|
||||||
|
|
||||||
//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] =
|
||||||
|
{
|
||||||
|
0, 0, 0, 1, 1, 1, 1, 2,
|
||||||
2, 2, 2, 2, 3, 3, 3, 3,
|
2, 2, 2, 2, 3, 3, 3, 3,
|
||||||
4, 4, 4, 4, 5, 5, 5, 5,
|
4, 4, 4, 4, 5, 5, 5, 5,
|
||||||
6, 6, 6, 6, 6, 7, 7, 7,
|
6, 6, 6, 6, 6, 7, 7, 7,
|
||||||
7, 8, 8, 8, 8, 9, 9, 9,
|
7, 8, 8, 8, 8, 9, 9, 9,
|
||||||
9,10,10,10,10,10,11,11,
|
9, 10,10,10,10,10,11,11,
|
||||||
11,11,12,12,12,12,13,13,
|
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);
|
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.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];
|
||||||
|
@ -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, 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, 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
|
//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,
|
2, 2, 2, 2, 3, 3, 3, 3,
|
||||||
4, 4, 4, 4, 5, 5, 5, 5,
|
4, 4, 4, 4, 5, 5, 5, 5,
|
||||||
6, 6, 6, 6, 6, 7, 7, 7,
|
6, 6, 6, 6, 6, 7, 7, 7,
|
||||||
7, 8, 8, 8, 8, 9, 9, 9,
|
7, 8, 8, 8, 8, 9, 9, 9,
|
||||||
9,10,10,10,10,10,11,11,
|
9,10,10,10,10,10,11,11,
|
||||||
11,11,12,12,12,12,13,13,
|
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
|
//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)
|
||||||
{
|
{
|
||||||
|
39
README.md
39
README.md
@ -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.
|
||||||
|
|
||||||
|
14
SECURITY.md
14
SECURITY.md
@ -18,13 +18,13 @@ You should receive a response within 24 hours. If for some reason you do not, pl
|
|||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
@ -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");
|
||||||
|
@ -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);
|
||||||
|
@ -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");
|
||||||
|
@ -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[] =
|
||||||
{
|
{
|
||||||
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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[] =
|
||||||
{
|
{
|
||||||
|
@ -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[] =
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
{
|
{
|
||||||
|
@ -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
|
||||||
|
@ -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[] =
|
||||||
|
@ -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
|
||||||
|
@ -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,7 +33,7 @@ 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 {}
|
||||||
@ -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
|
# 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user