From 295965e0faa9790da9590dda2ffff763c905594a Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 2 Jun 2026 19:03:03 -0700 Subject: [PATCH 1/7] Convert release instructions to CoPilot skill --- .github/copilot-instructions.md | 22 +---------- .github/skills/release/SKILL.md | 69 +++++++++++++++++++++++++++++++++ .github/workflows/codeql.yml | 4 +- .github/workflows/msvc.yml | 2 +- .gitignore | 1 + 5 files changed, 74 insertions(+), 24 deletions(-) create mode 100644 .github/skills/release/SKILL.md diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index a8667f2..dac9690 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -515,24 +515,4 @@ When reviewing code, focus on the following aspects: ## Release Process -1. Ensure all changes are merged into the `main` branch and that all tests pass. -2. Git pull the local repository to ensure it is up to date with the `main` branch. -3. Run the PowerShell script `build\preparerelease.ps1` which will generate a topic branch for the release, update the version number in `CMakeLists.txt`, the `README.md` file, the release notes in the nuspec files, and create a stub in the `CHANGELOG.md` file for the new release. -4. Edit the `CHANGELOG.md` file to update it with a summary of changes. -5. Submit the topic branch for review and merge into `main` once approved. Allow the GitHub Actions workflows and the Azure DevOps pipelines to complete successfully before proceeding. -6. Run the PowerShell script `build\completerelease.ps1` which will set a tag on the project repo and the test repo, and create a release on GitHub with the release notes from `CHANGELOG.md`. Ensure you have set up GPG signing for your GitHub account so that the tags will be verified. -7. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`. -8. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`. -9. Create a PR on MSCodeHub from the `main` branch to the `release` branch. -10. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build the NuGet package. -11. Download the GitHub source .zip archive from the release. Unzip and compare to the local repo to ensure it matches — keep in mind there may be some CR/LF differences. Run minisign on the .zip to generate a signature file, and upload the signature file to the release assets. -12. Run the PowerShell script `build\promotenuget.ps1` with the `-Release` parameter to promote the version to the Release view on the project-scoped ADO feed. -13. Run the MSCodeHub pipeline to publish the NuGet package to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org. -14. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository. -15. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXMath port in VCPKG with the new release version. This will edit the files in `ports\directxmath`. -16. Test the VCPKG port using all appropriate triplets and features. -17. Run `.\vcpkg --x-add-version directxmath` to update the VCPKG versioning history. -18. Submit a PR to the VCPKG GitHub repository to update the DirectXMath port. The PR will be reviewed and merged by the VCPKG maintainers. -19. For the DirectXMath release to be included in the next Windows SDK, prepare a PR for the MSCodeHub project from the `main` branch to the `ms_sdk_release` branch. When the PR is complete, the Azure DevOps pipeline will automatically build vpack and submit a PR for further review. - -> When fully completed, be sure to update the GitHub release with links to the matching NuGet packages and the VCPKG port. +The release process is documented in the [release skill](.github/skills/release/SKILL.md). Invoke the `release` skill for step-by-step guidance when performing a release. diff --git a/.github/skills/release/SKILL.md b/.github/skills/release/SKILL.md new file mode 100644 index 0000000..f2be797 --- /dev/null +++ b/.github/skills/release/SKILL.md @@ -0,0 +1,69 @@ +--- +name: Release Process +description: Guide for performing the DirectXMath release process. Use this skill when asked to help with releasing a new version, publishing packages, or updating ports. +--- + +# Release Process + +## Prerequisites + +- All changes merged into the `main` branch with all tests passing. +- GPG signing configured for your GitHub account (for verified tags). +- Access to the MSCodeHub mirror repository and Azure DevOps pipelines. +- Local repository: + - VCPKG at `d:\vcpkg` (synced with `main` branch) + +## Steps + +### Phase 1: Prepare Release + +1. Git pull the local repository to ensure it is up to date with the `main` branch. +2. Run the PowerShell script `build\preparerelease.ps1` which will generate a topic branch for the release, update the version number in `CMakeLists.txt`, the `README.md` file, the release notes in the nuspec files, and create a stub in the `CHANGELOG.md` file for the new release. +3. Edit the `CHANGELOG.md` file to update it with a summary of changes. +4. Submit the topic branch for review and merge into `main` once approved. Allow the GitHub Actions workflows and the Azure DevOps pipelines to complete successfully before proceeding. + +### Phase 2: Tag and Create GitHub Release + +5. Run the PowerShell script `build\completerelease.ps1` which will set a tag on the project repo and the test repo, and create a release on GitHub with the release notes from `CHANGELOG.md`. Ensure you have set up GPG signing for your GitHub account so that the tags will be verified. +6. Git pull the local repository to ensure it is up to date with the `main` branch. Be sure to include `--tags`. + +### Phase 3: MSCodeHub and Signed Binaries + +7. Push the `main` branch to the MSCodeHub mirror repository. Be sure to include `--tags`. +8. Create a PR on MSCodeHub from the `main` branch to the `release` branch. +9. Merge the PR on MSCodeHub to update the release branch, which will trigger the Azure DevOps pipeline to build the NuGet package. + +### Phase 4: Source Archive Signing + +10. Download the GitHub source .zip archive from the release. Unzip and compare to the local repo to ensure it matches — keep in mind there may be some CR/LF differences. +11. Run minisign on the .zip to generate a signature file, and upload the signature file to the release assets. + +### Phase 5: NuGet Validation and Publishing + +11. Run the PowerShell script `build\promotenuget.ps1` with the `-Release` parameter to promote the version to the Release view on the project-scoped ADO feed. +12. Run the MSCodeHub pipeline to publish the NuGet package to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org. + +### Phase 6: VCPKG Port Update + +13. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository. +14. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXMath port in VCPKG with the new release version. This will edit the files in `ports\directxmath`. +15. Test the VCPKG port using all appropriate triplets and features. +16. Run `.\vcpkg --x-add-version directxmath` to update the VCPKG versioning history. +17. Submit a PR to the VCPKG GitHub repository to update the DirectXMath port. The PR will be reviewed and merged by the VCPKG maintainers. + +### Phase 7: Windows SDK Update + +18. For the DirectXMath release to be included in the next Windows SDK, prepare a PR for the MSCodeHub project from the `main` branch to the `ms_sdk_release` branch. When the PR is complete, the Azure DevOps pipeline will automatically build vpack and submit a PR for further review. + +### Phase 8: Finalize + +When fully completed, be sure to update the GitHub release with links to the matching NuGet packages and the VCPKG port. + +## Key Scripts + +| Script | Purpose | +| --- | --- | +| `build\preparerelease.ps1` | Creates topic branch, updates version numbers and changelog stub | +| `build\completerelease.ps1` | Sets tags, creates GitHub release from changelog | +| `build\promotenuget.ps1 -Release` | Promotes NuGet package to Release view on ADO feed | +| `build\updatevcpkg.ps1` | Updates DirectXTK VCPKG port files | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 067db53..a17e584 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -58,7 +58,7 @@ jobs: - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 - name: Initialize CodeQL - uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5 + uses: github/codeql-action/init@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0 with: languages: c-cpp build-mode: manual @@ -72,6 +72,6 @@ jobs: run: cmake --build out/build/x64-Debug - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5 + uses: github/codeql-action/analyze@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0 with: category: "/language:c-cpp" diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index fe64dfc..9b612ce 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -65,6 +65,6 @@ jobs: # Upload SARIF file to GitHub Code Scanning Alerts - name: Upload SARIF to GitHub - uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v3.29.5 + uses: github/codeql-action/upload-sarif@7211b7c8077ea37d8641b6271f6a365a22a5fbfa # v4.36.0 with: sarif_file: ${{ steps.run-analysis.outputs.sarif }} diff --git a/.gitignore b/.gitignore index 63467ca..c4dfc3e 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /wiki /out /CMakeUserPresets.json +!**/skills/** From f92f70b0974a8c67f1b1730a26f567f133fd1086 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 2 Jun 2026 19:12:51 -0700 Subject: [PATCH 2/7] Pick markdown lint --- .github/skills/release/SKILL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/skills/release/SKILL.md b/.github/skills/release/SKILL.md index f2be797..f0f591b 100644 --- a/.github/skills/release/SKILL.md +++ b/.github/skills/release/SKILL.md @@ -13,6 +13,7 @@ description: Guide for performing the DirectXMath release process. Use this skil - Local repository: - VCPKG at `d:\vcpkg` (synced with `main` branch) + ## Steps ### Phase 1: Prepare Release From 8c7c76d6a5f51681430a64cf9ee86be8a1621345 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 2 Jun 2026 22:02:56 -0700 Subject: [PATCH 3/7] Code review --- .github/skills/release/SKILL.md | 21 +- .github/skills/release/assets/vcpkgdxmath.cmd | 210 ++++++++++++++++++ 2 files changed, 221 insertions(+), 10 deletions(-) create mode 100644 .github/skills/release/assets/vcpkgdxmath.cmd diff --git a/.github/skills/release/SKILL.md b/.github/skills/release/SKILL.md index f0f591b..1f314a5 100644 --- a/.github/skills/release/SKILL.md +++ b/.github/skills/release/SKILL.md @@ -12,6 +12,7 @@ description: Guide for performing the DirectXMath release process. Use this skil - Access to the MSCodeHub mirror repository and Azure DevOps pipelines. - Local repository: - VCPKG at `d:\vcpkg` (synced with `main` branch) +- PATs will be needed for scripts that access GitHub and ADO. ## Steps @@ -41,20 +42,20 @@ description: Guide for performing the DirectXMath release process. Use this skil ### Phase 5: NuGet Validation and Publishing -11. Run the PowerShell script `build\promotenuget.ps1` with the `-Release` parameter to promote the version to the Release view on the project-scoped ADO feed. -12. Run the MSCodeHub pipeline to publish the NuGet package to nuget.org. The pipeline will automatically push the most recent package promoted to the Release view to nuget.org. +12. Download the NuGet package from the ADO pipeline build, and review it with a local project or using NuGet Package Explorer. +13. Upload the nupkg to nuget.org via the website. ### Phase 6: VCPKG Port Update -13. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository. -14. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXMath port in VCPKG with the new release version. This will edit the files in `ports\directxmath`. -15. Test the VCPKG port using all appropriate triplets and features. -16. Run `.\vcpkg --x-add-version directxmath` to update the VCPKG versioning history. -17. Submit a PR to the VCPKG GitHub repository to update the DirectXMath port. The PR will be reviewed and merged by the VCPKG maintainers. +14. Git pull a local repository of VCPKG to `d:\vcpkg` in sync with the `main` branch of the VCPKG repository. +15. Run the PowerShell script `build\updatevcpkg.ps1` to update the DirectXMath port in VCPKG with the new release version. This will edit the files in `ports\directxmath`. +16. Test the VCPKG port using the script at `assets/vcpkgdxmath.cmd` (in this skill folder). Copy it to `d:\vcpkg` and run from there after bootstrapping VCPKG. +17. Run `.\vcpkg x-add-version directxmath` to update the VCPKG versioning history. +18. Submit a PR to the VCPKG GitHub repository to update the DirectXMath port. The PR will be reviewed and merged by the VCPKG maintainers. ### Phase 7: Windows SDK Update -18. For the DirectXMath release to be included in the next Windows SDK, prepare a PR for the MSCodeHub project from the `main` branch to the `ms_sdk_release` branch. When the PR is complete, the Azure DevOps pipeline will automatically build vpack and submit a PR for further review. +19. For the DirectXMath release to be included in the next Windows SDK, prepare a PR for the MSCodeHub project from the `main` branch to the `ms_sdk_release` branch. When the PR is complete, the Azure DevOps pipeline will automatically build vpack and submit a PR for further review. ### Phase 8: Finalize @@ -66,5 +67,5 @@ When fully completed, be sure to update the GitHub release with links to the mat | --- | --- | | `build\preparerelease.ps1` | Creates topic branch, updates version numbers and changelog stub | | `build\completerelease.ps1` | Sets tags, creates GitHub release from changelog | -| `build\promotenuget.ps1 -Release` | Promotes NuGet package to Release view on ADO feed | -| `build\updatevcpkg.ps1` | Updates DirectXTK VCPKG port files | +| `build\updatevcpkg.ps1` | Updates DirectXMath VCPKG port files | +| `assets\vcpkgdxmath.cmd` | Tests VCPKG port across all triplets and features | diff --git a/.github/skills/release/assets/vcpkgdxmath.cmd b/.github/skills/release/assets/vcpkgdxmath.cmd new file mode 100644 index 0000000..82f3dea --- /dev/null +++ b/.github/skills/release/assets/vcpkgdxmath.cmd @@ -0,0 +1,210 @@ +@set VCPKG_BINARY_SOURCES=clear +@set VCPKG_ROOT=%cd% +@if %1.==xbox. goto xbox +@if %1.==clang. goto clang +.\vcpkg install directxmath:x86-windows +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x86-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:x86-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x86-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x86-windows-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11,dx12]:x86-windows-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x86-windows-static-md +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11,dx12]:x86-windows-static-md --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-windows +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:x64-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-windows-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11,dx12]:x64-windows-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-windows-static-md +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11,dx12]:x64-windows-static-md --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:arm64-windows +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:arm64-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:arm64-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:arm64-windows --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:arm64-windows-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11,dx12]:arm64-windows-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:arm64-windows-static-md +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11,dx12]:arm64-windows-static-md --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x86-uwp +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x86-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:x86-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x86-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-uwp +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:x64-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:arm64-uwp +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:arm64-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:arm64-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:arm64-uwp --recurse +@if errorlevel 1 goto error +@where /Q x86_64-w64-mingw32-g++.exe +@if errorlevel 1 goto skipgcc64 +.\vcpkg install directxmath:x64-mingw-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-mingw-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:x64-mingw-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-mingw-static --recurse +@if errorlevel 1 goto error +:skipgcc64 +@where /Q i686-w64-mingw32-g++.exe +@if errorlevel 1 goto skipgcc32 +.\vcpkg install directxmath:x86-mingw-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x86-mingw-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:x86-mingw-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x86-mingw-static --recurse +@if errorlevel 1 goto error +:skipgcc32 +@if "%GXDKLatest%."=="." goto finish +:xbox +.\vcpkg install directxmath:x64-xbox-scarlett +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-xbox-scarlett --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-xbox-scarlett --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-xbox-scarlett-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-xbox-scarlett-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-xbox-xboxone +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-xbox-xboxone --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-xbox-xboxone --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-xbox-xboxone-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-xbox-xboxone-static --recurse +@if errorlevel 1 goto error +@goto finish +:clang +.\vcpkg install directxmath:x64-clangcl-dynamic +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-clangcl-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-clangcl-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:x64-clangcl-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-clangcl-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-clangcl-uwp +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-clangcl-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:x64-clangcl-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-clangcl-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:arm64-clangcl-dynamic +@if errorlevel 1 goto error +.\vcpkg install directxmath:arm64-clangcl-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:arm64-clangcl-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:arm64-clangcl-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:arm64-clangcl-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:arm64-clangcl-uwp +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:arm64-clangcl-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx11]:arm64-clangcl-uwp --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:arm64-clangcl-uwp --recurse +@if errorlevel 1 goto error +@if "%GXDKLatest%."=="." goto finish +.\vcpkg install directxmath:x64-clangcl-scarlett +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-clangcl-scarlett --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-clangcl-scarlett --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-clangcl-scarlett-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-clangcl-scarlett-static --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-clangcl-xboxone +@if errorlevel 1 goto error +.\vcpkg install directxmath[xdsp]:x64-clangcl-xboxone --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-clangcl-xboxone --recurse +@if errorlevel 1 goto error +.\vcpkg install directxmath:x64-clangcl-xboxone-static +@if errorlevel 1 goto error +.\vcpkg install directxmath[dx12]:x64-clangcl-xboxone-static --recurse +@if errorlevel 1 goto error +:finish +@echo SUCCEEDED +@if %1.==xbox. goto eof +@if %1.==clang. goto eof +@echo . +@echo . Run on x64-linux and arm64-linux +@echo . ./vcpkg install directxmath +@echo . ./vcpkg install directxmath[xdsp] --recurse +@echo . ./vcpkg install directxmath[dx12] --recurse +@where /Q x86_64-w64-mingw32-g++.exe +@if NOT errorlevel 1 goto gcc64 +@echo . +@echo . Run for MinGW64 +@echo . .\vcpkg install directxmath:x64-mingw-static +@echo . .\vcpkg install directxmath[xdsp]:x64-mingw-static --recurse +@echo . .\vcpkg install directxmath[dx11]:x64-mingw-static --recurse +@echo . .\vcpkg install directxmath[dx12]:x64-mingw-static --recurse + :gcc64 +@where /Q i686-w64-mingw32-g++.exe +@if NOT errorlevel 1 goto gcc32 +@echo . +@echo . Run for MinGW32 +@echo . .\vcpkg install directxmath:x86-mingw-static +@echo . .\vcpkg install directxmath[xdsp]:x86-mingw-static --recurse +@echo . .\vcpkg install directxmath[dx11]:x86-mingw-static --recurse +@echo . .\vcpkg install directxmath[dx12]:x86-mingw-static --recurse +:gcc32 +@goto eof +:error +@echo FAILED +:eof From 35bc7970aa1e6474f54fdcb82de5cc0347edffca Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 3 Jun 2026 00:08:04 -0700 Subject: [PATCH 4/7] Add usage skill --- .github/skills/directxmath-usage/SKILL.md | 135 ++++++++ .../directxmath-usage/reference/overview.md | 304 ++++++++++++++++++ 2 files changed, 439 insertions(+) create mode 100644 .github/skills/directxmath-usage/SKILL.md create mode 100644 .github/skills/directxmath-usage/reference/overview.md diff --git a/.github/skills/directxmath-usage/SKILL.md b/.github/skills/directxmath-usage/SKILL.md new file mode 100644 index 0000000..f92b97e --- /dev/null +++ b/.github/skills/directxmath-usage/SKILL.md @@ -0,0 +1,135 @@ +--- +name: DirectXMath Usage +description: Guide for integrating DirectXMath into new projects and an overview of the API, types, and classes. Use this skill when asked about how to use DirectXMath, integrate it into a project, or for an overview of available functionality. +--- + +# DirectXMath Usage + +## Overview + +DirectXMath is a header-only SIMD C++ linear algebra library for use in games, graphics engines, and other performance-sensitive applications. It provides vector, matrix, and quaternion math optimized for SSE/SSE2 (x86/x64) and ARM-NEON (ARM64) instruction sets. + +- **Namespace**: `DirectX` +- **Minimum C++ Standard**: C++11 (with conditional C++14/17/20 features) +- **Minimum Compiler**: Visual C++ 2017 (`_MSC_VER >= 1910`), or equivalent Clang/GCC +- **Repository**: +- **Documentation**: , +- **NuGet Packages**: `directxmath` +- **vcpkg Port**: `directxmath` + +> An optional C++ wrapper, SimpleMath, is available that provides a more user-friendly interface to the DirectXMath API with fewer alignment and usage restrictions. It is part of the DirectX Tool Kit for DirectX 11 and DirectX 12, and is intended to mimic the XNA Game Studio framework math library. + +## Integration Methods + +### vcpkg manifest-mode (Recommended) + +In your `vcpkg.json` file, add the following: + +```json +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "dependencies": [ + "directxmath" + ] +} +``` + +### vcpkg (classic) + +```bash +vcpkg install directxmath +``` + +Then in your `CMakeLists.txt`: + +```cmake +find_package(directxmath CONFIG REQUIRED) +target_link_libraries(YourTarget PRIVATE Microsoft::DirectXMath) +``` + +Features: `dx11` (Spherical Harmonics math library for DirectX 11), `dx12` (Spherical Harmonics math library for DirectX 12), `xdsp` (Digital Signal Processing library). Triplets: `x64-windows`, `x64-linux`, `arm64-windows`, etc. + +### NuGet + +Install the `directxmath` package from nuget.org. + +### Windows SDK + +The Windows SDK ships with DirectXMath, though it may not be the latest version. Include via: + +```cpp +#include +``` + +## Basic Usage + +```cpp +#include +using namespace DirectX; + +// Load data from storage type to SIMD register +XMFLOAT3 position{ 1.0f, 2.0f, 3.0f }; +XMVECTOR v = XMLoadFloat3(&position); + +// Perform computation in SIMD +v = XMVector3Normalize(v); + +// Store result back to memory +XMFLOAT3 result; +XMStoreFloat3(&result, v); +``` + +## Key Concepts + +### Load / Compute / Store Pattern + +DirectXMath separates storage types (for memory layout) from the computation type (`XMVECTOR`). Always: + +1. **Load** from a storage type (`XMFLOAT3`, `XMFLOAT4`, etc.) into `XMVECTOR` or `XMMATRIX` using `XMLoad*` functions. +2. **Compute** using `XMVector*`, `XMMatrix*`, `XMQuaternion*`, or `XMColor*` functions. +3. **Store** results back to a storage type using `XMStore*` functions. + +### Calling Conventions + +Functions that accept `XMVECTOR` or `XMMATRIX` parameters use `XM_CALLCONV` and the parameter typedefs `FXMVECTOR`, `GXMVECTOR`, `HXMVECTOR`, `CXMVECTOR`, `FXMMATRIX`, and `CXMMATRIX` to maximize register usage across platforms. + +### Alignment + +`XMVECTOR` and `XMMATRIX` require 16-byte alignment. Storage types with an `A` suffix (e.g., `XMFLOAT4A`) are aligned; the unsuffixed variants (e.g., `XMFLOAT4`) are unaligned and safe for use in arbitrary data structures. + +## API Reference + +For detailed API signatures and function families, see the [reference overview](reference/overview.md). + +The canonical API documentation is on [Microsoft Learn](https://learn.microsoft.com/windows/win32/dxmath/directxmath-portal). All function signatures can be discovered in the public headers under the `Inc/` directory. + +## Auxiliary Libraries + +### SHMath (Spherical Harmonics) + +The `SHMath/` directory provides spherical harmonic math functions for lighting computations. Unlike the core library, SHMath includes `.cpp` files that must be compiled. + +See [reference overview - SHMath section](reference/overview.md#shmath-spherical-harmonics) for details. + +### XDSP (Digital Signal Processing) + +The `XDSP/` directory provides header-only FFT and DSP functions built on DirectXMath. + +See [reference overview - XDSP section](reference/overview.md#xdsp-digital-signal-processing) for details. + +## Platform Support + +| Platform | SIMD Backend | +| --- | --- | +| Windows x86/x64 | SSE/SSE2 (baseline), up to AVX2 | +| Windows ARM64/ARM64EC | ARM-NEON | +| Linux x86_64 | SSE/SSE2 (baseline), up to AVX2 | +| Linux ARM64 | ARM-NEON | +| Any (fallback) | Pure C++ (`_XM_NO_INTRINSICS_`) | + +## Additional Resources + +- [Getting Started (Microsoft Learn)](https://learn.microsoft.com/windows/win32/dxmath/pg-xnamath-getting-started) +- [API Reference (Microsoft Learn)](https://learn.microsoft.com/windows/win32/dxmath/directxmath-portal) +- [GitHub Wiki](https://github.com/microsoft/DirectXMath/wiki/) +- [Introductory Blog Post](https://walbourn.github.io/introducing-directxmath/) diff --git a/.github/skills/directxmath-usage/reference/overview.md b/.github/skills/directxmath-usage/reference/overview.md new file mode 100644 index 0000000..8802521 --- /dev/null +++ b/.github/skills/directxmath-usage/reference/overview.md @@ -0,0 +1,304 @@ +# DirectXMath API Reference Overview + +This document provides an overview of the DirectXMath API surface. All function signatures are defined in the public headers: `DirectXCollision.h`, `DirectXColors.h`, `DirectXMath.h`, `DirectXPackedVector.h`. + +## Core Header: `DirectXMath.h` + +The primary header defines all fundamental types, constants, and math functions. + +### Fundamental Types + +| Type | Description | +| --- | --- | +| `XMVECTOR` | 128-bit SIMD register type for computation (16-byte aligned) | +| `XMMATRIX` | 4x4 matrix of four `XMVECTOR` rows (16-byte aligned) | + +### Storage Types + +| Type | Description | +| --- | --- | +| `XMFLOAT2` / `XMFLOAT2A` | 2D float vector (A = 16-byte aligned) | +| `XMFLOAT3` / `XMFLOAT3A` | 3D float vector | +| `XMFLOAT4` / `XMFLOAT4A` | 4D float vector | +| `XMINT2` / `XMINT3` / `XMINT4` | 2/3/4D signed int32 vector | +| `XMUINT2` / `XMUINT3` / `XMUINT4` | 2/3/4D unsigned int32 vector | +| `XMFLOAT3X3` | 3x3 float matrix | +| `XMFLOAT3X4` / `XMFLOAT3X4A` | 3x4 float matrix | +| `XMFLOAT4X3` / `XMFLOAT4X3A` | 4x3 float matrix | +| `XMFLOAT4X4` / `XMFLOAT4X4A` | 4x4 float matrix | + +### Constant Helper Types + +| Type | Description | +| --- | --- | +| `XMVECTORF32` | Compile-time float vector constant | +| `XMVECTORI32` | Compile-time int32 vector constant | +| `XMVECTORU32` | Compile-time uint32 vector constant | +| `XMVECTORU8` | Compile-time byte vector constant | + +### Calling Convention Typedefs + +| Typedef | Usage | +| --- | --- | +| `FXMVECTOR` | 1st-3rd `XMVECTOR` parameters | +| `GXMVECTOR` | 4th `XMVECTOR` parameter | +| `HXMVECTOR` | 5th-6th `XMVECTOR` parameters | +| `CXMVECTOR` | 7th+ `XMVECTOR` parameters | +| `FXMMATRIX` | 1st `XMMATRIX` parameter | +| `CXMMATRIX` | 2nd+ `XMMATRIX` parameters | + +### Function Families + +#### Load and Store Functions + +Convert between storage types and `XMVECTOR`/`XMMATRIX`: + +- `XMLoadFloat2`, `XMLoadFloat2A`, `XMLoadFloat3`, `XMLoadFloat3A`, `XMLoadFloat4`, `XMLoadFloat4A` +- `XMLoadInt2`, `XMLoadInt3`, `XMLoadInt4` +- `XMLoadFloat3x3`, `XMLoadFloat3x4`, `XMLoadFloat3x4A`, `XMLoadFloat4x3`, `XMLoadFloat4x3A`, `XMLoadFloat4x4`, `XMLoadFloat4x4A` +- `XMStoreFloat2`, `XMStoreFloat2A`, `XMStoreFloat3`, `XMStoreFloat3A`, `XMStoreFloat4`, `XMStoreFloat4A` +- `XMStoreInt2`, `XMStoreInt3`, `XMStoreInt4` +- `XMStoreFloat3x3`, `XMStoreFloat3x4`, `XMStoreFloat3x4A`, `XMStoreFloat4x3`, `XMStoreFloat4x3A`, `XMStoreFloat4x4`, `XMStoreFloat4x4A` + +#### Vector Functions (`XMVector*`) + +Organized by component count (2D, 3D, 4D) and general operations: + +- **General**: `XMVectorZero`, `XMVectorSet`, `XMVectorReplicate`, `XMVectorSplatX/Y/Z/W`, `XMVectorSwizzle`, `XMVectorPermute`, `XMVectorSelect` +- **Arithmetic**: `XMVectorAdd`, `XMVectorSubtract`, `XMVectorMultiply`, `XMVectorDivide`, `XMVectorScale`, `XMVectorNegate`, `XMVectorMultiplyAdd`, `XMVectorNegativeMultiplySubtract` +- **Comparison**: `XMVectorEqual`, `XMVectorGreater`, `XMVectorLess`, `XMVectorMin`, `XMVectorMax`, `XMVectorClamp` +- **Bitwise**: `XMVectorAndInt`, `XMVectorOrInt`, `XMVectorXorInt`, `XMVectorNotInt` +- **Transcendental**: `XMVectorSin`, `XMVectorCos`, `XMVectorSinCos`, `XMVectorTan`, `XMVectorSinH`, `XMVectorCosH`, `XMVectorATan`, `XMVectorATan2` +- **Exponential/Power**: `XMVectorExp2`, `XMVectorLog2`, `XMVectorPow`, `XMVectorSqrt`, `XMVectorReciprocalSqrt` + +#### 2D Vector Functions (`XMVector2*`) + +`XMVector2Length`, `XMVector2LengthSq`, `XMVector2Dot`, `XMVector2Cross`, `XMVector2Normalize`, `XMVector2Transform`, `XMVector2TransformCoord`, `XMVector2TransformNormal` + +#### 3D Vector Functions (`XMVector3*`) + +`XMVector3Length`, `XMVector3LengthSq`, `XMVector3Dot`, `XMVector3Cross`, `XMVector3Normalize`, `XMVector3Transform`, `XMVector3TransformCoord`, `XMVector3TransformNormal`, `XMVector3Project`, `XMVector3Unproject`, `XMVector3Rotate`, `XMVector3InverseRotate`, `XMVector3ComponentsFromNormal` + +#### 4D Vector Functions (`XMVector4*`) + +`XMVector4Length`, `XMVector4LengthSq`, `XMVector4Dot`, `XMVector4Cross`, `XMVector4Normalize`, `XMVector4Transform` + +#### Matrix Functions (`XMMatrix*`) + +- **Creation**: `XMMatrixIdentity`, `XMMatrixSet`, `XMMatrixTranslation`, `XMMatrixScaling`, `XMMatrixRotationX/Y/Z`, `XMMatrixRotationAxis`, `XMMatrixRotationQuaternion`, `XMMatrixRotationRollPitchYaw` +- **Operations**: `XMMatrixMultiply`, `XMMatrixTranspose`, `XMMatrixInverse`, `XMMatrixDeterminant` +- **Projection**: `XMMatrixPerspectiveFovLH/RH`, `XMMatrixPerspectiveLH/RH`, `XMMatrixOrthographicLH/RH`, `XMMatrixOrthographicOffCenterLH/RH` +- **View**: `XMMatrixLookAtLH/RH`, `XMMatrixLookToLH/RH` +- **Decomposition**: `XMMatrixDecompose` +- **Transforms**: `XMMatrixTransformation`, `XMMatrixTransformation2D`, `XMMatrixAffineTransformation`, `XMMatrixAffineTransformation2D`, `XMMatrixReflect`, `XMMatrixShadow` + +#### Quaternion Functions (`XMQuaternion*`) + +`XMQuaternionIdentity`, `XMQuaternionMultiply`, `XMQuaternionConjugate`, `XMQuaternionInverse`, `XMQuaternionNormalize`, `XMQuaternionDot`, `XMQuaternionLength`, `XMQuaternionSlerp`, `XMQuaternionRotationMatrix`, `XMQuaternionRotationAxis`, `XMQuaternionRotationRollPitchYaw`, `XMQuaternionToAxisAngle` + +#### Color Functions (`XMColor*`) + +`XMColorEqual`, `XMColorNegative`, `XMColorModulate`, `XMColorAdjustSaturation`, `XMColorAdjustContrast`, `XMColorRGBToHSL`, `XMColorHSLToRGB`, `XMColorRGBToHSV`, `XMColorHSVToRGB`, `XMColorRGBToXYZ`, `XMColorXYZToRGB`, `XMColorRGBToSRGB`, `XMColorSRGBToRGB` + +#### Plane Functions (`XMPlane*`) + +`XMPlaneNormalize`, `XMPlaneDot`, `XMPlaneDotCoord`, `XMPlaneDotNormal`, `XMPlaneFromPointNormal`, `XMPlaneFromPoints`, `XMPlaneIntersectLine`, `XMPlaneIntersectPlane`, `XMPlaneTransform` + +### Utility Functions and Constants + +- `XMConvertToRadians`, `XMConvertToDegrees` +- `XMScalarSin`, `XMScalarCos`, `XMScalarSinCos`, `XMScalarACos`, `XMScalarASin` +- `XMVerifyCPUSupport` +- Constants: `XM_PI`, `XM_2PI`, `XM_1DIVPI`, `XM_PIDIV2`, `XM_PIDIV4` + +--- + +## Collision Header: `DirectXCollision.h` + +Provides bounding volume types and intersection/containment tests. + +### Bounding Volume Types + +| Type | Description | +| --- | --- | +| `BoundingSphere` | Sphere defined by center and radius | +| `BoundingBox` | Axis-aligned bounding box (AABB) | +| `BoundingOrientedBox` | Oriented bounding box (OBB) | +| `BoundingFrustum` | View frustum | + +### Common Methods on Bounding Volumes + +Each bounding volume type provides: + +- `Transform` — Transform the volume by a matrix or scale/rotation/translation +- `Contains` — Test containment of a point, triangle, sphere, box, or frustum +- `Intersects` — Test intersection with a ray, plane, triangle, sphere, box, or frustum +- `ContainedBy` — Test if contained by a set of planes (frustum culling) +- `CreateFromPoints` — Static factory from a point cloud +- `CreateMerged` — Static factory merging two volumes +- `GetCorners` — Retrieve the 8 corners (box/frustum) + +### Intersection Test Functions + +- `TriangleTests::Intersects` — Ray-triangle and triangle-triangle intersection +- `TriangleTests::ContainedBy` — Triangle vs. frustum planes + +--- + +## Packed Vector Header: `DirectXPackedVector.h` + +Provides GPU-friendly packed types in the `DirectX::PackedVector` namespace. Each type includes `XMLoad*` and `XMStore*` conversion functions. + +### Packed Types + +| Type | Format | +| --- | --- | +| `XMCOLOR` | BGRA 8-bit per channel (32-bit) | +| `XMHALF2` / `XMHALF4` | 16-bit half-precision float | +| `XMSHORTN2` / `XMSHORTN4` | Signed normalized 16-bit | +| `XMUSHORT2` / `XMUSHORT4` / `XMUSHORTN2` / `XMUSHORTN4` | Unsigned 16-bit | +| `XMBYTE2` / `XMBYTE4` / `XMBYTEN2` / `XMBYTEN4` | Signed 8-bit | +| `XMUBYTE2` / `XMUBYTE4` / `XMUBYTEN2` / `XMUBYTEN4` | Unsigned 8-bit | +| `XMU555` | 5-bit RGB + 1-bit alpha | +| `XMU565` | 5-6-5 RGB | +| `XMFLOAT3PK` | 11-11-10 packed float (R11G11B10_FLOAT) | +| `XMFLOAT3SE` | 9-9-9-5 shared exponent (R9G9B9E5) | +| `XMUNIBBLE4` | 4-4-4-4 unsigned | +| `XMUDECN4` / `XMUDEC4` | 10-10-10-2 unsigned | +| `XMDECN4` / `XMDEC4` | 10-10-10-2 signed (deprecated) | +| `XMXDEC4` / `XMXDECN4` | 10-10-10-2 extended (deprecated) | + +--- + +## Colors Header: `DirectXColors.h` + +Predefined color constants as `XMVECTORF32` values: + +- `DirectX::Colors::*` — sRGB color constants (e.g., `Colors::Red`, `Colors::CornflowerBlue`) +- `DirectX::ColorsLinear::*` — Linear-space equivalents for use in linear rendering pipelines + +> These are also known as ".NET colors" + +--- + +## SHMath (Spherical Harmonics) + +**Header**: `SHMath/DirectXSH.h` +**Namespace**: `DirectX` +**Compilation**: Requires compiling `DirectXSH.cpp` (and optionally `DirectXSHD3D11.cpp` / `DirectXSHD3D12.cpp`) + +Spherical harmonics (SH) functions for real-time lighting. Supports orders 2 through 6. + +### Constants + +| Constant | Value | +| --- | --- | +| `XM_SH_MINORDER` | 2 | +| `XM_SH_MAXORDER` | 6 | + +### Core SH Functions + +| Function | Description | +| --- | --- | +| `XMSHEvalDirection` | Evaluate SH basis functions for a given direction | +| `XMSHRotate` | Rotate SH coefficients by a rotation matrix | +| `XMSHRotateZ` | Rotate SH coefficients around the Z axis | +| `XMSHAdd` | Add two sets of SH coefficients | +| `XMSHScale` | Scale SH coefficients by a scalar | +| `XMSHDot` | Dot product of two SH coefficient sets | +| `XMSHMultiply` | Multiply (convolve) two SH coefficient sets | +| `XMSHMultiply2` through `XMSHMultiply6` | Order-specific optimized multiply | + +### Light Evaluation Functions + +| Function | Description | +| --- | --- | +| `XMSHEvalDirectionalLight` | Project a directional light into SH coefficients | +| `XMSHEvalSphericalLight` | Project a spherical area light into SH coefficients | +| `XMSHEvalConeLight` | Project a cone light into SH coefficients | +| `XMSHEvalHemisphereLight` | Project a hemisphere light into SH coefficients | + +### Cubemap Projection (Optional) + +| Function | Description | +| --- | --- | +| `SHProjectCubeMap` (D3D11) | Project a D3D11 cubemap texture into SH (requires `DirectXSHD3D11.cpp`) | +| `SHProjectCubeMap` (D3D12) | Project D3D12 cubemap subresource data into SH (requires `DirectXSHD3D12.cpp`) | + + +--- + +## XDSP (Digital Signal Processing) + +**Header**: `XDSP/XDSP.h` +**Namespace**: `XDSP` +**Compilation**: Header-only (all functions are `inline`) + +Provides DirectXMath-based DSP functions primarily for audio FFT processing. All buffer parameters must be 16-byte aligned. Only single-precision floating-point is supported. + +### Primary Functions + +| Function | Description | +| --- | --- | +| `FFTInitializeUnityTable` | Initialize twiddle factor (unity) table for FFT | +| `FFT` | In-place radix-4 decimation-in-time FFT | +| `FFTUnswizzle` | Reorder FFT output from bit-reversed to natural order | +| `FFTPolar` | Convert complex FFT results to magnitude (polar form) | +| `FFTInterleaved` | Forward FFT on interleaved (real/imaginary alternating) data | +| `IFFTDeinterleaved` | Inverse FFT producing deinterleaved real/imaginary output | +| `Deinterleave` | Split interleaved real/imaginary data into separate buffers | +| `Interleave` | Combine separate real/imaginary buffers into interleaved format | + +### Internal Butterfly Functions + +These are used internally by the FFT routines: + +| Function | Description | +| --- | --- | +| `vmulComplex` | Parallel multiplication of four complex numbers | +| `ButterflyDIT4_1` | Radix-4 DIT butterfly (single vector) | +| `ButterflyDIT4_4` | Radix-4 DIT butterfly (four parallel vectors) | +| `FFT4` | 4-point FFT | +| `FFT8` | 8-point FFT | +| `FFT16` | 16-point FFT | + +### Usage Pattern + +```cpp +#include +#include "XDSP.h" + +// Typical FFT workflow: +// 1. Allocate 16-byte aligned buffers for real, imaginary, and unity table +// 2. Initialize unity table with FFTInitializeUnityTable +// 3. Perform FFT with FFT or FFTInterleaved +// 4. Unswizzle output with FFTUnswizzle +// 5. Optionally convert to polar with FFTPolar +``` + +--- + +## Extension Headers + +Extension headers in `Extensions/` provide instruction-set-specific optimized overrides. Include them **after** `DirectXMath.h` and call functions from their respective namespaces: + +| Header | Namespace | Instruction Set | +| --- | --- | --- | +| `DirectXMathSSE3.h` | `DirectX::SSE3` | SSE3 | +| `DirectXMathSSE4.h` | `DirectX::SSE4` | SSE4.1 | +| `DirectXMathAVX.h` | `DirectX::AVX` | AVX | +| `DirectXMathAVX2.h` | `DirectX::AVX2` | AVX2 | +| `DirectXMathFMA3.h` | `DirectX::FMA3` | FMA3 | +| `DirectXMathFMA4.h` | `DirectX::FMA4` | FMA4 (AMD) | +| `DirectXMathF16C.h` | `DirectX::F16C` | F16C (half-precision) | +| `DirectXMathBE.h` | `DirectX::BEMath` | Big-endian scalar fallback | + +> **Note**: Extensions are not needed when building with `/arch:AVX` or `/arch:AVX2`, as the core library automatically uses the additional instructions. + +--- + +## Further Reading + +- [DirectXMath Programming Guide (Microsoft Learn)](https://learn.microsoft.com/windows/win32/dxmath/ovw-xnamath-progguide) +- [DirectXMath Reference (Microsoft Learn)](https://learn.microsoft.com/windows/win32/dxmath/ovw-xnamath-reference) +- [GitHub Wiki](https://github.com/microsoft/DirectXMath/wiki/) From 1773171dc49cd468d8720b57a8a76de168ecd2ba Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Wed, 3 Jun 2026 00:12:03 -0700 Subject: [PATCH 5/7] Pick markdown lint --- .github/skills/directxmath-usage/reference/overview.md | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/skills/directxmath-usage/reference/overview.md b/.github/skills/directxmath-usage/reference/overview.md index 8802521..247f9c0 100644 --- a/.github/skills/directxmath-usage/reference/overview.md +++ b/.github/skills/directxmath-usage/reference/overview.md @@ -225,7 +225,6 @@ Spherical harmonics (SH) functions for real-time lighting. Supports orders 2 thr | `SHProjectCubeMap` (D3D11) | Project a D3D11 cubemap texture into SH (requires `DirectXSHD3D11.cpp`) | | `SHProjectCubeMap` (D3D12) | Project D3D12 cubemap subresource data into SH (requires `DirectXSHD3D12.cpp`) | - --- ## XDSP (Digital Signal Processing) From 828b4790d2ff6f31e8ccd3874aaf24b67d9c1b28 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 4 Jun 2026 11:19:12 -0700 Subject: [PATCH 6/7] Move usage skill to public location --- .github/copilot-instructions.md | 1 + README.md | 4 ++++ {.github/skills => skills}/directxmath-usage/SKILL.md | 0 .../skills => skills}/directxmath-usage/reference/overview.md | 0 4 files changed, 5 insertions(+) rename {.github/skills => skills}/directxmath-usage/SKILL.md (100%) rename {.github/skills => skills}/directxmath-usage/reference/overview.md (100%) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index dac9690..71967e7 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -43,6 +43,7 @@ MatrixStack/ # D3DX9-like matrix stack implementation for DirectXMath. SHMath/ # Spherical harmonic functions using DirectXMath. Stereo3D/ # Stereo 3D projection matrix functions using DirectXMath created for HoloLens. XDSP/ # Digital Signal Processing (DSP) functions using DirectXMath. +skills/ # Published CoPilot skills for use by developers. Tests/ # Tests are designed to be cloned from a separate repository at this location. wiki/ # Local clone of the GitHub wiki documentation repository. ``` diff --git a/README.md b/README.md index c74ef3e..4c6177c 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,10 @@ These components are designed to work without requiring any content from the leg * Contains miscellaneous build files and scripts. +* ``skills\`` + + * Contains published CoPilot skills for use by developers. + ## Documentation Documentation is available on the [Microsoft Docs](https://docs.microsoft.com/en-us/windows/desktop/dxmath/directxmath-portal). Additional information can be found on the [project wiki](https://github.com/microsoft/DirectXMath/wiki). diff --git a/.github/skills/directxmath-usage/SKILL.md b/skills/directxmath-usage/SKILL.md similarity index 100% rename from .github/skills/directxmath-usage/SKILL.md rename to skills/directxmath-usage/SKILL.md diff --git a/.github/skills/directxmath-usage/reference/overview.md b/skills/directxmath-usage/reference/overview.md similarity index 100% rename from .github/skills/directxmath-usage/reference/overview.md rename to skills/directxmath-usage/reference/overview.md From ac653d856b9f5bc17b262d90ff42e26cfd534244 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 4 Jun 2026 11:44:45 -0700 Subject: [PATCH 7/7] Update readme --- README.md | 14 +++++++++++++- skills/directxmath-usage/SKILL.md | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4c6177c..ce3da77 100644 --- a/README.md +++ b/README.md @@ -55,12 +55,24 @@ These components are designed to work without requiring any content from the leg * ``skills\`` - * Contains published CoPilot skills for use by developers. + * Contains published CoPilot skills for use by developers. ## Documentation Documentation is available on the [Microsoft Docs](https://docs.microsoft.com/en-us/windows/desktop/dxmath/directxmath-portal). Additional information can be found on the [project wiki](https://github.com/microsoft/DirectXMath/wiki). +## CoPilot Usage + +For CoPilot CLI assistance with using DirectXMath, try: + +```bash +winget install GitHub.Copilot +winget install GitHub.cli +gh skill install microsoft/directxmath +copilot +/skills list +``` + ## Compiler support Officially the library is supported with Microsoft Visual C++ 2019 (16.11) or later, clang/LLVM v12 or later, and GCC 10 or later. It should also compile with the Intel C++ and MinGW compilers. diff --git a/skills/directxmath-usage/SKILL.md b/skills/directxmath-usage/SKILL.md index f92b97e..46b679e 100644 --- a/skills/directxmath-usage/SKILL.md +++ b/skills/directxmath-usage/SKILL.md @@ -1,5 +1,5 @@ --- -name: DirectXMath Usage +name: directxmath-usage description: Guide for integrating DirectXMath into new projects and an overview of the API, types, and classes. Use this skill when asked about how to use DirectXMath, integrate it into a project, or for an overview of available functionality. ---