Signed-off-by: Józef Kucia jkucia@codeweavers.com --- dlls/dxgi/adapter.c | 24 ++++++++++++++++++++++++ include/wine/winedxgi.idl | 12 ++++++++++++ 2 files changed, 36 insertions(+)
diff --git a/dlls/dxgi/adapter.c b/dlls/dxgi/adapter.c index 31baae6f49ff..d96cb1e5b237 100644 --- a/dlls/dxgi/adapter.c +++ b/dlls/dxgi/adapter.c @@ -364,6 +364,28 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc3(IWineDXGIAdapter *iface, return dxgi_adapter_get_desc(adapter, desc); }
+static HRESULT STDMETHODCALLTYPE dxgi_adapter_get_adapter_info(IWineDXGIAdapter *iface, + struct wine_dxgi_adapter_info *info) +{ + struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); + struct wined3d_adapter_identifier adapter_id; + HRESULT hr; + + TRACE("iface %p, info %p.\n", iface, info); + + memset(&adapter_id, 0, sizeof(adapter_id)); + if (SUCCEEDED(hr = wined3d_get_adapter_identifier(adapter->factory->wined3d, adapter->ordinal, 0, &adapter_id))) + { + info->driver_uuid = adapter_id.driver_uuid; + info->device_uuid = adapter_id.device_uuid; + info->vendor_id = adapter_id.vendor_id; + info->device_id = adapter_id.device_id; + info->luid = adapter_id.adapter_luid; + } + + return hr; +} + static const struct IWineDXGIAdapterVtbl dxgi_adapter_vtbl = { dxgi_adapter_QueryInterface, @@ -390,6 +412,8 @@ static const struct IWineDXGIAdapterVtbl dxgi_adapter_vtbl = dxgi_adapter_UnregisterVideoMemoryBudgetChangeNotification, /* IDXGIAdapter4 methods */ dxgi_adapter_GetDesc3, + /* IWineDXGIAdapter methods */ + dxgi_adapter_get_adapter_info, };
struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter(IDXGIAdapter *iface) diff --git a/include/wine/winedxgi.idl b/include/wine/winedxgi.idl index f300eb928b62..84440901a9e9 100644 --- a/include/wine/winedxgi.idl +++ b/include/wine/winedxgi.idl @@ -68,6 +68,17 @@ interface IWineDXGIDeviceParent : IUnknown struct wined3d_device_parent *get_wined3d_device_parent(); }
+struct wine_dxgi_adapter_info +{ + GUID driver_uuid; + GUID device_uuid; + + DWORD vendor_id; + DWORD device_id; + + LUID luid; +}; + [ object, local, @@ -75,6 +86,7 @@ interface IWineDXGIDeviceParent : IUnknown ] interface IWineDXGIAdapter : IDXGIAdapter4 { + HRESULT get_adapter_info([out] struct wine_dxgi_adapter_info *info); }
[