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

Add Direct3D 12 support to official Windows binaries #86490

Closed
oscarbg opened this issue Dec 24, 2023 · 5 comments · Fixed by godotengine/godot-build-scripts#92
Closed

Add Direct3D 12 support to official Windows binaries #86490

oscarbg opened this issue Dec 24, 2023 · 5 comments · Fixed by godotengine/godot-build-scripts#92

Comments

@oscarbg
Copy link

oscarbg commented Dec 24, 2023

Tested versions

reproducible in Godot_v4.3-dev1_win64

System information

win11 Godot_v4.3-dev1_win64

Issue description

Hi,
wanted to test Godot_v4.3-dev1 new D3D12 support by downloading prebuild Windows binary but seems it doesn't come with D3D12 support prebuilt..

Steps to reproduce

running:
Godot_v4.3-dev1_win64.exe --rendering-driver d3d12
shows:

Unknown rendering driver 'd3d12', aborting.
Valid options are 'vulkan', 'opengl3', 'opengl3_angle', 'dummy', .

Minimal reproduction project (MRP)

no need

@jsjtxietian
Copy link
Contributor

@Calinou Calinou changed the title Request: prebuilt D3D12 support in Godot_v4.3-dev1_win64 binary.. Add Direct3D 12 support to official Windows binaries Jan 1, 2024
@Calinou
Copy link
Member

Calinou commented Jan 1, 2024

For context:

Being based on proprietary technology, D3D12 support comes as an optional feature keeping the open source spirit of the engine intact. Make sure to check the updated documentation for compiling Godot with D3D12 enabled (there is also an update regarding cross-compilation getting ready to be merged).

#86551 makes it possible to lift this requirement (and MinGW1 building support was added by #83452), so it should be possible to publish official D3D12-enabled builds once both PRs are merged.

Footnotes

  1. Official Godot Windows releases are cross-compiled from Linux using MinGW.

@bruvzg
Copy link
Member

bruvzg commented Jan 2, 2024

#86551 makes it possible to lift this requirement (and MinGW1 building support was added by #83452), so it should be possible to publish official D3D12-enabled builds once both PRs are merged.

While we can enable DX support in the builds (and Vulkan / OpenGL will work without any extra components, since libs are loaded dynamically), it seems to still need dxil.dll to use DX, and I was probably wrong about its license. DirectXShaderCompiler is open source, but I do not think it contains source for this lib. And binary release have a separate EULA for the lib. So I'm not sure how it should be handled, EULA for both dxil and Aglity libs allow redistribution under the following conditions:

Distribution Requirements. For any code you distribute, you must:

add significant primary functionality to it in your applications; 

i.  require distributors and external end users to agree to terms that protect it and Microsoft at least as much as this agreement; and

ii. indemnify, defend, and hold harmless Microsoft from any claims, including attorneys’ fees, related to the distribution or use of your applications, except to the extent that any claim is based solely on the unmodified distributable code.

Distribution Restrictions. You may not:

use Microsoft’s trademarks or trade dress in your application in any way that suggests your application comes from or is endorsed by Microsoft; or modify or distribute the source code of any distributable code so that any part of it becomes subject to any license that requires that the distributable code, any other part of the software, or any of Microsoft’s other intellectual property be disclosed or distributed in source code form, or that others have the right to modify it.

@clayjohn
Copy link
Member

clayjohn commented Jan 2, 2024

To chime in here as well. The licencing issue for dxil.dll is the largest barrier to shipping Godot builds with D3D12 enabled by default. We don't want to ship Godot in two files and we don't want to bundle non-open source code into the Godot executable (or ship non-open source code to our users at all).

We are talking with Microsoft about how to resolve this so we can enable D3D12 by default, but I expect it will take some time to resolve as it isn't a technical limitation.

@bruvzg
Copy link
Member

bruvzg commented Jan 2, 2024

To chime in here as well. The licencing issue for dxil.dll is the largest barrier to shipping Godot builds with D3D12 enabled by default. We don't want to ship Godot in two files and we don't want to bundle non-open source code into the Godot executable (or ship non-open source code to our users at all).

We are talking with Microsoft about how to resolve this so we can enable D3D12 by default, but I expect it will take some time to resolve as it isn't a technical limitation.

Meanwhile, we still can enable DX12 (all headers are MIT licensed, so no proprietary code in the main executable), and users who want to use it will only need to add dxil.dll to the engine folder. It's inconvenient, but at least gives an option to use it without making a custom build.

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

Successfully merging a pull request may close this issue.

5 participants