Skip to content

Commit 0220bea

Browse files
authored
Update CoPilot instructions and update ADO pipelines (#627)
1 parent 1beaa86 commit 0220bea

File tree

7 files changed

+65
-7
lines changed

7 files changed

+65
-7
lines changed

.azuredevops/pipelines/DirectXTex-GitHub-CMake-Dev17.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ variables:
7373
- name: WIN10_SDK
7474
value: '10.0.19041.0'
7575
- name: WIN11_SDK
76-
value: '10.0.22000.0'
76+
value: '10.0.26100.0'
7777

7878
pool:
7979
vmImage: windows-2022

.azuredevops/pipelines/DirectXTex-GitHub-CMake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ variables:
7373
- name: WIN10_SDK
7474
value: '10.0.19041.0'
7575
- name: WIN11_SDK
76-
value: '10.0.22000.0'
76+
value: '10.0.26100.0'
7777

7878
pool:
7979
vmImage: windows-2022

.azuredevops/pipelines/DirectXTex-GitHub-MinGW.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ variables:
7777
- name: VCPKG_MANIFEST_DIR
7878
value: '$(Build.SourcesDirectory)/build'
7979
- name: WIN11_SDK
80-
value: '10.0.22000.0'
80+
value: '10.0.26100.0'
8181
- name: BASE_URL
8282
value: https://github.com/brechtsanders/winlibs_mingw/releases/download
8383
- name: URL_MINGW32

.azuredevops/pipelines/DirectXTex-OneFuzz.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)
3232
variables:
3333
Codeql.Enabled: false
3434
VS_GENERATOR: 'Visual Studio 17 2022'
35-
WIN11_SDK: '10.0.22000.0'
35+
WIN11_SDK: '10.0.26100.0'
3636

3737
pool:
3838
vmImage: windows-2022

.github/copilot-instructions.md

