QRhi Device Choose
-
wrote on 10 Oct 2024, 17:47 last edited by
Hi,
updated my Qt to 6.8 this morning. Runs like a charm.
Now I'd like to choose my QRHI backend device, as I have 2 GPU available. Unfortunately, QRHI grabs the slow first one. Any recommendation how to choose the physical devise for OpenGL, Vulkan, Direct3D and Metal?
Richard -
Hi,
I am not an expert in that part of Qt but I don't think there is currently such an API.
-
wrote on 11 Oct 2024, 06:12 last edited by
This is what i found so far,
"void QVulkanWindow::setPhysicalDeviceIndex(int idx)
Requests the usage of the physical device with index idx. The index corresponds to the list returned from availablePhysicalDevices().
By default the first physical device is used."
But thats not what i need. -
wrote on 11 Oct 2024, 06:36 last edited by
I was able to switch to the faster GPU device by define in the main.cpp
extern "C" {
_declspec(dllexport) short NvOptimusEnablement = 1;
_declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
} -
That's indeed highly specific to Vulkan. I was looking for something generic.
That might be a feature request that you could create on the bug tracker.
-
wrote on 11 Oct 2024, 10:06 last edited by
No, also OpenGL now accept the faster NVidea GPU id=1.
I make a ticket already. -
Can you post a link to the ticket ? It will make it easier to find for other people looking for a similar functionality.
2/7