On 12/20/18 6:02 AM, Józef Kucia wrote:
On Tue, Dec 18, 2018 at 5:21 PM Zhiyi Zhang zzhang@codeweavers.com wrote:
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com
dlls/dxgi/tests/dxgi.c | 4 +-- dlls/wined3d/Makefile.in | 2 +- dlls/wined3d/directx.c | 66 +++++++++++++++++++++++++++------- dlls/wined3d/wined3d_main.c | 2 +- dlls/wined3d/wined3d_private.h | 2 +- 5 files changed, 58 insertions(+), 18 deletions(-)
In my opinion, we shouldn't use SetupAPI directly in wined3d. Wined3d should get LUIDs from OpenGL. Device UUIDs, driver UUIDs and LUIDs are also exposed by OpenGL, see EXT_external_objects and EXT_external_objects_win32. If it's problematic to implement those extensions, we could also consider extending WGL_WINE_query_renderer.
Please correct me if I am wrong. It seems to me that OpenGL doesn't support enumerating the adapters. Yes, OpenGL can get the device UUIDs if the extensions exist. But it binds to current OpenGL context. Since we don't have a way to correlate DISPLAYs to adapters, I don't see a way to enumerate adapters via OpenGL.