Repository navigation
Add dxcapi.h to Win32 metadata - #5279
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the DXC API bindings and feature integration.
No open issues 🎉
What changed in this PR
Adds DXC shader compiler APIs to the Win32 metadata pipeline and exposes them through the
dxcapi feature in windows and windows-sys, addressing #5191.
Changes:
- Includes
dxcapi.handdxcompiler.libin the Win32 scrape inputs. - Adds DXC metadata and generated bindings for compiler, blob, utility, and related APIs.
- Wires up feature dependencies and module exports, retaining the documented header-related omissions
and raw output-pointer signatures.
| File | Description |
|---|---|
metadata/win32/dxcapi.rdl |
Adds DXC constants, types, functions, and COM interfaces. |
crates/tools/win32/src/import_policy.rs |
Adds dxcompiler.lib for import resolution. |
crates/tools/win32/src/headers.rs |
Includes dxcapi.h in header scraping. |
crates/libs/windows/src/Windows/Win32/mod.rs |
Exports the feature-gated DXC module. |
crates/libs/windows/src/Windows/Win32/dxcapi/mod.rs |
Adds generated DXC bindings and COM implementation support. |
crates/libs/windows/Cargo.toml |
Defines the dxcapi feature and dependencies. |
crates/libs/sys/src/Windows/Win32/mod.rs |
Exports the feature-gated raw DXC module. |
crates/libs/sys/src/Windows/Win32/dxcapi/mod.rs |
Adds raw DXC imports, constants, and data types. |
crates/libs/sys/Cargo.toml |
Defines the dxcapi feature and dependencies. |
Review effort: Balanced
|
Are the problematic headers related to win32metadata? Have you already created an issue or informed the person responsible for the headers? |
Collaborator
Author
|
No, these headers come from the Windows SDK directly. I suspect they may originate in this project: ...but that's just a guess. Damyan Pepper (@damyanp) may know. |
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.
Adds
dxcapi.handdxcompiler.libtotool-win32so the DXC compiler APIs are available under the newdxcapifeature. Fixes #5191Omitted due to header bugs:
IDxcLinkerandIDxcResult- some methods (RegisterLibrary,GetNumOutputs,GetOutputByIndex,PrimaryOutput) are missingSTDMETHODCALLTYPE, so they're thiscall on x86 rather than stdcall like the rest of the interface. These will appear once the header is fixed.IDxcResultcan still be reached by passing its IID toCompile.IDxcPdbUtils- depends onIDxcResult.CLSID_DxcUtils- defined as a dynamic copy ofCLSID_DxcLibraryrather than a constant initializer, see Support additional GUID/CLSID declarations #5190.DxcCreateInstanceuses_Out_ LPVOID*rather than_COM_Outptr_in the header so it returnsHRESULTwith a raw out pointer - as the issue mentions, the annotation change can be tracked separately.