diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index d0b6a0dc..2f10e37c 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -21,13 +21,13 @@ These instructions define how GitHub Copilot should assist with this project. Th ## General Guidelines -- **Code Style**: The project uses an .editorconfig file to enforce coding standards. Follow the rules defined in `.editorconfig` for indentation, line endings, and other formatting. Additional information can be found on the wiki at [Implementation](https://github.com/microsoft/DirectXTK12/wiki/Implementation). The library's public API requires C++11, and the project builds with C++17 (`CMAKE_CXX_STANDARD 17`).F -> Notable `.editorconfig` rules: C/C++ files use 4-space indentation, `crlf` line endings, and `latin1` charset — avoid non-ASCII characters in source files. HLSL files have separate indent/spacing rules defined in `.editorconfig`. +- **Code Style**: The project uses an .editorconfig file to enforce coding standards. Follow the rules defined in `.editorconfig` for indentation, line endings, and other formatting. Additional information can be found on the wiki at [Implementation](https://github.com/microsoft/DirectXTK12/wiki/Implementation). The library's public API requires C++11, and the project builds with C++17 (`CMAKE_CXX_STANDARD 17`). This code is designed to build with Visual Studio 2022, Visual Studio 2026, clang for Windows v12 or later, or MinGW 12.2. +> Notable `.editorconfig` rules: C/C++ and HLSL files use 4-space indentation, `crlf` line endings, and `latin1` charset — avoid non-ASCII characters in source files. HLSL files have separate indent/spacing rules defined in `.editorconfig`. - **Documentation**: The project provides documentation in the form of wiki pages available at [Documentation](https://github.com/microsoft/DirectXTK12/wiki/). The audio, input, and math implementations are identical to the DirectX Tool Kit for DirectX 11. - **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. -- **Testing**: Unit tests for this project are implemented in this repository [Test Suite](https://github.com/walbourn/directxtk12test/) and can be run using CTest per the instructions at [Test Documentation](https://github.com/walbourn/directxtk12test/wiki). -- **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 image file, geometry files, and audio files are subject to OneFuzz fuzz testing to ensure they are secure against malformed files. -- **Dependencies**: The project uses CMake and VCPKG for managing dependencies, making optional use of DirectXMath, DirectX-Headers, DirectX 12 Agility SDK, GameInput, and XAudio2Redist. The project can be built without these dependencies, relying on the Windows SDK for core functionality. Additional CMake build options include `BUILD_WGI` and `BUILD_XINPUT` for alternative input backends, `BUILD_MIXED_DX11` for DX11 toolkit interop, `ENABLE_SPECTRE_MITIGATION`, `ENABLE_CODE_ANALYSIS`, and `BUILD_FUZZING`. +- **Testing**: Unit tests for this project are implemented in this repository [Test Suite](https://github.com/walbourn/directxtk12test/) and can be run using CTest per the instructions at [Test Documentation](https://github.com/walbourn/directxtk12test/wiki). See [test copilot instructions](https://github.com/walbourn/directxtk12test/blob/main/.github/copilot-instructions.md) for additional information on the tests. +- **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 image files, geometry files, and audio files are subject to OneFuzz fuzz testing to ensure they are secure against malformed files. +- **Dependencies**: The project uses CMake and VCPKG for managing dependencies, making optional use of DirectXMath, DirectX-Headers, DirectX 12 Agility SDK, GameInput, and XAudio2Redist. The project can be built without these dependencies, relying on the Windows SDK for core functionality. CMake build options include `BUILD_GAMEINPUT`, `BUILD_WGI`, and `BUILD_XINPUT` for alternative input backends. Additional CMake build options include `BUILD_MIXED_DX11` for DX11 toolkit interop which removes shared code from the DX12 library as it will be present in the DX11 library to avoid link conflicts. - **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. - **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. @@ -64,7 +64,11 @@ wiki/ # Local clone of the GitHub wiki documentation repository. - Use 16-byte alignment (`_aligned_malloc` / `_aligned_free`) to support SIMD operations in the implementation, but do not expose this requirement in public APIs. - All implementation `.cpp` files include `pch.h` as their first include (precompiled header). MinGW builds skip precompiled headers. - `Model` and related classes require RTTI (`/GR` on MSVC, `__GXX_RTTI` on GCC/Clang). The CMake build enables `/GR` automatically; do not disable RTTI when using `Model`. -- Many public headers use `inline namespace DX12` inside `namespace DirectX` to disambiguate from *DirectX Tool Kit for DirectX 11* types when both libraries are used together. +- Many public headers use `inline namespace DX12` inside `namespace DirectX` to disambiguate from *DirectX Tool Kit for DirectX 11* types when both libraries are used together. This is usually indicated when parameters use the `ID3D12Device` type. Follow this pattern for new headers that have Direct3D 12-specific types in the public API. +- Use `static constexpr` for class-scope constants (e.g., `static constexpr int MaxDirectionalLights = 3;`, `static constexpr unsigned int InputElementCount = 1;`). SimpleMath types use `constexpr` constructors for compile-time initialization. +- Functions that load data from memory (texture loaders, Model) provide both `const uint8_t*` and `const std::byte*` overloads. When adding new memory-buffer APIs, provide both overload variants. The `const std::byte *` overloads are guarded by `#ifdef __cpp_lib_byte` to maintain compatibility with older C++ standards. +- Each public header wraps the `DIRECTX_TOOLKIT_API` macro definition in `#ifndef DIRECTX_TOOLKIT_API` so it is only defined once. Follow this guard pattern when adding new headers. +- Headers use `#pragma comment(lib, ...)` under `_MSC_VER` to auto-link platform libraries (e.g., `gameinput.lib`, `xinput.lib`, `runtimeobject.lib`). Follow this pattern for new platform library dependencies. #### SAL Annotations @@ -115,8 +119,11 @@ HRESULT DirectX::CreateStaticBuffer( #### Calling Convention and DLL Export -- All public functions use `__cdecl` explicitly for ABI stability. -- All public function declarations are prefixed with `DIRECTX_TOOLKIT_API`, which wraps `__declspec(dllexport)` / `__declspec(dllimport)` or the GCC `__attribute__` equivalent when using `BUILD_SHARED_LIBS` in CMake. +- All public free functions use `__cdecl` explicitly for ABI stability. +- Functions that take `XMVECTOR`, `FXMVECTOR`, or `XMMATRIX` parameters use `XM_CALLCONV` instead of `__cdecl` to enable efficient SIMD register passing. This is the DirectXMath calling convention and is used extensively in SpriteBatch, SpriteFont, Effects, Model, and VertexTypes. +- All public function declarations are prefixed with `DIRECTX_TOOLKIT_API`, which wraps `__declspec(dllexport)` / `__declspec(dllimport)` or the GCC `__attribute__` equivalent when using `BUILD_SHARED_LIBS` in CMake. The underlying macros are `DIRECTX_TOOLKIT_EXPORT` (for building the library) and `DIRECTX_TOOLKIT_IMPORT` (for consuming it). +- For free functions, `DIRECTX_TOOLKIT_API` appears on the line above the return type. For inner classes and interfaces, the macro is placed inline: `class DIRECTX_TOOLKIT_API ClassName`. +- When importing DLL classes under MSVC, headers suppress warnings C4251 and C4275 via `#pragma warning(disable : 4251 4275)` inside a `#if defined(DIRECTX_TOOLKIT_IMPORT) && defined(_MSC_VER)` guard. #### `noexcept` Rules @@ -126,7 +133,7 @@ HRESULT DirectX::CreateStaticBuffer( #### Enum Flags Pattern -Flags enums follow this pattern — a `uint32_t`-based unscoped enum with a `_DEFAULT = 0x0` base case, followed by a call to `DEFINE_ENUM_FLAG_OPERATORS` to enable `|`, `&`, and `~` operators: +Flags enums follow this pattern — a `uint32_t`-based unscoped enum with a `_DEFAULT = 0` base case, followed by a call to `DEFINE_ENUM_FLAG_OPERATORS` to enable `|`, `&`, and `~` operators: ```cpp enum DDS_LOADER_FLAGS : uint32_t @@ -144,20 +151,39 @@ DEFINE_ENUM_FLAG_OPERATORS(DDS_LOADER_FLAGS); See [this blog post](https://walbourn.github.io/modern-c++-bitmask-types/) for more information on this pattern. +#### Clang Diagnostic Pragmas + +Headers that trigger Clang warnings use paired `#pragma clang diagnostic push`/`pop` blocks under `#ifdef __clang__` to suppress specific diagnostics. Common suppressions include `-Wunsafe-buffer-usage`, `-Wfloat-equal`, and `-Wunknown-warning-option`. Follow this pattern when adding code that legitimately triggers Clang-specific warnings: + +```cpp +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunsafe-buffer-usage" +#endif + +// ... code ... + +#ifdef __clang__ +#pragma clang diagnostic pop +#endif +``` + ### Patterns to Avoid - Don’t use raw pointers for ownership. - Avoid macros for constants—prefer `constexpr` or `inline` `const`. - Don’t put implementation logic in header files unless using templates, although the SimpleMath library does use an .inl file for performance. - Avoid using `using namespace` in header files to prevent polluting the global namespace. +- Don't use `[[deprecated]]` or `__declspec(deprecated)` attributes. Feature retirement is communicated via `CHANGELOG.md` notes, not in-source deprecation markers. ## Naming Conventions | Element | Convention | Example | | --- | --- | --- | | Classes / structs | PascalCase | `VertexPosition` | -| Public functions | PascalCase + `__cdecl` | `ComputeDisplayArea` | +| Public functions | PascalCase + `__cdecl` or `XM_CALLCONV` | `ComputeDisplayArea` | | Private data members | `m_` prefix | `m_count` | +| Static constexpr members | `c_` prefix (camelCase) or PascalCase | `c_MostRecent`, `MaxDirectionalLights` | | Enum type names | UPPER_SNAKE_CASE | `DDS_LOADER_FLAGS` | | Enum values | UPPER_SNAKE_CASE | `DDS_LOADER_DEFAULT` | | Files | PascalCase | `ScreenGrab.h`, `SpriteEffect.fx` | @@ -180,8 +206,8 @@ Every source file (`.cpp`, `.h`, `.hlsl`, `.fx`, etc.) must begin with this bloc ``` Section separators within files use: -- Major sections: `//-------------------------------------------------------------------------------------` -- Subsections: `//---------------------------------------------------------------------------------` +- Major sections: `//--------------------------------------------------------------------------------------` +- Subsections: `//--------------------------------------------------------------------------------------` The project does **not** use Doxygen. API documentation is maintained exclusively on the GitHub wiki. @@ -198,17 +224,17 @@ Shaders in `Src/Shaders/` are compiled to embedded C++ header files (`.inc`): - [Source git repository on GitHub](https://github.com/microsoft/DirectXTK12.git) - [DirectXTK documentation git repository on GitHub](https://github.com/microsoft/DirectXTK12.wiki.git) -- [DirectXTK test suite git repository on GitHub](https://github.com/walbourn/directxtk12test.wiki.git). +- [DirectXTK test suite git repository on GitHub](https://github.com/walbourn/directxtk12test.git) +- [DirectX Tool Kit for Audio Wiki](https://github.com/Microsoft/DirectXTK/wiki/Audio) - [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) - [Microsoft Secure Coding Guidelines](https://learn.microsoft.com/en-us/security/develop/secure-coding-guidelines) - [CMake Documentation](https://cmake.org/documentation/) - [VCPKG Documentation](https://learn.microsoft.com/vcpkg/) -- [DirectX Tool Kit for Audio Wiki](https://github.com/Microsoft/DirectXTK/wiki/Audio) -- [Games for Windows and the DirectX SDK blog - December 2013](https://walbourn.github.io/directx-tool-kit-for-audio/) -- [Games for Windows and the DirectX SDK blog - July 2016](https://walbourn.github.io/directx-tool-kit-for-directx-12/) -- [Games for Windows and the DirectX SDK blog - May 2020](https://walbourn.github.io/directx-tool-kit-for-audio-updates-and-a-direct3d-9-footnote/) -- [Games for Windows and the DirectX SDK blog - September 2021](https://walbourn.github.io/latest-news-on-directx-tool-kit/) - [Games for Windows and the DirectX SDK blog - October 2021](https://walbourn.github.io/directx-tool-kit-vertex-skinning-update/) +- [Games for Windows and the DirectX SDK blog - September 2021](https://walbourn.github.io/latest-news-on-directx-tool-kit/) +- [Games for Windows and the DirectX SDK blog - May 2020](https://walbourn.github.io/directx-tool-kit-for-audio-updates-and-a-direct3d-9-footnote/) +- [Games for Windows and the DirectX SDK blog - July 2016](https://walbourn.github.io/directx-tool-kit-for-directx-12/) +- [Games for Windows and the DirectX SDK blog - December 2013](https://walbourn.github.io/directx-tool-kit-for-audio/) ## No speculation @@ -240,9 +266,14 @@ When creating documentation: ## Cross-platform Support Notes -- The code supports building for Windows. +- The code targets Win32 desktop applications for Windows 10 or later, Xbox One, Xbox Series X|S, and Universal Windows Platform (UWP) apps for Windows 10 and Windows 11. - Portability and conformance of the code is validated by building with Visual C++, clang/LLVM for Windows, and MinGW. +- For PC development using the *Microsoft GDK*, the project provides MSBuild solution `DirectXTK_GDKW_2022.sln` for the x64 or ARM64 architectures. +- The MSBuild solution `DirectXTK_GDK_2022.sln` is for *Microsoft GDK with Xbox Extensions* development for both PC using the legacy Gaming.Desktop.x64 custom platform as well Xbox using Gaming.Xbox.*.x64 platforms. +- For Xbox development, the project provides MSBuild solution `DirectXTK_GDKX_2022.sln` or `DirectXTK_GDKX_2026.slnx` for the *Microsoft GDK with Xbox Extensions* using Gaming.Xbox.*.x64 platforms. - The project ships MSBuild projects for Visual Studio 2022 (`.sln` / `.vcxproj`) and Visual Studio 2026 (`.slnx` / `.vcxproj`). VS 2019 projects have been retired. +- The CMake build supports Xbox Series X|S (`scarlett`) and Xbox One (`xboxone`) via the `XBOX_CONSOLE_TARGET` variable. +- The CMake build supports legacy Xbox One XDK via the `XBOX_CONSOLE_TARGET` variable (`durango`). ### Platform and Compiler `#ifdef` Guards @@ -251,8 +282,10 @@ Use these established guards — do not invent new ones: | Guard | Purpose | | --- | --- | | `_WIN32` | Windows platform (desktop, UWP, Xbox) | -| `_GAMING_XBOX` | Xbox One or Xbox Series X\|S | -| `_GAMING_XBOX_SCARLETT` | Xbox Series X\|S | +| `_GAMING_XBOX` | Xbox platform (GDK - covers both Xbox One and Xbox Series X\|S) | +| `_GAMING_XBOX_SCARLETT` | Xbox Series X\|S (GDK with Xbox Extensions) | +| `_GAMING_XBOX_XBOXONE` | Xbox One (GDK with Xbox Extensions) | +| `_GAMING_DESKTOP` | Gaming desktop platform (GDK); used for GRDK edition version checks | | `_XBOX_ONE && _TITLE` | Xbox One XDK (legacy) | | `_MSC_VER` | MSVC-specific (and MSVC-like clang-cl) pragmas and warning suppression | | `__clang__` | Clang/LLVM diagnostic suppressions | @@ -264,8 +297,9 @@ Use these established guards — do not invent new ones: | `USING_DIRECTX_HEADERS` | External DirectX-Headers package in use | | `USING_GAMEINPUT` | GameInput API for GamePad, Keyboard, Mouse | | `USING_WINDOWS_GAMING_INPUT` | Windows.Gaming.Input API for GamePad | -| `USING_XINPUT` | XInput API for GamePad, Keyboard, Mouse | +| `USING_XINPUT` | XInput API for GamePad | | `USING_COREWINDOW` | CoreWindow-based input (UWP) for Keyboard, Mouse | +| `GAMEINPUT_API_VERSION` | GameInput SDK version detection for API-level feature checks | | `USING_PIX_CUSTOM_MEMORY_EVENTS` | PIX custom memory event integration in GraphicsMemory | > `_M_ARM`/ `__arm__` is legacy 32-bit ARM which is deprecated. @@ -280,7 +314,7 @@ When reviewing code, focus on the following aspects: - Correct error handling practices and C++ Exception safety. - Clarity and maintainability of the code. - Adequate comments where necessary. -- Public interfaces are located in `Inc\*.h` should be clearly defined and documented on the GitHub wiki. +- Public interfaces located in `Inc\*.h` should be clearly defined and documented on the GitHub wiki. - Compliance with the project's architecture and design patterns. - Ensure that all public functions and classes are covered by unit tests located on [GitHub](https://github.com/walbourn/directxtk12test.git) where applicable. Report any gaps in test coverage. - Check for performance implications, especially in geometry processing algorithms. diff --git a/.github/workflows/arm64.yml b/.github/workflows/arm64.yml index 9d977093..21318738 100644 --- a/.github/workflows/arm64.yml +++ b/.github/workflows/arm64.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -47,7 +49,7 @@ jobs: build_type: [arm64-Debug, arm64-Release, arm64-Debug-UWP, arm64-Release-UWP] steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: 'Install Ninja' run: choco install ninja diff --git a/.github/workflows/arm64bvt.yml b/.github/workflows/arm64bvt.yml index ae3d448d..c4fe038a 100644 --- a/.github/workflows/arm64bvt.yml +++ b/.github/workflows/arm64bvt.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -48,10 +50,10 @@ jobs: build_type: [arm64-Release] steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Clone test repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: walbourn/directxtk12test path: Tests diff --git a/.github/workflows/bvt.yml b/.github/workflows/bvt.yml index d4c237e0..c19ebfc5 100644 --- a/.github/workflows/bvt.yml +++ b/.github/workflows/bvt.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -50,10 +52,10 @@ jobs: arch: [amd64] steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Clone test repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: walbourn/directxtk12test path: Tests diff --git a/.github/workflows/clangcl.yml b/.github/workflows/clangcl.yml index 1229333b..ecae9403 100644 --- a/.github/workflows/clangcl.yml +++ b/.github/workflows/clangcl.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6d6bf711..3e070778 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -51,7 +53,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: 'Install Ninja' run: choco install ninja @@ -59,7 +61,7 @@ jobs: - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - name: Initialize CodeQL - uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5 + uses: github/codeql-action/init@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5 with: languages: c-cpp build-mode: manual @@ -73,6 +75,6 @@ jobs: run: cmake --build out\build\x64-Debug - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5 + uses: github/codeql-action/analyze@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5 with: category: "/language:c-cpp" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ddecb47e..621895f6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml index bbfcaf8c..654da249 100644 --- a/.github/workflows/msbuild.yml +++ b/.github/workflows/msbuild.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/* pull_request: @@ -20,6 +21,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/* diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index b51a144e..662afc8f 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -49,7 +51,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 with: @@ -76,6 +78,6 @@ jobs: # Upload SARIF file to GitHub Code Scanning Alerts - name: Upload SARIF to GitHub - uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5 + uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5 with: sarif_file: ${{ steps.run-analysis.outputs.sarif }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a90a871..a62e8278 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json diff --git a/.github/workflows/uwp.yml b/.github/workflows/uwp.yml index 3a13a676..c0db2631 100644 --- a/.github/workflows/uwp.yml +++ b/.github/workflows/uwp.yml @@ -12,6 +12,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -25,6 +26,7 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - '.nuget/*' - build/*.cmd - build/*.json @@ -65,7 +67,7 @@ jobs: arch: amd64_arm64 steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: 'Install Ninja' run: choco install ninja diff --git a/.github/workflows/vcpkg.yml b/.github/workflows/vcpkg.yml index 93496071..73f3e3c1 100644 --- a/.github/workflows/vcpkg.yml +++ b/.github/workflows/vcpkg.yml @@ -12,17 +12,20 @@ on: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - build/*.cmd - build/*.props - build/*.ps1 - build/*.targets - build/*.xvd + pull_request: branches: "main" paths-ignore: - '*.md' - LICENSE - '.azuredevops/**' + - '.github/*.md' - build/*.cmd - build/*.props - build/*.ps1 @@ -129,7 +132,7 @@ jobs: gameinput: 'OFF' steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: 'Install Ninja' run: choco install ninja diff --git a/Inc/Model.h b/Inc/Model.h index d69c508e..aafcc579 100644 --- a/Inc/Model.h +++ b/Inc/Model.h @@ -575,8 +575,8 @@ namespace DirectX } #endif // __cpp_lib_byte - // Utility function for getting a GPU descriptor for a mesh part/material index. If there is no texture the - // descriptor will be zero. + // Utility function for getting a GPU descriptor for a mesh part/material index. If there is no texture the + // descriptor will be zero. D3D12_GPU_DESCRIPTOR_HANDLE __cdecl GetGpuTextureHandleForMaterialIndex(uint32_t materialIndex, _In_ ID3D12DescriptorHeap* heap, _In_ size_t descriptorSize, _In_ size_t descriptorOffset) const { D3D12_GPU_DESCRIPTOR_HANDLE handle = {};