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: Get rid of DXIL.dll! #94203

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

RandomShaper
Copy link
Member

@RandomShaper RandomShaper commented Jul 11, 2024

This finally allows Godot editor and games to ship with Direct3D 12 without any separate library.

This is thanks to https://devblogs.microsoft.com/directx/open-sourcing-dxil-validator-hash/.

UPDATE: Testing procedure: clearing the shader cache of a project, disabling dev mode on Windows, patching code to generate wrong hashes and verify D3D12 complains, taking code back to normal, clearing shader cache again and verifying the game works with shaders and all.

@bruvzg
Copy link
Member

bruvzg commented Jul 11, 2024

There are multiple mentions of DXIL and DXC in the https://github.com/godotengine/godot-docs/blob/master/contributing/development/compiling/compiling_for_windows.rst that should be removed as well.

@RandomShaper
Copy link
Member Author

Added link to the docs PR.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test, but code looks good to me.

@Calinou
Copy link
Member

Calinou commented Jul 11, 2024

Is #91475 still relevant for Agility SDK? As I understand it, our D3D12 renderer only works out of the box on Windows 11, not Windows 10. This means running the setup script would still be required for users on Windows 10.

@RandomShaper
Copy link
Member Author

It works on W10 as well. The Agility SDK is a way of having features backported to W10, as long as the GPU driver supports them. As a recap, at the moment, the only two features Agility brings to W10 that Godot can use are these:

  • Relaxed format casting, used in certain advanced render features. Disabled at the moment since it was making certain GPU drivers crash.
  • Enhanced barriers. This one is very interesting for performance.

So, Agility is beneficial, but not a must.

I don't know if this answers your question.

@akien-mga akien-mga merged commit 1aa1a18 into godotengine:master Jul 11, 2024
18 checks passed
@akien-mga
Copy link
Member

Thanks! Glad to finally have this solved properly 🎉

@RandomShaper RandomShaper deleted the bye_bye_dxil_dll branch July 11, 2024 21:53
@DarioSamo
Copy link
Contributor

DarioSamo commented Jul 12, 2024

* Relaxed format casting, used in certain advanced render features. Disabled at the moment since it was making certain GPU drivers crash.

I forgot to report back this is actually no longer the case at least for me, but that doesn't mean people won't run into it sadly if the driver isn't up to date.

* Enhanced barriers. This one is very interesting for performance.

So, Agility is beneficial, but not a must.

Yeah, the performance benefit is pretty much the exact improvement the ARG added, so I think we ought to document somewhere that it is actually pretty significant nowadays to use the Agility SDK for any serious project. Plus it enhances compatibility with older systems as well.

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.

5 participants