Lines changed: 51 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ These instructions define how GitHub Copilot should assist with this project. Th
2323
- **Documentation**: The project provides documentation in the form of wiki pages available at [Documentation](https://github.com/microsoft/DirectXTex/wiki/).
2424
- **Error Handling**: Use C++ exceptions for error handling and uses RAII smart pointers to ensure resources are properly managed. For some functions that return HRESULT error codes, they are marked `noexcept`, use `std::nothrow` for memory allocation, and should not throw exceptions.
2525
- **Testing**: Unit tests for this project are implemented in this repository [Test Suite](https://github.com/walbourn/directxtextest/) and can be run using CTest per the instructions at [Test Documentation](https://github.com/walbourn/directxtextest/wiki).
26-
- **Security**: This project uses secure coding practices from the Microsoft Secure Coding Guidelines, and is subject to the `SECURITY.md` file in the root of the repository. Functions that read input from geometry files are subject to OneFuzz testing to ensure they are secure against malformed files.
26+
- **Security**: This project uses secure coding practices from the Microsoft Secure Coding Guidelines, and is subject to the `SECURITY.md` file in the root of the repository. Functions that read input from geometry files are subject to OneFuzz fuzz testing to ensure they are secure against malformed files.
2727
- **Dependencies**: The project uses CMake and VCPKG for managing dependencies, making optional use of DirectXMath and DirectX-Headers. The project can be built without these dependencies, relying on the Windows SDK for core functionality.
2828
- **Continuous Integration**: This project implements GitHub Actions for continuous integration, ensuring that all code changes are tested and validated before merging. This includes building the project for a number of configurations and toolsets, running a subset of unit tests, and static code analysis including GitHub super-linter, CodeQL, and MSVC Code Analysis.
2929
- **Code of Conduct**: The project adheres to the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). All contributors are expected to follow this code of conduct in all interactions related to the project.
@@ -70,11 +70,13 @@ Tests/ # Tests are designed to be cloned from a separate repository a
7070

7171
## References
7272

73+
- [Source git repository on GitHub](https://github.com/microsoft/DirectXTex.git)
74+
- [DirectXTex documentation git repository on GitHub](https://github.com/microsoft/DirectXTex.wiki.git)
75+
- [DirectXTex test suite git repository on GitHub](https://github.com/walbourn/directxtextest.wiki.git).
7376
- [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines)
7477
- [Microsoft Secure Coding Guidelines](https://learn.microsoft.com/en-us/security/develop/secure-coding-guidelines)
7578
- [CMake Documentation](https://cmake.org/documentation/)
76-
- [VCPK Documentation](https://learn.microsoft.com/vcpkg/)
77-
- [DirectXTex Wiki](https://github.com/microsoft/DirectXTex/wiki/)
79+
- [VCPKG Documentation](https://learn.microsoft.com/vcpkg/)
7880
- [Games for Windows and the DirectX SDK blog - October 2021](https://walbourn.github.io/directxtex/)
7981
- [Games for Windows and the DirectX SDK blog - April 2025](https://walbourn.github.io/github-project-updates-2025/)
8082

@@ -105,3 +107,49 @@ When creating documentation:
105107
- Review each documented item against source code whenever related to the task.
106108
- Remove any speculative content.
107109
- Ensure all documentation is verifiable against the current state of the codebase.
110+
111+
## Cross-platform Support Notes
112+
113+
- The code supports building for Windows and Linux.
114+
- Portability and conformance of the code is validated by building with Visual C++, clang/LLVM for Windows, MinGW, and GCC for Linux.
115+
116+
The following symbols are not custom error codes, but aliases for `HRESULT_FROM_WIN32` error codes.
117+
118+
| Symbol | Standard Win32 HRESULT |
119+
|--------|-------------|
120+
| `HRESULT_ERROR_FILE_NOT_FOUND` | `HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)` |
121+
| `HRESULT_E_ARITHMETIC_OVERFLOW` | `HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW)` |
122+
| `HRESULT_E_NOT_SUPPORTED` | `HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)` |
123+
| `HRESULT_E_HANDLE_EOF` | `HRESULT_FROM_WIN32(ERROR_HANDLE_EOF)` |
124+
| `HRESULT_E_INVALID_DATA` | `HRESULT_FROM_WIN32(ERROR_INVALID_DATA)` |
125+
| `HRESULT_E_FILE_TOO_LARGE` | `HRESULT_FROM_WIN32(ERROR_FILE_TOO_LARGE)` |
126+
| `HRESULT_E_CANNOT_MAKE` | `HRESULT_FROM_WIN32(ERROR_CANNOT_MAKE)`|
127+
128+
## Code Review Instructions
129+
130+
When reviewing code, focus on the following aspects:
131+
132+
- Adherence to coding standards defined in `.editorconfig` and on the [wiki](https://github.com/microsoft/DirectXTK/wiki/Implementation).
133+
- Make coding recommendations based on the *C++ Core Guidelines*.
134+
- Proper use of RAII and smart pointers.
135+
- Correct error handling practices and C++ Exception safety.
136+
- Clarity and maintainability of the code.
137+
- Adequate comments where necessary.
138+
- Public interfaces located in `DirectXTex.h` should be clearly defined and documented on the GitHub wiki.
139+
- Optional functions are located in `DirectXTexEXR.h`, `DirectXTexJPEG.h`, `DirectXTexPNG.h`, and `DirectXTexXbox.h` in the `Auxiliary` folder.
140+
- Standalone modules for loading textures from DDS Files are located in `DDSTextureLoader9.h`, `DDSTextureLoader11.h`, and `DDSTextureLoader12.h` in the `DDSTextureLoader` folder.
141+
- Standalone modules are loading textures using WIC are located in `WICTextureLoader9.h`, `WICTextureLoader11.h`, and `WICTextureLoader12.h` in the `WICTextureLoader` folder.
142+
- Standalone modules for capturing screenshots are located in `ScreenGrab9.h`, `ScreenGrab11.h`, and `ScreenGrab12.h` in the `ScreenGrab` folder.
143+
- Compliance with the project's architecture and design patterns.
144+
- Ensure that all public functions and classes are covered by unit tests located on [GitHub](https://github.com/walbourn/directxtextest.git) where applicable. Report any gaps in test coverage.
145+
- Check for performance implications, especially in geometry processing algorithms.
146+
- Provide brutally honest feedback on code quality, design, and potential improvements as needed.
147+
148+
## Documentation Review Instructions
149+
150+
When reviewing documentation, do the following:
151+
152+
- Read the code located in [this git repository](https://github.com/microsoft/DirectXTex.git) in the main branch.
153+
- Review the public interface defined in `DirectXTex.h`.
154+
- Read the documentation on the wiki located in [this git repository](https://github.com/microsoft/DirectXTex.wiki.git).
155+
- Report any specific gaps in the documentation compared to the public interface

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*.VC.db
1919
*.nupkg
2020
.vs
21+
.vscode
2122
[Bb]in
2223
packages
2324
/DDSView/Shaders/*.inc

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ option(ENABLE_CODE_ANALYSIS "Use Static Code Analysis on build" OFF)
4747

4848
option(ENABLE_CODE_COVERAGE "Build with code-coverage" OFF)
4949

50+
option(ENABLE_CODE_PROFILING "Build for profiling" OFF)
51+
5052
option(USE_PREBUILT_SHADERS "Use externally built HLSL shaders" OFF)
5153

5254
option(NO_WCHAR_T "Use legacy wide-character as unsigned short" OFF)
@@ -616,6 +618,13 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
616618
endforeach()
617619
endif()
618620

621+
if(ENABLE_CODE_PROFILING)
622+
message(STATUS "Building with /PROFILE")
623+
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
624+
target_link_options(${t} PRIVATE /profile)
625+
endforeach()
626+
endif()
627+
619628
if(ENABLE_SPECTRE_MITIGATION
620629
AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.13)
621630
AND (NOT ENABLE_OPENEXR_SUPPORT)

0 commit comments

Comments
 (0)