Skip to content
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

Merged
merged 1 commit into from Jan 2, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Dec 27, 2023

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

@bruvzg bruvzg added this to the 4.3 milestone Dec 27, 2023
@bruvzg bruvzg marked this pull request as ready for review December 27, 2023 16:11
@bruvzg bruvzg requested review from a team as code owners December 27, 2023 16:11
doc/classes/ProjectSettings.xml Outdated Show resolved Hide resolved
drivers/d3d12/d3d12_context.cpp Outdated Show resolved Hide resolved
@RandomShaper
Copy link
Member

A nice enhancement.

@akien-mga akien-mga merged commit cf519ab into godotengine:master Jan 2, 2024
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@Calinou
Copy link
Member

Calinou commented Jan 11, 2024

It looks like this caused a build-time regression: https://forum.godotengine.org/t/error-while-compiling-godot-for-d3d12-with-scons/41654

@RandomShaper
Copy link
Member

I've just found this approach won't work on an up-to-date Windows 10, such as mine:
image

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:
image

@bruvzg
Copy link
Member Author

bruvzg commented Feb 17, 2024

The SDK config interface is not available until a later release (Windows 10 insider build or Windows 11, I guess)

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants