Compare commits

...

16 Commits

Author SHA1 Message Date
dependabot[bot]
352dd3d3e0
Bump github/codeql-action from 3.28.18 to 3.29.2 (#621) 2025-07-02 12:07:42 -07:00
dependabot[bot]
e8c2e30f19
Bump github/codeql-action from 3.28.16 to 3.28.18 (#619) 2025-06-02 20:50:02 -07:00
Chuck Walbourn
cb3be57e9c
Add GitHub Action for super-lint (#618) 2025-06-02 17:49:20 -07:00
Chuck Walbourn
c8959b2911
GitHub Actions windows-2019 runner is being retired (#617)
Some checks failed
CTest (Windows) / build (amd64, x64-Debug, 14) (push) Has been cancelled
CTest (Windows) / build (amd64, x64-Debug, 14.29) (push) Has been cancelled
CTest (Windows) / build (amd64, x64-Debug-Clang, 14) (push) Has been cancelled
CTest (Windows) / build (amd64, x64-Release, 14) (push) Has been cancelled
CTest (Windows) / build (amd64, x64-Release, 14.29) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, 14) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, 14.29) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, 14) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, OFF, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, OFF, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, ON, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, OFF, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, OFF, 14.29) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, OFF, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, ON, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, OFF, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, OFF, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, OFF, 14) (push) Has been cancelled
2025-05-29 19:39:23 -07:00
Chuck Walbourn
169f7cf350
Cleanup of ADO pipeline YAML files (#615)
Some checks failed
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Release, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug-Clang, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
2025-05-23 13:00:15 -07:00
Chuck Walbourn
652cc82b35
Enable some additional C++20 and C++23 compat warnings with clang (#614)
Some checks failed
CTest (Windows) / build (amd64_arm64, arm64-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug-Clang, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
2025-05-15 22:25:44 -07:00
Chuck Walbourn
e909fa68d0
EncodeDDSHeader for Xbox can't take a nullptr (#613)
Some checks failed
CTest (Windows) / build (amd64, x64-Release-Clang, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug-Clang, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
2025-05-07 16:01:43 -07:00
Chuck Walbourn
57564efee2
Fixed -Wmissing-include-dirs warnings (#611)
Some checks failed
CTest (Windows) / build (amd64_arm64, arm64ec-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug-Clang, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
2025-05-06 19:46:35 -07:00
dependabot[bot]
bbe9da11fb
Bump github/codeql-action from 3.28.13 to 3.28.16 (#610)
Some checks failed
CTest (Windows) / build (amd64_arm64, arm64-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_arm64, arm64ec-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug-Clang, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
2025-05-01 09:26:47 -07:00
Chuck Walbourn
82e094cf7c
Fix some ADO build failures (#609)
Some checks failed
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 14) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 14) (push) Has been cancelled
2025-04-22 11:33:07 -07:00
Chuck Walbourn
8e1cea9d20
Update ADO YAML to use shared variables (#608)
Some checks failed
CMake (WSL) / build (x64-Release-Linux, 12) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 14) (push) Has been cancelled
2025-04-17 16:24:55 -07:00
Chuck Walbourn
318d841cd3
CMake check for mismatch of toolset and arch setting (#605)
Some checks failed
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 14) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 14) (push) Has been cancelled
2025-04-15 13:02:22 -07:00
dependabot[bot]
48ae743942
Bump github/codeql-action from 3.28.10 to 3.28.13 (#603)
Some checks failed
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 14) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 14) (push) Has been cancelled
2025-04-01 23:06:15 -07:00
Chuck Walbourn
9823b46e7f
ADO pipeline removal (#604) 2025-04-01 17:22:10 -07:00
Chuck Walbourn
ad55a75d05
Migrate ADO pipelines to .azuredevops folder (#602)
Some checks failed
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 12) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Debug-UWP-Clang) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 13) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 14) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 14) (push) Has been cancelled
2025-03-31 15:29:45 -07:00
Chuck Walbourn
4e7d99e7ee
Code review feedback for DLL declimport/export (#601)
Some checks failed
CTest (Windows) / build (amd64_x86, x86-Debug, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Debug-Clang, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2019) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release, windows-2022) (push) Has been cancelled
CTest (Windows) / build (amd64_x86, x86-Release-Clang, windows-2022) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-Clang-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (UWP) / build (amd64, x64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_arm64, arm64-Release-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Debug-UWP-Clang) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP) (push) Has been cancelled
CMake (UWP) / build (amd64_x86, x86-Release-UWP-Clang) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Debug-Linux, 14) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2019, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64, x64-Release-MinGW, windows-2022, ON) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_arm64, arm64ec-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (Windows using VCPKG) / build (amd64_x86, x86-Debug-VCPKG, windows-2022, OFF) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 12) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 13) (push) Has been cancelled
CMake (WSL) / build (x64-Release-Linux, 14) (push) Has been cancelled
2025-03-28 17:23:40 -07:00
106 changed files with 6171 additions and 6100 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,92 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# https://go.microsoft.com/fwlink/?LinkId=248926
# OneFuzz code coverage pipeline
pr: none
trigger: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
- repository: testRepo
name: walbourn/directxtextest
type: github
endpoint: microsoft
ref: refs/heads/main
pool:
vmImage: windows-latest
parameters:
- name: sasUrl
type: string
displayName: SAS URL
- name: branch
type: string
displayName: Branch
- name: jobID
type: string
displayName: OneFuzz Job ID
- name: buildDate
type: string
displayName: Build Date
- name: commitID
type: string
displayName: Commit ID
variables:
- name: coverage-file
value: cobertura-coverage.xml
- name: job-ID
value: ${{ parameters.jobID }}
- name: build-date
value: ${{ parameters.buildDate }}
- name: branch
value: ${{ parameters.branch }}
- name: sas-url
value: ${{ parameters.sasUrl }}
- name: commit-ID
value: ${{ parameters.commitID }}
jobs:
- job: prod
displayName: Prod Task
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchTags: false
fetchDepth: 1
path: 's'
- checkout: testRepo
displayName: Fetch Tests
clean: true
fetchTags: false
fetchDepth: 1
path: 's/Tests'
- powershell: |
Write-Host "Job ID: $(job-ID), Build Date: $(build-date), Branch: $(branch)"
$SASUrl = [System.Uri]::new("$(sas-url)")
azcopy cp $SASUrl.AbsoluteUri ./ --recursive
$ContainerName = $SASURL.LocalPath.Split("/")[1]
Write-Host "##vso[task.setvariable variable=container-name;]$ContainerName"
cd $ContainerName
$size = ((Get-Item .\$(coverage-file)).length)
if ($size -eq 0) {
Write-Host "Cobertura coverage XML is empty."
exit 1
}
displayName: 'Get code coverage from OneFuzz'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: ./$(container-name)\$(coverage-file)
pathToSources: $(Build.SourcesDirectory)
displayName: 'Generate coverage report'

View File

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

View File

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

View File

@ -0,0 +1,20 @@
name: approver_count
description: Approver count policy for mscodehub/DirectXTex/DirectXTex repository
resource: repository
where:
configuration:
approverCountPolicySettings:
isBlocking: true
requireMinimumApproverCount: 1
creatorVoteCounts: false
allowDownvotes: false
sourcePushOptions:
resetOnSourcePush: false
requireVoteOnLastIteration: true
requireVoteOnEachIteration: false
resetRejectionsOnSourcePush: false
blockLastPusherVote: true
branchNames:
- refs/heads/release
- refs/heads/main
displayName: mscodehub/DirectXTex/DirectXTex Approver Count Policy

