Repository navigation
Update DirectX-Headers to v1.620.2 - #9149
Open
Damyan Pepper (damyanp) wants to merge 7 commits into
Open
Damyan Pepper (damyanp) wants to merge 7 commits into
Damyan Pepper (damyanp) wants to merge 7 commits into
Conversation
Use the newest DirectX-Headers main revision compatible with DXC's existing non-Windows type definitions. Later revisions include basetsd.h through rpcndr.h, conflicting with WinAdapter.h declarations. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
DirectX-Headers a4eb3a60 defines the shared Windows types with Windows widths. Maintaining parallel DXC declarations prevents these headers from being combined safely, so use the pinned upstream stubs and IUnknown definition as the source of the shared API types. The resulting BOOL, LONG and ULONG layouts break binary compatibility with older non-Windows clients. Consumers and FFI bindings must use matching declarations and libraries, while internal Unicode conversions retain their bool outputs rather than exposing the ABI change to unrelated helpers. Retain full GUID string parsing and register both emulated UUIDs and native Clang UUID attributes, since an upstream QueryInterface template parsed before DXC can still use the emulated helper. Propagating the required build-tree include paths and bundling the complete WSL header chain with its MIT notice keeps source and installed API consumers usable without a separate DirectX-Headers installation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Pick up the current stable headers and upstream WSL annotation fixes without requiring further DXC compatibility changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document the include paths and header order for installed DXC headers. Keep the binary compatibility warning in the release notes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use identical definitions from the pinned DirectX-Headers WSL stubs and drop an unused warning suppression. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the upstream adapter first in the test to exercise UUID emulation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the upstream adapter first without turning its const-dropping casts into test build errors. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The intentional non-Windows COM ABI break and installed-header changes require maintainer review of release coordination and GCC/Clang interoperability, which source inspection alone cannot validate.
No open issues 🎉
What changed in this PR
Aligns DXC’s non-Windows compatibility layer with DirectX-Headers to support v1.620.2 and address the header conflicts reported in #5079. The type changes break non-Windows binary compatibility, requiring applications to rebuild with matching headers and libraries.
Changes:
- Reuses DirectX-Headers types and COM support, with corresponding Unicode and stream-call adjustments.
- Updates build include paths, packages required headers and licenses, and documents integration and compatibility requirements.
- Adds regression tests for UUID handling, COM queries, Unicode conversion, and the 32-bit
BOOLinterface.
| File | Description |
|---|---|
unittests/DxcSupport/WinAdapterTest.cpp |
Adds UUID, COM query, and Unicode conversion tests. |
tools/clang/unittests/HLSL/CompilerTest.cpp |
Tests that blob encoding writes a full 32-bit BOOL. |
tools/clang/tools/dxcvalidator/dxcvalidator.cpp |
Uses ULONG for the stream write result. |
tools/clang/tools/dxcompiler/CMakeLists.txt |
Exposes non-Windows include paths to build-tree consumers. |
lib/DxcSupport/Unicode.cpp |
Changes the conversion output parameter to LPBOOL. |
include/dxc/WinAdapter.h |
Reuses upstream types and COM definitions while adapting UUID support. |
include/dxc/Support/Unicode.h |
Includes shared types and updates the conversion declaration. |
include/dxc/CMakeLists.txt |
Installs required DirectX-Headers stubs, adapter, and license. |
docs/ReleaseNotes.md |
Documents the binary compatibility break and bundled licenses. |
docs/BuildingAndTestingDXC.rst |
Explains non-Windows include paths, include order, and redistribution. |
CMakeLists.txt |
Makes DirectX-Headers available earlier and adds its root include path. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DXC's Windows type definitions conflict with DirectX-Headers on non-Windows
platforms. This conflict prevents a dependency update. Use the definitions
and COM support from DirectX-Headers instead.
On non-Windows platforms, this change breaks binary compatibility with older
DXC releases. Rebuild applications with matching DXC headers and libraries.
Update foreign function interface declarations for
BOOL,LONG, andULONG.Fixes #5079
Assisted by GitHub Copilot.