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

D3D: allow selecting adapters with no outputs. #1904

Merged
merged 1 commit into from Feb 4, 2015

Conversation

magumagu
Copy link
Contributor

The result might be a little iffy in complicated situations (e.g. you have three graphics cards and monitors hooked up to two of them), but we really need better UI for such cases anyway.

This change has two benefits:

  1. On Windows 8 it provides an easy way to switch to WARP rendering (labeled "Microsoft Basic Render Driver").
  2. It should allow quickly switching between integrated and discrete graphics for Optimus configurations (untested).

The result might be a little iffy in complicated situations (i.e. you have
three graphics cards and monitors hooked up to two of them), but we really
need better UI for such cases anyway.
@magumagu
Copy link
Contributor Author

magumagu commented Feb 3, 2015

Ping.

skidau added a commit that referenced this pull request Feb 4, 2015
D3D: allow selecting adapters with no outputs.
@skidau skidau merged commit c18c50a into dolphin-emu:master Feb 4, 2015
@BFG1992
Copy link

BFG1992 commented Feb 4, 2015

@magumagu Hello, I tested it on the Optimus graphics, it's not working.
Here's a vid: https://www.youtube.com/watch?v=ZmvtGW_sD-M

Sorry, if I reported it to a wrong place, I'm new here :)

@bb010g
Copy link
Contributor

bb010g commented Feb 4, 2015

@BFG1992 IIRC, you need to select built-in & then make sure you're launching Dolphin with the NVIDIA card with a right-click or the NVIDIA Control Panel.

@magumagu
Copy link
Contributor Author

magumagu commented Feb 4, 2015

Here is fine.

Wait a sec, I just took another look at this... and this actually shouldn't work; I have no idea why it works for the WARP renderer. Calling Present() on a swap chain for an adapter that doesn't have any outputs shouldn't do anything useful.

I'll submit another PR to clean up the mess.

@magumagu
Copy link
Contributor Author

magumagu commented Feb 4, 2015

Filtering out WARP specifically is easy enough, but there really isn't any reason to: from the perspective of Dolphin, there isn't really any difference between WARP and any other adapter that isn't attached to an output.

@shuffle2
Copy link
Contributor

shuffle2 commented Feb 4, 2015

I think the proper way to use the D3D api is to detect a request for WARP and change the way you call D3D11CreateDevice* in that case.

Dolphin, there isn't really any difference between WARP and any other adapter that isn't attached to an output.

Yes, and the above testers point out why it doesn't really make sense to just blindly allow all adapters...?

@magumagu
Copy link
Contributor Author

magumagu commented Feb 4, 2015

Well, we don't necessarily have to perform rendering on the same adapter that we perform output on... maybe not worth the effort to implement support for that, though.

@bb010g
Copy link
Contributor

bb010g commented Feb 4, 2015

@shuffle2 If you're referring to @BFG1992's problem, that's been in Optimus systems (like my own) for a while. This PR didn't make the NVIDIA card appear, at least for me.

@BFG1992
Copy link

BFG1992 commented Feb 4, 2015

@bb010g I know about it, but it was said that

It should allow quickly switching between integrated and discrete graphics for Optimus configurations

So I thought that this PR was made to remove the need to additionally configure NVIDIA Control Panel or to launch the emu via GPU selecting in context menu. So I ran it on default Intel chip, to see how it will (or won't) switch to NVIDIA with this new PR merged. Before it was throwing an alert "Failed to enumerate outputs", and now just hangs.
But now I tried to run it on NVIDIA chip (forcing it through NV Control Panel) and it behaves slightly different. I made another vid: https://www.youtube.com/watch?v=kX2PF7Xk4Qk (turn annotations on).

P.S.: Sorry for my English, it's pretty rough :)

@magumagu
Copy link
Contributor Author

magumagu commented Feb 4, 2015

@BFG1992 Thanks for the extra info... that's a little weird, but I'll see what I can do.

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