View File

@ -0,0 +1,120 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Template used by GitHub-GDK-* pipelines
parameters:
- name: msVersion
type: string
values:
- '16.0'
- '17.0'
- name: vsYear
type: number
values:
- 2019
- 2022
steps:
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} pcdbg
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Desktop.x64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} pcrel
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Desktop.x64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} xbdbg
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Xbox.XboxOne.x64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} xbrel
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Xbox.XboxOne.x64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} scardbg
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Xbox.Scarlett.x64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_${{ parameters.vsYear }} scarrel
continueOnError: true
inputs:
solution: DirectXTex_GDK_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: Gaming.Xbox.Scarlett.x64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} dbg
continueOnError: true
inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: x64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} rel
continueOnError: true
inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: x64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} scardbg
continueOnError: true
inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: x64
configuration: Debug_Scarlett
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_${{ parameters.vsYear }} scarrel
continueOnError: true
inputs:
solution: DirectXTex_GXDK_PC_${{ parameters.vsYear }}.sln
vsVersion: ${{ parameters.msVersion }}
platform: x64
configuration: Release_Scarlett
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:GDKEditionNumber=$(GDK_EDITION)

View File

@ -0,0 +1,57 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Template used by SDK-release and SDK-prerelease pipelines
steps:
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
platform: x86
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32rel
inputs:
solution: DirectXTex_Windows10_2022.sln
platform: x86
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
platform: x64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64rel
inputs:
solution: DirectXTex_Windows10_2022.sln
platform: x64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
# Windows on ARM 32-bit is deprecated. https://learn.microsoft.com/windows/arm/arm32-to-arm64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
platform: ARM64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64rel
inputs:
solution: DirectXTex_Windows10_2022.sln
platform: ARM64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64

View File

@ -0,0 +1,89 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Template used by SDK-release and SDK-prerelease pipelines
steps:
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
platform: x86
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019.sln
platform: x86
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
platform: x64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019.sln
platform: x64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
platform: x86
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
platform: x86
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
platform: x64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
platform: x64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
# VS 2019 for Win32 on ARM64 is out of support.
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
platform: ARM64
configuration: Debug
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
platform: ARM64
configuration: Release
msbuildArchitecture: x64
msbuildArgs: /p:PreferredToolArchitecture=x64

View File

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

1
.gitattributes vendored
View File

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

View File

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

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

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

View File

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

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

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

View File

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

View File

@ -1,66 +1,78 @@
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License. # Licensed under the MIT License.
# #
# http://go.microsoft.com/fwlink/?LinkId=248926 # http://go.microsoft.com/fwlink/?LinkId=248926
name: "CodeQL" name: "CodeQL"
on: on:
push: push:
branches: [ "main" ] branches: "main"
pull_request: paths-ignore:
branches: [ "main" ] - '*.md'
paths-ignore: - LICENSE
- '*.md' - '.azuredevops/**'
- LICENSE - '.nuget/*'
- '.nuget/*' - build/*.cmd
- build/*.cmd - build/*.json
- build/*.json - build/*.props
- build/*.props - build/*.ps1
- build/*.ps1 - build/*.targets
- build/*.targets - build/*.xvd
- build/*.yml pull_request:
schedule: branches: "main"
- cron: '43 3 * * 3' paths-ignore:
- '*.md'
permissions: - LICENSE
contents: read - '.azuredevops/**'
- '.nuget/*'
jobs: - build/*.cmd
analyze: - build/*.json
name: Analyze (C/C++) - build/*.props
runs-on: windows-latest - build/*.ps1
timeout-minutes: 360 - build/*.targets
permissions: - build/*.xvd
actions: read # for github/codeql-action/init to get workflow details schedule:
contents: read # for actions/checkout to fetch code - cron: '43 3 * * 3'
security-events: write # for github/codeql-action/autobuild to send a status report
packages: read permissions:
contents: read
steps:
- name: Checkout repository jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 analyze:
name: Analyze (C/C++)
- name: 'Install Ninja' runs-on: windows-latest
run: choco install ninja timeout-minutes: 360
permissions:
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
- name: Initialize CodeQL security-events: write # for github/codeql-action/autobuild to send a status report
uses: github/codeql-action/init@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10 packages: read
with:
languages: c-cpp steps:
build-mode: manual - name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Configure CMake'
working-directory: ${{ github.workspace }} - name: 'Install Ninja'
run: cmake --preset=x64-Debug run: choco install ninja
- name: 'Build' - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
working-directory: ${{ github.workspace }}
run: cmake --build out\build\x64-Debug - name: Initialize CodeQL
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
- name: Perform CodeQL Analysis with:
uses: github/codeql-action/analyze@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10 languages: c-cpp
with: build-mode: manual
category: "/language:c-cpp"
- name: 'Configure CMake'
working-directory: ${{ github.workspace }}
run: cmake --preset=x64-Debug
- name: 'Build'
working-directory: ${{ github.workspace }}
run: cmake --build out\build\x64-Debug
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
with:
category: "/language:c-cpp"

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

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

View File

@ -7,125 +7,138 @@ name: 'CMake (Windows)'
on: on:
push: push:
branches: [ "main" ] branches: "main"
pull_request:
branches: [ "main" ]
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.azuredevops/**'
- '.nuget/*' - '.nuget/*'
- build/*.cmd - build/*.cmd
- build/*.json - build/*.json
- build/*.props - build/*.props
- build/*.ps1 - build/*.ps1
- build/*.targets - build/*.targets
- build/*.yml - build/*.xvd
pull_request:
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
- '.azuredevops/**'
- '.nuget/*'
- build/*.cmd
- build/*.json
- build/*.props
- build/*.ps1
- build/*.targets
- build/*.xvd
permissions: permissions:
contents: read contents: read
jobs: jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: windows-2022
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: [windows-2019, windows-2022] toolver: ['14.29', '14']
build_type: [x64-Debug, x64-Release] build_type: [x64-Debug, x64-Release]
arch: [amd64] arch: [amd64]
include: include:
- os: windows-2019 - toolver: '14.29'
build_type: x86-Debug build_type: x86-Debug
arch: amd64_x86 arch: amd64_x86
- os: windows-2019 - toolver: '14.29'
build_type: x86-Release build_type: x86-Release
arch: amd64_x86 arch: amd64_x86
- os: windows-2022 - toolver: '14'
build_type: x86-Debug build_type: x86-Debug
arch: amd64_x86 arch: amd64_x86
- os: windows-2022 - toolver: '14'
build_type: x86-Release build_type: x86-Release
arch: amd64_x86 arch: amd64_x86
- os: windows-2022 - toolver: '14'
build_type: arm64-Debug build_type: arm64-Debug
arch: amd64_arm64 arch: amd64_arm64
- os: windows-2022 - toolver: '14'
build_type: arm64-Release build_type: arm64-Release
arch: amd64_arm64 arch: amd64_arm64
- os: windows-2022 - toolver: '14'
build_type: arm64ec-Debug build_type: arm64ec-Debug
arch: amd64_arm64 arch: amd64_arm64
- os: windows-2022 - toolver: '14'
build_type: arm64ec-Release build_type: arm64ec-Release
arch: amd64_arm64 arch: amd64_arm64
- os: windows-2022 - toolver: '14'
build_type: x64-Debug-Win8 build_type: x64-Debug-Win8
arch: amd64 arch: amd64
- os: windows-2022 - toolver: '14'
build_type: x64-Release-Win8 build_type: x64-Release-Win8
arch: amd64 arch: amd64
- os: windows-2022 - toolver: '14'
build_type: x64-Debug-Clang build_type: x64-Debug-Clang
arch: amd64 arch: amd64
- os: windows-2022 - toolver: '14'
build_type: x64-Release-Clang build_type: x64-Release-Clang
arch: amd64 arch: amd64
- os: windows-2022 - toolver: '14'
build_type: x86-Debug-Clang build_type: x86-Debug-Clang
arch: amd64_x86 arch: amd64_x86
- os: windows-2022 - toolver: '14'
build_type: x86-Release-Clang build_type: x86-Release-Clang
arch: amd64_x86 arch: amd64_x86
- os: windows-2022 - toolver: '14'
build_type: arm64-Debug-Clang build_type: arm64-Debug-Clang
arch: amd64_arm64 arch: amd64_arm64
- os: windows-2022 - toolver: '14'
build_type: arm64-Release-Clang build_type: arm64-Release-Clang
arch: amd64_arm64 arch: amd64_arm64
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Install Ninja' - name: 'Install Ninja'
run: choco install ninja run: choco install ninja
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with: with:
arch: ${{ matrix.arch }} arch: ${{ matrix.arch }}
toolset: ${{ matrix.toolver }}
- name: 'Configure CMake' - name: 'Configure CMake'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=${{ matrix.build_type }} run: cmake --preset=${{ matrix.build_type }}
- name: 'Build' - name: 'Build'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}
- name: 'Clean up' - name: 'Clean up'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: Remove-Item -Path out -Recurse -Force run: Remove-Item -Path out -Recurse -Force
- if: matrix.arch != 'amd64_arm64' - if: matrix.arch != 'amd64_arm64'
name: 'Configure CMake (Spectre)' name: 'Configure CMake (Spectre)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=${{ matrix.build_type }} -DENABLE_SPECTRE_MITIGATION=ON run: cmake --preset=${{ matrix.build_type }} -DENABLE_SPECTRE_MITIGATION=ON
- if: matrix.arch != 'amd64_arm64' - if: matrix.arch != 'amd64_arm64'
name: 'Build (Spectre)' name: 'Build (Spectre)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}
- if: matrix.arch != 'amd64_arm64' - if: matrix.arch != 'amd64_arm64'
name: 'Clean up' name: 'Clean up'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: Remove-Item -Path out -Recurse -Force run: Remove-Item -Path out -Recurse -Force
- name: 'Configure CMake (DLL)' - name: 'Configure CMake (DLL)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON run: cmake --preset=${{ matrix.build_type }} -DBUILD_SHARED_LIBS=ON
- name: 'Build (DLL)' - name: 'Build (DLL)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: cmake --build out\build\${{ matrix.build_type }} run: cmake --build out\build\${{ matrix.build_type }}

View File

@ -7,12 +7,19 @@ name: MSBuild
on: on:
push: push:
branches: [ "main" ] branches: "main"
pull_request:
branches: [ "main" ]
paths-ignore: paths-ignore:
- '*.md' - '*.md'
- LICENSE - LICENSE
- '.azuredevops/**'
- '.nuget/*'
- build/*
pull_request:
branches: "main"
paths-ignore:
- '*.md'
- LICENSE
- '.azuredevops/**'
- '.nuget/*' - '.nuget/*'
- build/* - build/*
@ -21,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
@ -30,33 +37,48 @@ jobs:
vs: [2019, 2022] vs: [2019, 2022]
build_type: [Debug, Release] build_type: [Debug, Release]
platform: [x86, x64, ARM64] platform: [x86, x64, ARM64]
exclude:
- vs: 2019
platform: ARM64
steps: steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Add MSBuild to PATH - name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0 uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- if: matrix.platform != 'ARM64' - if: matrix.platform != 'ARM64'
name: Build name: Build
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
DirectXTex_Desktop_${{ matrix.vs }}.sln
- name: 'Build (Windows 10)' - name: 'Build (Windows 10)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln
- if: matrix.vs == '2022' - if: matrix.vs == '2022'
name: 'Build (UWP)' name: 'Build (UWP)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Windows10_2022.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
DirectXTex_Windows10_2022.sln
- if: matrix.platform != 'ARM64' - if: matrix.platform != 'ARM64' && matrix.vs != '2019'
name: 'Build (Spectre)' name: 'Build (Spectre)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:SpectreMitigation=Spectre /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
/p:SpectreMitigation=Spectre
DirectXTex_Desktop_${{ matrix.vs }}.sln
- if: matrix.platform != 'ARM64' - if: matrix.platform != 'ARM64' && matrix.vs != '2019'
name: 'Build (Spectre Windows 10)' name: 'Build (Spectre Windows 10)'
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
run: msbuild /m /p:SpectreMitigation=Spectre /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }} ./DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln run: >
msbuild /m /p:Configuration=${{ matrix.build_type }} /p:Platform=${{ matrix.platform }}
/p:SpectreMitigation=Spectre
DirectXTex_Desktop_${{ matrix.vs }}_Win10.sln

View File

@ -1,76 +1,88 @@
# Copyright (c) Microsoft Corporation. # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License. # Licensed under the MIT License.
# #
# http://go.microsoft.com/fwlink/?LinkId=248926 # http://go.microsoft.com/fwlink/?LinkId=248926
name: Microsoft C++ Code Analysis name: Microsoft C++ Code Analysis
on: on:
push: push:
branches: [ "main" ] branches: "main"
pull_request: paths-ignore:
branches: [ "main" ] - '*.md'
paths-ignore: - LICENSE
- '*.md' - '.azuredevops/**'
- LICENSE - '.nuget/*'
- '.nuget/*' - build/*.cmd
- build/*.cmd - build/*.json
- build/*.json - build/*.props
- build/*.props - build/*.ps1
- build/*.ps1 - build/*.targets
- build/*.targets - build/*.xvd
- build/*.yml pull_request:
schedule: branches: "main"
- cron: '41 16 * * 1' paths-ignore:
- '*.md'
permissions: - LICENSE
contents: read - '.azuredevops/**'
- '.nuget/*'
jobs: - build/*.cmd
analyze: - build/*.json
permissions: - build/*.props
contents: read - build/*.ps1
security-events: write - build/*.targets
actions: read - build/*.xvd
name: Analyze schedule:
runs-on: windows-latest - cron: '41 16 * * 1'
steps: permissions:
- name: Checkout repository contents: read
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
jobs:
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 analyze:
with: permissions:
arch: amd64 contents: read
security-events: write
- name: Configure CMake actions: read
working-directory: ${{ github.workspace }} name: Analyze
run: cmake -B out -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON runs-on: windows-latest
- name: 'Build Shaders (BC)' steps:
shell: cmd - name: Checkout repository
working-directory: ./DirectXTex/Shaders uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
run: CompileShaders.cmd
env: - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled with:
arch: amd64
- name: 'Build Shaders (DDSVIEW)'
shell: cmd - name: Configure CMake
working-directory: ./DDSView working-directory: ${{ github.workspace }}
run: hlsl.cmd run: cmake -B out -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
env:
CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled - name: 'Build Shaders (BC)'
shell: cmd
- name: Initialize MSVC Code Analysis working-directory: ./DirectXTex/Shaders
uses: microsoft/msvc-code-analysis-action@24c285ab36952c9e9182f4b78dfafbac38a7e5ee # v0.1.1 run: CompileShaders.cmd
id: run-analysis env:
with: CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled
cmakeBuildDirectory: ./out
buildConfiguration: Debug - name: 'Build Shaders (DDSVIEW)'
ruleset: NativeRecommendedRules.ruleset shell: cmd
working-directory: ./DDSView
# Upload SARIF file to GitHub Code Scanning Alerts run: hlsl.cmd
- name: Upload SARIF to GitHub env:
uses: github/codeql-action/upload-sarif@b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d # v3.28.10 CompileShadersOutput: ${{ github.workspace }}/out/Shaders/Compiled
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }} - name: Initialize MSVC Code Analysis
uses: microsoft/msvc-code-analysis-action@24c285ab36952c9e9182f4b78dfafbac38a7e5ee # v0.1.1
id: run-analysis
with:
cmakeBuildDirectory: ./out
buildConfiguration: Debug
ruleset: NativeRecommendedRules.ruleset
# Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}

View File

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

View File

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

View File

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

View File

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

View File

@ -153,12 +153,12 @@ namespace
SetLastError(0); SetLastError(0);
} }
#if COMBINED_OPENEXR_VERSION >= 30300 #if COMBINED_OPENEXR_VERSION >= 30300
int64_t read(void *buf, uint64_t sz, uint64_t offset) override int64_t read(void *buf, uint64_t sz, uint64_t offset) override
{ {
return Imf::IStream::read(buf, sz, offset); return Imf::IStream::read(buf, sz, offset);
} }
#endif #endif
private: private:
HANDLE m_hFile; HANDLE m_hFile;
@ -169,7 +169,8 @@ namespace
{ {
public: public:
OutputStream(HANDLE hFile, const char fileName[]) : OutputStream(HANDLE hFile, const char fileName[]) :
OStream(fileName), m_hFile(hFile) {} OStream(fileName), m_hFile(hFile)
{}
OutputStream(const OutputStream&) = delete; OutputStream(const OutputStream&) = delete;
OutputStream& operator = (const OutputStream&) = delete; OutputStream& operator = (const OutputStream&) = delete;
@ -259,11 +260,11 @@ HRESULT DirectX::GetMetadataFromEXRFile(const wchar_t* szFile, TexMetadata& meta
try try
{ {
#ifdef _WIN32 #ifdef _WIN32
Imf::RgbaInputFile file(stream); Imf::RgbaInputFile file(stream);
#else #else
Imf::RgbaInputFile file(fileName.c_str()); Imf::RgbaInputFile file(fileName.c_str());
#endif #endif
const auto dw = file.dataWindow(); const auto dw = file.dataWindow();
@ -293,9 +294,9 @@ HRESULT DirectX::GetMetadataFromEXRFile(const wchar_t* szFile, TexMetadata& meta
#ifdef _WIN32 #ifdef _WIN32
catch (const com_exception& exc) catch (const com_exception& exc)
{ {
#ifdef _DEBUG #ifdef _DEBUG
OutputDebugStringA(exc.what()); OutputDebugStringA(exc.what());
#endif #endif
hr = exc.get_result(); hr = exc.get_result();
} }
#endif #endif
@ -368,11 +369,11 @@ HRESULT DirectX::LoadFromEXRFile(const wchar_t* szFile, TexMetadata* metadata, S
try try
{ {
#ifdef _WIN32 #ifdef _WIN32
Imf::RgbaInputFile file(stream); Imf::RgbaInputFile file(stream);
#else #else
Imf::RgbaInputFile file(fileName.c_str()); Imf::RgbaInputFile file(fileName.c_str());
#endif #endif
const auto dw = file.dataWindow(); const auto dw = file.dataWindow();
@ -403,7 +404,7 @@ HRESULT DirectX::LoadFromEXRFile(const wchar_t* szFile, TexMetadata* metadata, S
} }
hr = image.Initialize2D(DXGI_FORMAT_R16G16B16A16_FLOAT, hr = image.Initialize2D(DXGI_FORMAT_R16G16B16A16_FLOAT,
static_cast<size_t>(width), static_cast<size_t>(height), arraySize, 1u); static_cast<size_t>(width), static_cast<size_t>(height), arraySize, 1u);
if (FAILED(hr)) if (FAILED(hr))
return hr; return hr;
@ -414,9 +415,9 @@ HRESULT DirectX::LoadFromEXRFile(const wchar_t* szFile, TexMetadata* metadata, S
#ifdef _WIN32 #ifdef _WIN32
catch (const com_exception& exc) catch (const com_exception& exc)
{ {
#ifdef _DEBUG #ifdef _DEBUG
OutputDebugStringA(exc.what()); OutputDebugStringA(exc.what());
#endif #endif
hr = exc.get_result(); hr = exc.get_result();
} }
#endif #endif
@ -490,11 +491,9 @@ HRESULT DirectX::SaveToEXRFile(const Image& image, const wchar_t* szFile)
} }
// Create file and write header // Create file and write header
ScopedHandle hFile(safe_handle(CreateFileW( ScopedHandle hFile(safe_handle(CreateFile2(
szFile, szFile,
GENERIC_WRITE, 0, GENERIC_WRITE, 0, CREATE_ALWAYS,
nullptr,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL,
nullptr))); nullptr)));
if (!hFile) if (!hFile)
{ {
@ -516,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)
{ {
@ -588,9 +587,9 @@ HRESULT DirectX::SaveToEXRFile(const Image& image, const wchar_t* szFile)
#ifdef _WIN32 #ifdef _WIN32
catch (const com_exception& exc) catch (const com_exception& exc)
{ {
#ifdef _DEBUG #ifdef _DEBUG
OutputDebugStringA(exc.what()); OutputDebugStringA(exc.what());
#endif #endif
hr = exc.get_result(); hr = exc.get_result();
} }
#endif #endif

View File

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

View File

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

View File

@ -62,9 +62,13 @@ namespace Xbox
{ {
public: public:
XboxImage() noexcept XboxImage() noexcept
: dataSize(0), baseAlignment(0), tilemode(c_XboxTileModeInvalid), metadata{}, memory(nullptr) {} : dataSize(0), baseAlignment(0), tilemode(c_XboxTileModeInvalid), metadata{}, memory(nullptr)
{}
XboxImage(XboxImage&& moveFrom) noexcept XboxImage(XboxImage&& moveFrom) noexcept
: dataSize(0), baseAlignment(0), tilemode(c_XboxTileModeInvalid), metadata{}, memory(nullptr) { *this = std::move(moveFrom); } : dataSize(0), baseAlignment(0), tilemode(c_XboxTileModeInvalid), metadata{}, memory(nullptr)
{
*this = std::move(moveFrom);
}
~XboxImage() { Release(); } ~XboxImage() { Release(); }
XboxImage& __cdecl operator= (XboxImage&& moveFrom) noexcept; XboxImage& __cdecl operator= (XboxImage&& moveFrom) noexcept;
@ -218,13 +222,6 @@ namespace Xbox
{ {
return EncodeDDSHeader(xbox, reinterpret_cast<uint8_t*>(pDestination), maxsize); return EncodeDDSHeader(xbox, reinterpret_cast<uint8_t*>(pDestination), maxsize);
} }
inline HRESULT __cdecl EncodeDDSHeader(
const XboxImage& xbox,
_Reserved_ std::nullptr_t, _In_ size_t maxsize) noexcept
{
return EncodeDDSHeader(xbox, static_cast<uint8_t*>(nullptr), maxsize);
}
#endif #endif
} // namespace } // namespace

View File

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

View File

@ -422,6 +422,11 @@
{ "name": "arm64-Debug-Clang" , "configurePreset": "arm64-Debug-Clang" }, { "name": "arm64-Debug-Clang" , "configurePreset": "arm64-Debug-Clang" },
{ "name": "arm64-Release-Clang", "configurePreset": "arm64-Release-Clang" }, { "name": "arm64-Release-Clang", "configurePreset": "arm64-Release-Clang" },
{ "name": "x64-Debug-GDKX" , "configurePreset": "x64-Debug-GDKX" },
{ "name": "x64-Release-GDKX" , "configurePreset": "x64-Release-GDKX" },
{ "name": "x64-Debug-GDKX-S" , "configurePreset": "x64-Debug-GDKX-S" },
{ "name": "x64-Release-GDKX-S" , "configurePreset": "x64-Release-GDKX-S" },
{ "name": "x64-Debug-MinGW" , "configurePreset": "x64-Debug-MinGW" }, { "name": "x64-Debug-MinGW" , "configurePreset": "x64-Debug-MinGW" },
{ "name": "x64-Release-MinGW" , "configurePreset": "x64-Release-MinGW" }, { "name": "x64-Release-MinGW" , "configurePreset": "x64-Release-MinGW" },
{ "name": "x86-Debug-MinGW" , "configurePreset": "x86-Debug-MinGW" }, { "name": "x86-Debug-MinGW" , "configurePreset": "x86-Debug-MinGW" },

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -49,10 +49,18 @@ struct IWICMetadataQueryReader;
#define DIRECTX_TEX_VERSION 207 #define DIRECTX_TEX_VERSION 207
#ifdef DIRECTX_TEX_EXPORT #if defined(_WIN32) && defined(DIRECTX_TEX_EXPORT)
#ifdef __GNUC__
#define DIRECTX_TEX_API __attribute__ ((dllexport))
#else
#define DIRECTX_TEX_API __declspec(dllexport) #define DIRECTX_TEX_API __declspec(dllexport)
#elif defined(DIRECTX_TEX_IMPORT) #endif
#elif defined(_WIN32) && defined(DIRECTX_TEX_IMPORT)
#ifdef __GNUC__
#define DIRECTX_TEX_API __attribute__ ((dllimport))
#else
#define DIRECTX_TEX_API __declspec(dllimport) #define DIRECTX_TEX_API __declspec(dllimport)
#endif
#else #else
#define DIRECTX_TEX_API #define DIRECTX_TEX_API
#endif #endif
@ -433,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;
@ -529,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
{ {
@ -545,8 +556,7 @@ namespace DirectX
width(tile.WidthInTexels), width(tile.WidthInTexels),
height(tile.HeightInTexels), height(tile.HeightInTexels),
depth(tile.DepthInTexels) depth(tile.DepthInTexels)
{ {}
}
void GetTileShape12(D3D12_TILE_SHAPE& tile) const void GetTileShape12(D3D12_TILE_SHAPE& tile) const
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -239,7 +239,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -265,7 +265,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -292,7 +292,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -318,7 +318,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -344,7 +344,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -371,7 +371,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -394,7 +394,7 @@
</Link> </Link>
<ClCompile> <ClCompile>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -419,7 +419,7 @@
</Link> </Link>
<ClCompile> <ClCompile>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -444,7 +444,7 @@
</Link> </Link>
<ClCompile> <ClCompile>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -478,7 +478,6 @@
<ItemGroup> <ItemGroup>
<None Include="..\README.md" /> <None Include="..\README.md" />
<None Include="DirectXTex.inl" /> <None Include="DirectXTex.inl" />
<None Include="Shaders\CompileShaders.cmd" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="BC.cpp" /> <ClCompile Include="BC.cpp" />
@ -535,14 +534,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Gaming.Desktop.x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Gaming.Desktop.x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Shaders\BC6HEncode.hlsl">
<FileType>Document</FileType>
</None>
<None Include="Shaders\BC7Encode.hlsl">
<FileType>Document</FileType>
</None>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" /> <ImportGroup Label="ExtensionTargets" />
<Target Name="EnsureGDK" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(Platform)', 'Gaming\..+\.x64'))"> <Target Name="EnsureGDK" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(Platform)', 'Gaming\..+\.x64'))">
@ -552,26 +543,4 @@
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('$(VCTargetsPath)\Platforms\$(Platform)\Platform.props')" Text="$([System.String]::Format('$(ErrorText)', '$(Platform)'))" /> <Error Condition="!Exists('$(VCTargetsPath)\Platforms\$(Platform)\Platform.props')" Text="$([System.String]::Format('$(ErrorText)', '$(Platform)'))" />
</Target> </Target>
<Target Name="ATGEnsureShaders" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<_ATGFXCPath>$(WindowsSDK_ExecutablePath_x64.Split(';')[0])</_ATGFXCPath>
<_ATGFXCPath>$(_ATGFXCPath.Replace("x64",""))</_ATGFXCPath>
<_ATGFXCPath Condition="'$(_ATGFXCPath)' != '' and !HasTrailingSlash('$(_ATGFXCPath)')">$(_ATGFXCPath)\</_ATGFXCPath>
<_ATGFXCVer>$([System.Text.RegularExpressions.Regex]::Match($(_ATGFXCPath), `10\.0\.\d+\.0`))</_ATGFXCVer>
<_ATGFXCVer Condition="'$(_ATGFXCVer)' != '' and !HasTrailingSlash('$(_ATGFXCVer)')">$(_ATGFXCVer)\</_ATGFXCVer>
</PropertyGroup>
<Exec Condition="!Exists('Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc')" WorkingDirectory="$(ProjectDir)Shaders" Command="CompileShaders" EnvironmentVariables="WindowsSdkVerBinPath=$(_ATGFXCPath);WindowsSDKVersion=$(_ATGFXCVer);CompileShadersOutput=$(ProjectDir)Shaders/Compiled" LogStandardErrorAsError="true" />
<PropertyGroup>
<_ATGFXCPath />
<_ATGFXCVer />
</PropertyGroup>
</Target>
<Target Name="ATGDeleteShaders" AfterTargets="Clean">
<ItemGroup>
<_ATGShaderHeaders Include="$(ProjectDir)Shaders/Compiled/*.inc" />
<_ATGShaderSymbols Include="$(ProjectDir)Shaders/Compiled/*.pdb" />
</ItemGroup>
<Delete Files="@(_ATGShaderHeaders)" />
<Delete Files="@(_ATGShaderSymbols)" />
</Target>
</Project> </Project>

View File

@ -46,15 +46,6 @@
<None Include="DirectXTex.inl"> <None Include="DirectXTex.inl">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</None> </None>
<None Include="Shaders\CompileShaders.cmd">
<Filter>Source Files\Shaders</Filter>
</None>
<None Include="Shaders\BC7Encode.hlsl">
<Filter>Source Files\Shaders</Filter>
</None>
<None Include="Shaders\BC6HEncode.hlsl">
<Filter>Source Files\Shaders</Filter>
</None>
<None Include="..\README.md" /> <None Include="..\README.md" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -239,7 +239,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -265,7 +265,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -292,7 +292,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -318,7 +318,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -344,7 +344,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -371,7 +371,7 @@
<ClCompile> <ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;__WRL_NO_DEFAULT_LIB__;_LIB;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -394,7 +394,7 @@
</Link> </Link>
<ClCompile> <ClCompile>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -419,7 +419,7 @@
</Link> </Link>
<ClCompile> <ClCompile>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -444,7 +444,7 @@
</Link> </Link>
<ClCompile> <ClCompile>
<PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile> <PrecompiledHeaderFile>DirectXTexP.h</PrecompiledHeaderFile>
<AdditionalIncludeDirectories>$(ProjectDir);..\Common;$(ProjectDir)Shaders\Compiled;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(ProjectDir);..\Common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<MinimalRebuild>false</MinimalRebuild> <MinimalRebuild>false</MinimalRebuild>
<WarningLevel>EnableAllWarnings</WarningLevel> <WarningLevel>EnableAllWarnings</WarningLevel>
@ -478,7 +478,6 @@
<ItemGroup> <ItemGroup>
<None Include="..\README.md" /> <None Include="..\README.md" />
<None Include="DirectXTex.inl" /> <None Include="DirectXTex.inl" />
<None Include="Shaders\CompileShaders.cmd" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="BC.cpp" /> <ClCompile Include="BC.cpp" />
@ -535,14 +534,6 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Gaming.Desktop.x64'">true</ExcludedFromBuild> <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Profile|Gaming.Desktop.x64'">true</ExcludedFromBuild>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Shaders\BC6HEncode.hlsl">
<FileType>Document</FileType>
</None>
<None Include="Shaders\BC7Encode.hlsl">
<FileType>Document</FileType>
</None>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" /> <ImportGroup Label="ExtensionTargets" />
<Target Name="EnsureGDK" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(Platform)', 'Gaming\..+\.x64'))"> <Target Name="EnsureGDK" BeforeTargets="_CheckForInvalidConfigurationAndPlatform" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('$(Platform)', 'Gaming\..+\.x64'))">
@ -552,26 +543,4 @@
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('$(VCTargetsPath)\Platforms\$(Platform)\Platform.props')" Text="$([System.String]::Format('$(ErrorText)', '$(Platform)'))" /> <Error Condition="!Exists('$(VCTargetsPath)\Platforms\$(Platform)\Platform.props')" Text="$([System.String]::Format('$(ErrorText)', '$(Platform)'))" />
</Target> </Target>
<Target Name="ATGEnsureShaders" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<_ATGFXCPath>$(WindowsSDK_ExecutablePath_x64.Split(';')[0])</_ATGFXCPath>
<_ATGFXCPath>$(_ATGFXCPath.Replace("x64",""))</_ATGFXCPath>
<_ATGFXCPath Condition="'$(_ATGFXCPath)' != '' and !HasTrailingSlash('$(_ATGFXCPath)')">$(_ATGFXCPath)\</_ATGFXCPath>
<_ATGFXCVer>$([System.Text.RegularExpressions.Regex]::Match($(_ATGFXCPath), `10\.0\.\d+\.0`))</_ATGFXCVer>
<_ATGFXCVer Condition="'$(_ATGFXCVer)' != '' and !HasTrailingSlash('$(_ATGFXCVer)')">$(_ATGFXCVer)\</_ATGFXCVer>
</PropertyGroup>
<Exec Condition="!Exists('Shaders/Compiled/BC6HEncode_EncodeBlockCS.inc')" WorkingDirectory="$(ProjectDir)Shaders" Command="CompileShaders" EnvironmentVariables="WindowsSdkVerBinPath=$(_ATGFXCPath);WindowsSDKVersion=$(_ATGFXCVer);CompileShadersOutput=$(ProjectDir)Shaders/Compiled" LogStandardErrorAsError="true" />
<PropertyGroup>
<_ATGFXCPath />
<_ATGFXCVer />
</PropertyGroup>
</Target>
<Target Name="ATGDeleteShaders" AfterTargets="Clean">
<ItemGroup>
<_ATGShaderHeaders Include="$(ProjectDir)Shaders/Compiled/*.inc" />
<_ATGShaderSymbols Include="$(ProjectDir)Shaders/Compiled/*.pdb" />
</ItemGroup>
<Delete Files="@(_ATGShaderHeaders)" />
<Delete Files="@(_ATGShaderSymbols)" />
</Target>
</Project> </Project>

View File

@ -46,15 +46,6 @@
<None Include="DirectXTex.inl"> <None Include="DirectXTex.inl">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</None> </None>
<None Include="Shaders\CompileShaders.cmd">
<Filter>Source Files\Shaders</Filter>
</None>
<None Include="Shaders\BC7Encode.hlsl">
<Filter>Source Files\Shaders</Filter>
</None>
<None Include="Shaders\BC6HEncode.hlsl">
<Filter>Source Files\Shaders</Filter>
</None>
<None Include="..\README.md" /> <None Include="..\README.md" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

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

View File

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

View File

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

View File

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

View File

@ -14,17 +14,17 @@ Instead, please report them to the Microsoft Security Response Center (MSRC) at
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp). If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue * Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL) * The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue * Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue * Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible) * Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue * Impact of the issue, including how an attacker might exploit the issue
This information will help us triage your report more quickly. This information will help us triage your report more quickly.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -45,6 +45,17 @@ else()
set(DIRECTX_HOST_ARCH x64) set(DIRECTX_HOST_ARCH x64)
endif() endif()
#--- Check DIRECTX_ARCH value
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
if(DIRECTX_ARCH MATCHES "x86|^arm$")
message(FATAL_ERROR "64-bit toolset mismatch detected for DIRECTX_ARCH setting")
endif()
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
if(DIRECTX_ARCH MATCHES "x64|arm64")
message(FATAL_ERROR "32-bit toolset mismatch detected for DIRECTX_ARCH setting")
endif()
endif()
#--- Build with Unicode Win32 APIs per "UTF-8 Everywhere" #--- Build with Unicode Win32 APIs per "UTF-8 Everywhere"
if(WIN32) if(WIN32)
list(APPEND COMPILER_DEFINES _UNICODE UNICODE) list(APPEND COMPILER_DEFINES _UNICODE UNICODE)
@ -108,6 +119,14 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|IntelLLVM")
if(WINDOWS_STORE) if(WINDOWS_STORE)
list(APPEND COMPILER_DEFINES _SILENCE_CLANG_COROUTINE_MESSAGE) list(APPEND COMPILER_DEFINES _SILENCE_CLANG_COROUTINE_MESSAGE)
endif() endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
list(APPEND COMPILER_SWITCHES -Wc++20-compat)
endif()
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0)
list(APPEND COMPILER_SWITCHES -Wc++23-compat)
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel") elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
list(APPEND COMPILER_SWITCHES /Zc:__cplusplus /Zc:inline /fp:fast /Qdiag-disable:161) list(APPEND COMPILER_SWITCHES /Zc:__cplusplus /Zc:inline /fp:fast /Qdiag-disable:161)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,274 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Builds the library for Windows Desktop and UWP.
schedules:
- cron: "0 3 * * *"
displayName: 'Nightly build'
branches:
include:
- main
# GitHub Actions handles MSBuild for CI/PR
trigger: none
pr:
branches:
include:
- main
paths:
include:
- build/DirectXTex-GitHub-Dev17.yml
- DirectXTex/Shaders/CompileShaders.cmd
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
Codeql.Enabled: false
pool:
vmImage: windows-2022
jobs:
- job: DESKTOP_BUILD
displayName: 'Win32 Desktop'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln 32rel
inputs:
solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln 64rel
inputs:
solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Release
msbuildArchitecture: x64
- job: DESKTOP_BUILD_SPECTRE
displayName: 'Win32 Desktop (Spectre-mitigated)'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x86
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln 32rel
inputs:
solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x86
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022.sln 64rel
inputs:
solution: DirectXTex_Desktop_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x86
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 32rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x86
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln 64rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: ARM64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: ARM64
configuration: Release
msbuildArchitecture: x64
- job: UWP_BUILD
displayName: 'Universal Windows Platform (UWP)'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Release
msbuildArchitecture: x64

View File

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

View File

@ -1,222 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Builds the library using the Microsoft GDK.
# NOTE: We use x64 MSBuild for the GDK as the NuGets don't include 32-bit support to avoid cross-arch dependencies.
schedules:
- cron: "30 3 * * *"
displayName: 'Nightly build'
branches:
include:
- main
trigger:
branches:
include:
- main
paths:
exclude:
- '*.md'
- LICENSE
- CMake*
- '.github/*'
- '.nuget/*'
- build/*.cmake
- build/*.cmd
- build/*.in
- build/*.json
- build/*.ps1
pr:
branches:
include:
- main
paths:
exclude:
- '*.md'
- LICENSE
- CMake*
- '.github/*'
- '.nuget/*'
- build/*.cmake
- build/*.cmd
- build/*.in
- build/*.json
- build/*.ps1
drafts: false
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
pool:
vmImage: windows-2019
variables:
Codeql.Enabled: false
EXTRACTED_FOLDER: $(ExtractedFolder)
GDK_EDITION: $(GDKEditionNumber)
GDKEnableBWOI: true
URL_FEED: $(ADOFeedURL)
skipNugetSecurityAnalysis: true # We explicitly call this task so we don't need it to be auto-injected
jobs:
- job: BUILD_GDK
displayName: 'Microsoft Game Development Kit (GDK)'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
targetType: inline
script: |
$xml = @'
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
</packageSources>
</configuration>
'@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed'
inputs:
command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet install PGDK
inputs:
command: custom
arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet install GDKX
inputs:
command: custom
arguments: install -prerelease Microsoft.GDK.Xbox.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
SourceFolder: build
Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory)
- task: MSBuild@1
displayName: Setup BWOI VCTargets
inputs:
solution: build/SetupBWOI.targets
msbuildVersion: 16.0
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 pcdbg
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Desktop.x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 pcrel
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Desktop.x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 xbdbg
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Xbox.XboxOne.x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 xbrel
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Xbox.XboxOne.x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 scardbg
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Xbox.Scarlett.x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_2019 scarrel
continueOnError: True
inputs:
solution: DirectXTex_GDK_2019.sln
vsVersion: 16.0
platform: Gaming.Xbox.Scarlett.x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_2019 dbg
continueOnError: True
inputs:
solution: DirectXTex_GXDK_PC_2019.sln
vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_2019 rel
continueOnError: True
inputs:
solution: DirectXTex_GXDK_PC_2019.sln
vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_2019 scardbg
continueOnError: True
inputs:
solution: DirectXTex_GXDK_PC_2019.sln
vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug_Scarlett
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_GDK_PC_2019 scarrel
continueOnError: True
inputs:
solution: DirectXTex_GXDK_PC_2019.sln
vsVersion: 16.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release_Scarlett
msbuildArchitecture: x64

View File

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

View File

@ -1,263 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Builds the library using the latest prerelease of the Windows SDK from nuget.org.
schedules:
- cron: "0 3 * * 6"
displayName: 'Saturday night build'
branches:
include:
- main
always: true
trigger: none
pr: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
Codeql.Enabled: false
EXTRACTED_FOLDER: $(ExtractedFolder)
WSDKEnableBWOI: true
URL_FEED: $(ADOFeedURL)
skipNugetSecurityAnalysis: true # We explicitly call this task so we don't need it to be auto-injected
pool:
vmImage: windows-2022
jobs:
- job: DESKTOP_BUILD
displayName: 'Win32 Desktop'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
targetType: inline
script: |
$xml = @'
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
</packageSources>
</configuration>
'@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed'
inputs:
command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK x64
inputs:
command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK x86
inputs:
command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK arm64
inputs:
command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
SourceFolder: build
Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory)
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
# VS 2019 for Win32 on ARM64 is out of support.
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Release
- job: UWP_BUILD
displayName: 'Universal Windows Platform (UWP)'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
targetType: inline
script: |
$xml = @'
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
</packageSources>
</configuration>
'@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2
displayName: NuGet set package source to ADO feed
inputs:
command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK x64
inputs:
command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK x86
inputs:
command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK arm64
inputs:
command: custom
arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
SourceFolder: build
Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory)
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
# Windows on ARM 32-bit is deprecated. https://learn.microsoft.com/windows/arm/arm32-to-arm64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Release

View File

@ -1,263 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Builds the library using the latest release of the Windows SDK from nuget.org.
schedules:
- cron: "0 3 * * 0"
displayName: 'Sunday night build'
branches:
include:
- main
always: true
trigger: none
pr: none
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
Codeql.Enabled: false
EXTRACTED_FOLDER: $(ExtractedFolder)
WSDKEnableBWOI: true
URL_FEED: $(ADOFeedURL)
skipNugetSecurityAnalysis: true # We explicitly call this task so we don't need it to be auto-injected
pool:
vmImage: windows-2022
jobs:
- job: DESKTOP_BUILD
displayName: 'Win32 Desktop'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
targetType: inline
script: |
$xml = @'
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
</packageSources>
</configuration>
'@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2
# We have to use a nuget.config to provide the feed for the 'nuget install' option.
displayName: 'NuGet set package source to ADO feed'
inputs:
command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK x64
inputs:
command: custom
arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK x86
inputs:
command: custom
arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK arm64
inputs:
command: custom
arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
SourceFolder: build
Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory)
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
# VS 2019 for Win32 on ARM64 is out of support.
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64dbg
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2022_Win10.sln arm64rel
inputs:
solution: DirectXTex_Desktop_2022_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Release
- job: UWP_BUILD
displayName: 'Universal Windows Platform (UWP)'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: PowerShell@2
displayName: 'Create nuget.config with single source'
inputs:
targetType: inline
script: |
$xml = @'
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
</packageSources>
</configuration>
'@
$xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config"
- task: NuGetCommand@2
displayName: NuGet set package source to ADO feed
inputs:
command: custom
arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config
- task: nuget-security-analysis@0
displayName: 'Secure Supply Chain Analysis'
- task: NuGetAuthenticate@1
displayName: 'NuGet Auth'
- task: NuGetCommand@2
displayName: NuGet Install WSDK x64
inputs:
command: custom
arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK x86
inputs:
command: custom
arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK arm64
inputs:
command: custom
arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
SourceFolder: build
Contents: 'Directory.Build.props'
TargetFolder: $(Build.SourcesDirectory)
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 32rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln 64rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
# Windows on ARM 32-bit is deprecated. https://learn.microsoft.com/windows/arm/arm32-to-arm64
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64dbg
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Windows10_2022.sln arm64rel
inputs:
solution: DirectXTex_Windows10_2022.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Release

View File

@ -1,351 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# https://go.microsoft.com/fwlink/?LinkId=248926
# Builds the library and test suite.
schedules:
- cron: "30 3 * * *"
displayName: 'Nightly build'
branches:
include:
- main
# GitHub Actions handles test suite for CI/PR
trigger: none
pr:
branches:
include:
- main
paths:
include:
- build/DirectXTex-GitHub-Test-Dev17.yml
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
trigger: none
- repository: testRepo
name: walbourn/directxtextest
type: github
endpoint: microsoft
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
pool:
vmImage: windows-2022
variables:
Codeql.Enabled: false
VC_PATH: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC'
GUID_FEED: $(ADOFeedGUID)
jobs:
- job: DESKTOP_BUILD
displayName: 'Win32 Desktop for x64/x86'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
fetchDepth: 1
path: 's'
- checkout: testRepo
displayName: Fetch Tests
clean: true
fetchTags: false
fetchDepth: 1
path: 's/Tests'
- task: NuGetToolInstaller@1
displayName: 'Use NuGet'
- task: NuGetCommand@2
displayName: NuGet restore tests
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022.sln
feedRestore: $(GUID_FEED)
includeNuGetOrg: false
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022.sln 32dbg
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022.sln 32rel
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022.sln 64dbg
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022.sln 64rel
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022_Win10.sln 32dbg
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022_Win10.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022_Win10.sln 32rel
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022_Win10.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022_Win10.sln 64dbg
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022_Win10.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022_Win10.sln 64rel
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022_Win10.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022_Win10.sln arm64dbg
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022_Win10.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Debug
msbuildArchitecture: x64
- task: VSBuild@1
displayName: Build solution DirectXTex_Tests_Desktop_2022_Win10.sln arm64rel
inputs:
solution: Tests/DirectXTex_Tests_Desktop_2022_Win10.sln
vsVersion: 17.0
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: ARM64
configuration: Release
msbuildArchitecture: x64
- job: CMAKE_BUILD_X64
displayName: 'CMake for X64 BUILD_TESTING=ON'
timeoutInMinutes: 120
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchTags: false
fetchDepth: 1
path: 's'
- checkout: testRepo
displayName: Fetch Tests
clean: true
fetchTags: false
fetchDepth: 1
path: 's/Tests'
- task: CmdLine@2
displayName: Setup environment for CMake to use VS
inputs:
script: |
call "$(VC_PATH)\Auxiliary\Build\vcvars64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\x64
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB%
- task: CMake@1
displayName: CMake (MSVC; x64-Debug) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug
- task: CMake@1
displayName: CMake (MSVC; x64-Debug) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Debug -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (MSVC; x64-Release) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release
- task: CMake@1
displayName: CMake (MSVC; x64-Release) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Release -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (clang/LLVM; x64-Debug) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Debug-Clang
- task: CMake@1
displayName: CMake (clang/LLVM; x64-Debug) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Debug-Clang -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (clang/LLVM; x64-Release) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=x64-Release-Clang
- task: CMake@1
displayName: CMake (clang/LLVM; x64-Release) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/x64-Release-Clang -v
- job: CMAKE_BUILD_ARM64
displayName: 'CMake for ARM64 BUILD_TESTING=ON'
timeoutInMinutes: 120
workspace:
clean: all
steps:
- checkout: self
clean: true
fetchTags: false
fetchDepth: 1
path: 's'
- checkout: testRepo
displayName: Fetch Tests
clean: true
fetchTags: false
fetchDepth: 1
path: 's/Tests'
- task: CmdLine@2
displayName: Setup environment for CMake to use VS
inputs:
script: |
call "$(VC_PATH)\Auxiliary\Build\vcvarsamd64_arm64.bat"
echo ##vso[task.setvariable variable=WindowsSdkVerBinPath;]%WindowsSdkVerBinPath%
echo ##vso[task.prependpath]%VSINSTALLDIR%Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja
echo ##vso[task.prependpath]%VCINSTALLDIR%Tools\Llvm\x64\bin
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\Hostx64\arm64
echo ##vso[task.setvariable variable=EXTERNAL_INCLUDE;]%EXTERNAL_INCLUDE%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
echo ##vso[task.setvariable variable=LIB;]%LIB%
- task: CMake@1
displayName: CMake (MSVC; arm64-Debug) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Debug
- task: CMake@1
displayName: CMake (MSVC; arm64-Debug) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Debug -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (MSVC; arm64-Release) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Release
- task: CMake@1
displayName: CMake (MSVC; arm64-Release) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Release -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (clang/LLVM; arm64-Debug) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Debug-Clang
- task: CMake@1
displayName: CMake (clang/LLVM; arm64-Debug) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Debug-Clang -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (clang/LLVM; arm64-Release) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64-Release-Clang
- task: CMake@1
displayName: CMake (clang/LLVM; arm64-Release) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64-Release-Clang -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (MSVC; arm64ec-Debug) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64ec-Debug
- task: CMake@1
displayName: CMake (MSVC; arm64ec-Debug) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64ec-Debug -v
- task: DeleteFiles@1
inputs:
Contents: 'out'
- task: CMake@1
displayName: CMake (MSVC; arm64ec-Release) Config
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --preset=arm64ec-Release
- task: CMake@1
displayName: CMake (MSVC; arm64ec-Release) Build
inputs:
cwd: '$(Build.SourcesDirectory)'
cmakeArgs: --build out/build/arm64ec-Release -v

View File

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

View File

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

View File

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

View File

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

View File

@ -1,169 +0,0 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
#
# http://go.microsoft.com/fwlink/?LinkId=248926
# Builds the library for Windows Desktop and UWP.
schedules:
- cron: "5 3 * * *"
displayName: 'Nightly build'
branches:
include:
- main
# GitHub Actions handles MSBuild for CI/PR
trigger: none
pr:
branches:
include:
- main
paths:
include:
- build/DirectXTex-GitHub.yml
- DirectXTex/Shaders/CompileShaders.cmd
resources:
repositories:
- repository: self
type: git
ref: refs/heads/main
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
variables:
Codeql.Enabled: false
pool:
vmImage: windows-2019
jobs:
- job: DESKTOP_BUILD
displayName: 'Win32 Desktop'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64
platform: x64
configuration: Release
- job: DESKTOP_BUILD_SPECTRE
displayName: 'Win32 Desktop (Spectre-mitigated)'
timeoutInMinutes: 120
cancelTimeoutInMinutes: 1
steps:
- checkout: self
clean: true
fetchTags: false
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x64
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x86
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 32rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x86
configuration: Release
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64dbg
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x64
configuration: Debug
- task: VSBuild@1
displayName: Build solution DirectXTex_Desktop_2019_Win10.sln 64rel
inputs:
solution: DirectXTex_Desktop_2019_Win10.sln
msbuildArgs: /p:PreferredToolArchitecture=x64 /p:SpectreMitigation=Spectre
platform: x64
configuration: Release

Some files were not shown because too many files have changed in this diff Show More