Implement a device sorting for all systems
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.
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?
If we implement it as a layer, we are planning on this being lower (closer to the Implementation). But that will either take forcing the loading location in the loader for now or the implementation of #328. I have ideas for #328, but am only working on this part-time currently.
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. Does it mean some sort of filtering is still necessary?
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 https://github.com/KhronosGroup/Vulkan-Loader/pull/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 VK_LOADER_DEVICE_SELECT option which you set with vendorID hex value ":" deviceID hex value. Just like the Mesa device select layer. In fact, I also pay attention to the Mesa select option of MESA_VK_DEVICE_SELECT. I still plan on improving this even more in the future, but for now, I aimed for the easiest to get quorum from Khronos members.
The option is there to force a device first using the new
VK_LOADER_DEVICE_SELECToption which you set with vendorID hex value ":" deviceID hex value. Just like the Mesa device select layer. In fact, I also pay attention to the Mesa select option ofMESA_VK_DEVICE_SELECT. I still plan on improving this even more in the future, but for now, I aimed for the easiest to get quorum from Khronos members.
Got it. Thanks Mark
Linux consistent sorting enabled