-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
[D3D12] Dynamically load Agility SDK. #86551
Conversation
1f47cbb
to
5723128
Compare
A nice enhancement. |
5723128
to
126a763
Compare
Thanks! |
It looks like this caused a build-time regression: https://forum.godotengine.org/t/error-while-compiling-godot-for-d3d12-with-scons/41654 |
I've just found this approach won't work on an up-to-date Windows 10, such as mine: The SDK config interface is not available until a later release (Windows 10 insider build or Windows 11, I guess), as said in https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nn-d3d12-id3d12sdkconfiguration: |
Since it loaded dynamically, I assume it won't break DX12, but only prevent it from loading Agility libs. I guess we should keep both predefined exports and factory approach in this case (will test if it works later). |
Instead of relaying on exported symbols and D3D12 loader, load SDK directly via device factory. This should allow using user specified Agility SDK version instead of hard-coded one, and fallback to the system D3D driver if it's not found (so we can make official builds with Agility support, but avoid shipping proprietary DLL that require uses to accept EULA).
Adds
rendering/rendering_device/d3d12/agility_sdk_version
property to control used SDK version.Based on Mesa Agility loading code - https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18305/diffs#b974333948460f1be995f150bf4db414b591b1b1