Skip to content

Update DirectX-Headers to v1.620.2 - #9149

Open
Damyan Pepper (damyanp) wants to merge 7 commits into
microsoft:mainfrom
damyanp:damyanp-directx-headers-next-roll
Open

Damyan Pepper (damyanp) wants to merge 7 commits into
microsoft:mainfrom
damyanp:damyanp-directx-headers-next-roll

Conversation

@damyanp

@damyanp Damyan Pepper (damyanp) commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

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, and ULONG.

Fixes #5079

Assisted by GitHub Copilot.

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>
@damyanp
Damyan Pepper (damyanp) marked this pull request as ready for review November 19, 2026 03:06
Copilot AI balanced review requested due to automatic review settings November 19, 2026 03:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 BOOL interface.
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

Conflict with DirectX-Headers

2 participants