-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Update WinSDK module for latest changes #36213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
(cherry picked from commit 281ae3c)
Add the module definitions for: - Direct3D v12 - XAudio 2.9 - XInput 1.4 Additionally, add the following, unusable modules: - DXCore DXCore requires C++ Support (C++11 or newer to be precise) and is not yet available until C++ interop can be made to work fully. (cherry picked from commit c5bc227)
This exposes `IDesktopWindowXamlSourceNative` interface, which is used for embedding WinUI XAML controls into Win32 apps (cherry picked from commit 6970054)
In some cases when building the `XAudio` module, we would end up going down C++ paths: ``` C:\Program Files (x86)\Windows Kits\10\/Include/10.0.17763.0/um/xaudio2.h:61:26: error: 'uuid' attribute is not supported in C interface __declspec(uuid("2B02E3CF-2E0B-4ec3-BE45-1B2A3FE7210D")) IXAudio2; ^ <module-includes>:29:10: note: in file included from <module-includes>:29: ^ ``` Although this works with newer SDKs, it does not work with older SDKs. Filter out the module for the time being with a requirement on `C++`. This should be possible to use with `-enable-cxx-interop`. (cherry picked from commit 715d81c)
The UAP variant is included into the WinSDK module which then fails to run. Adjust the linkage. (cherry picked from commit 5bfbaad)
Add the ActiveX module to the Windows SDK. This is needed for the IPropBag2 interface. (cherry picked from commit fc8cd45)
This adds the Direct3D v11 module for Windows. This is required to gain access to the DXGI interfaces, which homes the DXGISwapChain interface. (cherry picked from commit 86a8b1b)
Add the extensions for the Direct3D v10 API to enable access to the newer DXGISwapChain interfaces. Additionally, correct the linking to ensure that we pick up the v10 version of the import library. (cherry picked from commit e508b1a)
There is no usermode header which has the DXGI1.6 interfaces included unfortunately. This adds the interfaces to the module which is required for IDXGIAdapter4 interface. (cherry picked from commit 4084f7a)
The DirectX subsystem may require access to the HLSL compiler for building the shaders before uploading to the GPU. This is adds to the modulemap the D3DCompiler module to get access to the compiler. (cherry picked from commit 997cb0f)
The debug header is used for enumeration of certain DXGI interfaces related to debugging of the pipeline. Add this to gain access to the interfaces and some of the global GUIDs associated with it. (cherry picked from commit 66a9ae4)
@swift-ci please smoke test |
@swift-ci please test Windows platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
The issue was originally found by building Swift/Win32 with a 5.4 release branch build. This change enables use of the the WinSDK headers in Swift code. Without this, many parts of the platform remain inaccessible to Swift code. It has been tested by building some Swift projects, Swift/Win32 and swift-crypto with the updated modulemap applied to the WinSDK. The changes are cherry-picked from #35176, #35221, #35249, #35268, #35326, #35338, #35526, #35539, #35573, #35576, #35618. |
This cherry-picks from main changes for the WinSDK module to the 5.4 release branch. This only impacts the Windows path and should be safe for the platform as it only changes how headers are mapped into the clang importer.