-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Port for Microsoft GitHub DirectX-Headers #15222
Port for Microsoft GitHub DirectX-Headers #15222
Conversation
The failures on osx:
|
Supporting Linux, Windows, and UWP is a requirement, but not OSX. |
LGTM now, thanks for your PR @walbourn. |
Do these headers conflict with the ones that come with the Windows SDK in use and/or is it likely to invalidate caching? |
@BillyONeal These are explicitly 'newer' than the Windows SDK releases by design, so they should always come first. |
BTW, I believe the issue on OSX is that the upstream |
Right, but that means that, for example
gives you different output than
i.e. the existence of this port can break binary caching of other ports. I'm not sure what the right fix is though. I'll ask around. |
qt5-base should probably update to depend on directx-headers... |
The problem is that because these headers come with the Windows PSDK, we don't know which ports would have to get such updates. |
@BillyONeal Any open source package that includes Windows PSDK headers today is probably in violation of the Windows SDK license agreement in the first place. To my knowledge, the directxmath and directx-headers repos are some of the only 'blessed with MIT license' versions of Windows SDK headers. In any case, given the target developers for these I doubt anyone using QT, for example, is going to use directxmath and/or directx-headers in the first place. That said, if a client library is using the 'core' d3d12.h or dxgiformat.h stuff that's in the Windows SDK version, then that's going to be there in directx-headers. The POR is that directx-headers is going to be strictly newer than any existing Windows 10 SDK versions. Since these are all nano-COM and use known ABI, it shouldn't pose any problem if you accidentally end up with an 'old' header and a 'new' import library. The only problem will be a compile-time failure if you need header content from directx-headers that isn't in your Windows 10 SDK in which case you have to fix the usage order in your CMakeLists/vcproj. |
This isn't about open source packages that contain Windows headers. This is about open source packages that consume PSDK headers. Before this port exists, all those headers come from the system (morally, the triplet), since they're part of the Windows SDK that comes with your compiler. After this port exists, where the headers come from depends on whether this port is installed, which generally shouldn't happen. That is, if I used qt as my example because we currently have an issue where nightly CI for x64-windows-static randomly fails depending on whether directxsdk is installed before or after the qt bits. If the qt bits go first, the directxsdk parts come from the Windows SDK, which is what qt's authors intend, and succeeds. But if the directxsdk port goes first the libs get selected from that port, which breaks qt's build. This PR expands that problem to include headers too. We have post-build checks when installing multiple ports to make sure only one port provides a given entity in the
It's possible that the right fix is indeed to accept these ports but skip them in
It poses a problem in that it breaks binary caching, since it affects the compiled output for all other ports in the system in a way that doesn't affect their hash. |
@BillyONeal Actually, I forgot to mention an important detail here that was discussed in-depth with the DirectX-Headers maintainers a while back... With or without directx-headers, the following client code will always use the Windows 10 PSDK headers:
And the following will use the existing "d3dx12.h" in the project--it's not part of the Windows 10 PSDK:
In order to consume the headers in the directx-headers package, client code must be modified:
The |
That indeed resolves this exact concern, thank you, and thanks for the patience :) |
There is a new open source GitHub project for the latest official DirectX 12 headers. This PR adds a port for it.