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: D3D12-on-Windows-7 support #8345

Open
wants to merge 3 commits into
base: master
from

Conversation

@stenzek
Copy link
Contributor

commented Sep 3, 2019

This PR integrates the newly-released 12on7 library for the D3D12 runtime on Windows 7.

Initial performance testing seems to be about the same for me, but I'm also using an NVIDIA GPU.

If you want to test this, you'll need to copy the files from Externals/D3D12/bin/x64/* to Binaries/x64.

The binaries themselves present a potential issue with the GPL license - are we allowed to distribute them as an excluded "system library"? The DLLs themselves are loaded dynamically, so worst case we can just ask users to download it themselves and add it.

Process for testing:

  1. Download the nuget package from here: https://www.nuget.org/packages/Microsoft.Direct3D.D3D12On7
  2. Open the nuget package with your favorite archiving software (7-zip works, or rename it to a .zip).
  3. Extract bin\x64\dxilconv7.dll to the directory with Dolphin.exe
  4. Create a directory named 12on7 in your Dolphin directory.
  5. Extract bin\x64\d3d12.dll to that new 12on7 directory.
  6. Run Dolphin, select Direct3D 12 in graphics configuration, have fun.
@fantesykikachu

This comment has been minimized.

Copy link

commented Sep 3, 2019

Unfortunately not only is distributing the binaries a violation of the GPL so is distributing the headers, but then again we already include the xaudio 2.7 headers which is also a violation, and while you are dynamically linking against the dll you are still statically linking the headers which are not GPL compatible and are thus also a violation.

@Triang3l

This comment has been minimized.

Copy link

commented Sep 4, 2019

If something (GPL in this case) creates a lot more problems (largely irrelevant to the project itself and its goals even) than it solves, maybe it'd be helpful to throw such trash away in the future (maybe also disregarding the 95% rule that comes from the lawyers of the same organization that wrote GPL)?

@mbc07

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2019

Ha ha, that's just not how it works, and good luck trying to relicense a project as big as Dolphin. It has been done once in the past (going from GPLv2 to GPLv2+) and was a monumental task to pull off...

@JosJuice

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2019

The GPL does solve problems for us, and like mbc07 said, we wouldn't be able to switch away from it at this point even if we wanted to.

@Helios747

This comment has been minimized.

Copy link
Contributor

commented Sep 4, 2019

If this gives Windows 7 logic ops it might be worth it. But otherwise I don't see the point if performance is largely the same. Especially if this is just some wrapper down to D3D11.

in regards to the GPL problem, if we decide that the benefits are there and worth merging, yeah I don't see why we can't have UI code that instructs users to go and grab the binary.

@stenzek

This comment has been minimized.

Copy link
Contributor Author

commented Sep 4, 2019

@Helios747 the header file may still pose a challenge. The presentation interface is different for 12on7 so we can't use it without the header.

@Triang3l

This comment has been minimized.

Copy link

commented Sep 4, 2019

@Helios747 It exposes everything, even raytracing. Though need to be more careful about heap/committed resource allocations with it (same as with Vulkan's 4096 memory object limit, I think) since it apparently has to write all the existing allocations to every command list.

@CookiePLMonster

This comment has been minimized.

Copy link
Contributor

commented Sep 5, 2019

__has_include is a thing in C++17, and all API usage can be killed off with either if constexpr and SFINAE. This would make it possible to ask users to paste 12on7 headers to a specific directory in Dolphin's source directory instead of shipping it and it would make it compileable both with and without them. Does that solve the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
7 participants
You can’t perform that action at this time.