gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 548 forks source link

Graphics card is chosen depending on monitor #3613

Closed LimitLost closed 3 years ago

LimitLost commented 3 years ago

Short info header:

Hey! So as in the title, the graphics card of choice seems to be selected by on which monitor is positioned window (and which graphics card monitor uses). I think this shouldn't be the case and user should be able to choose it (there is special menu on atleast my laptop, when right clicking executable, where I can choose on which graphics card window is running. When I choose running on dedicated graphics, window is like for a split second running on it and immediately changing to integrated graphics, from what I've seen in task manager).

attackgoat commented 3 years ago

I'm assuming that your code selects an adapter using a method similar to the example code.

If that's the case you might need to expand the logic, here is an example or another.

kvark commented 3 years ago

Yep, gfx-hal doesn't choose an adapter for your, it's all in your control. Closing on that note, but please free to continue discussion and/or reopen!

LimitLost commented 3 years ago

Oh, Ok then, thanks for anwsers! Well, this means that I will need to open this issue on Amethyst, because I've got same problem using it.

LimitLost commented 3 years ago

Oh w8, second example is from amethyst, interesting since I've got same problem while using it

LimitLost commented 3 years ago

I will try to add code from examples to my code, I will reopen issue if it doesn't fix it

LimitLost commented 3 years ago

Yep, same issue still occurs. Also for some reason I don't see the option for reopening issue. Can somebody do it, please?

kvark commented 3 years ago

I don't see the option for reopening issue

Weird and unfortunate. We do want anybody to be able to re-open. I'll do this now.

Yep, same issue still occurs.

Strictly speaking, it's not bug. Examples pick an adapter that can natively present to the window they run on. So if different screens are connected to different adapters, moving the window between screens would change the preferred adapter. This is totally fine for the examples.

So this issue then could be reopened on the basis of an enhancement request to the examples: let's have some more elaborate adapter selection logic demonstrated.

LimitLost commented 3 years ago

Issue fixed! Problem was solved after I updated drivers for Intel GPU. And sorry for misconception, I think that before not even Intel GPU was used, maybe CPU (?). I haven't read task manager properly.