-
Notifications
You must be signed in to change notification settings - Fork 282
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
Implement a device sorting for all systems #657
Comments
I'm curious how this will interact with the existing vendor-specific layers? Is there some guarantee that the LunarG layer will load below these vendor layers or vice-versa? |
How is the plan for games that have their own selection criteria? For example, games that always grab the most performant device. Then any sorting being done at layer/loader is not going to affect them. |
This proposal is not to filter, only to sort. Any application that does extensive sorting on their own hand shouldn't be affected because this will only change the relative order of entries. |
Actually, my proposal is to allow users to filter themselves. By default, it will not filter just sort. I plan to release a doc internal soon on my sorting algorithm proposal. Once that's reviewed I'll start making it more visible. |
Hi @MarkY-LunarG glad to see #764. Thanks for doing the work! Still, I want to kindly check with the “proposal is to allow users to filter themselves”. We would be more happier to see that in the loader : ) |
The option is there to force a device first using the new |
Got it. Thanks Mark |
The loader ICD ordering could be random on Linux based on using readdir to find ICD manifest files. This can result in random behaviors as applications that select only the first device can switch which device is used. To resolve this, we now sort based on device type and then internally to the types based on PCI bus information. This also introduces a VK_LOADER_DEFAULT_DEVICE environment variable that can be used to force a specific PCI device. This environment variable is actually a duplicate of the MESA_VK_DEVICE_SELECT variable, which is also looked for if the loader environment variable is not found. Note, that at least one ICD must support it for the extension to be used at all. So we only do the sorting if one ICD supports it. Fixes part of #657
The loader ICD ordering could be random on Linux based on using readdir to find ICD manifest files. This can result in random behaviors as applications that select only the first device can switch which device is used. To resolve this, we now sort based on device type and then internally to the types based on PCI bus information. This also introduces a VK_LOADER_DEFAULT_DEVICE environment variable that can be used to force a specific PCI device. This environment variable is actually a duplicate of the MESA_VK_DEVICE_SELECT variable, which is also looked for if the loader environment variable is not found. Note, that at least one ICD must support it for the extension to be used at all. So we only do the sorting if one ICD supports it. Fixes part of #657
The loader ICD ordering could be random on Linux based on using readdir to find ICD manifest files. This can result in random behaviors as applications that select only the first device can switch which device is used. To resolve this, we now sort based on device type and then internally to the types based on PCI bus information. This also introduces a VK_LOADER_DEFAULT_DEVICE environment variable that can be used to force a specific PCI device. This environment variable is actually a duplicate of the MESA_VK_DEVICE_SELECT variable, which is also looked for if the loader environment variable is not found. Note, that at least one ICD must support it for the extension to be used at all. So we only do the sorting if one ICD supports it. Fixes part of #657
Linux consistent sorting enabled |
Implement a mechanism to sort devices based on some user preferences. These should include being able to prioritize most performant or most power-efficient devices. Also, it should be consistent from one run to another. A possible second alternative option might be to allow power adapter settings affect it in an "auto" mode (plugged in -> performance, battery -> power efficient). Experiment with this in a layer first.
The text was updated successfully, but these errors were encountered: