Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/d3d11/d3d11_private.h | 1 + dlls/dxgi/adapter.c | 10 ++++++++++ include/wine/winedxgi.idl | 4 ++-- 3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index 771e923a5c..787fe87b5a 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -30,6 +30,7 @@ #include "winuser.h" #include "objbase.h"
+#include "dxgi1_6.h" #include "d3d11_4.h" #ifdef D3D11_INIT_GUID #include "initguid.h" diff --git a/dlls/dxgi/adapter.c b/dlls/dxgi/adapter.c index 0079759568..a913870319 100644 --- a/dlls/dxgi/adapter.c +++ b/dlls/dxgi/adapter.c @@ -34,6 +34,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_QueryInterface(IWineDXGIAdapter *i TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
if (IsEqualGUID(iid, &IID_IWineDXGIAdapter) + || IsEqualGUID(iid, &IID_IDXGIAdapter4) || IsEqualGUID(iid, &IID_IDXGIAdapter3) || IsEqualGUID(iid, &IID_IDXGIAdapter2) || IsEqualGUID(iid, &IID_IDXGIAdapter1) @@ -301,6 +302,13 @@ static void STDMETHODCALLTYPE dxgi_adapter_UnregisterVideoMemoryBudgetChangeNoti FIXME("iface %p, cookie %#x stub!\n", iface, cookie); }
+static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc3(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC3 *desc) +{ + FIXME("iface %p, desc %p stub!\n", iface, desc); + + return E_NOTIMPL; +} + static const struct IWineDXGIAdapterVtbl dxgi_adapter_vtbl = { dxgi_adapter_QueryInterface, @@ -325,6 +333,8 @@ static const struct IWineDXGIAdapterVtbl dxgi_adapter_vtbl = dxgi_adapter_SetVideoMemoryReservation, dxgi_adapter_RegisterVideoMemoryBudgetChangeNotificationEvent, dxgi_adapter_UnregisterVideoMemoryBudgetChangeNotification, + /* IDXGIAdapter4 methods */ + dxgi_adapter_GetDesc3, };
struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter(IDXGIAdapter *iface) diff --git a/include/wine/winedxgi.idl b/include/wine/winedxgi.idl index 3a1d6fa064..fccf45d792 100644 --- a/include/wine/winedxgi.idl +++ b/include/wine/winedxgi.idl @@ -18,7 +18,7 @@
#pragma makedep header
-import "dxgi1_5.idl"; +import "dxgi1_6.idl";
[ object, @@ -56,7 +56,7 @@ interface IWineDXGIDeviceParent : IUnknown local, uuid(17399d75-964e-4c03-99f8-9d4fd196dd62) ] -interface IWineDXGIAdapter : IDXGIAdapter3 +interface IWineDXGIAdapter : IDXGIAdapter4 { }
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dxgi/adapter.c | 57 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 43 insertions(+), 14 deletions(-)
diff --git a/dlls/dxgi/adapter.c b/dlls/dxgi/adapter.c index a913870319..b96904e90c 100644 --- a/dlls/dxgi/adapter.c +++ b/dlls/dxgi/adapter.c @@ -147,18 +147,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IWineDXGIAdapter *ifac return S_OK; }
-static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc1(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC1 *desc) +static HRESULT dxgi_adapter_get_desc(struct dxgi_adapter *adapter, DXGI_ADAPTER_DESC3 *desc) { - struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); struct wined3d_adapter_identifier adapter_id; char description[128]; HRESULT hr;
- TRACE("iface %p, desc %p.\n", iface, desc); - - if (!desc) - return E_INVALIDARG; - adapter_id.driver_size = 0; adapter_id.description = description; adapter_id.description_size = sizeof(description); @@ -187,13 +181,16 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc1(IWineDXGIAdapter *iface, desc->SharedSystemMemory = 0; /* FIXME */ desc->AdapterLuid = adapter_id.adapter_luid; desc->Flags = 0; + desc->GraphicsPreemptionGranularity = 0; /* FIXME */ + desc->ComputePreemptionGranularity = 0; /* FIXME */
return hr; }
static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC *desc) { - DXGI_ADAPTER_DESC1 desc1; + struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); + DXGI_ADAPTER_DESC3 desc3; HRESULT hr;
TRACE("iface %p, desc %p.\n", iface, desc); @@ -201,8 +198,8 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc(IWineDXGIAdapter *iface, D if (!desc) return E_INVALIDARG;
- if (SUCCEEDED(hr = dxgi_adapter_GetDesc1(iface, &desc1))) - memcpy(desc, &desc1, sizeof(*desc)); + if (SUCCEEDED(hr = dxgi_adapter_get_desc(adapter, &desc3))) + memcpy(desc, &desc3, sizeof(*desc));
return hr; } @@ -249,11 +246,38 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_CheckInterfaceSupport(IWineDXGIAda return S_OK; }
+static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc1(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC1 *desc) +{ + struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); + DXGI_ADAPTER_DESC3 desc3; + HRESULT hr; + + TRACE("iface %p, desc %p.\n", iface, desc); + + if (!desc) + return E_INVALIDARG; + + if (SUCCEEDED(hr = dxgi_adapter_get_desc(adapter, &desc3))) + memcpy(desc, &desc3, sizeof(*desc)); + + return hr; +} + static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc2(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC2 *desc) { - FIXME("iface %p, desc %p stub!\n", iface, desc); + struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface); + DXGI_ADAPTER_DESC3 desc3; + HRESULT hr;
- return E_NOTIMPL; + TRACE("iface %p, desc %p.\n", iface, desc); + + if (!desc) + return E_INVALIDARG; + + if (SUCCEEDED(hr = dxgi_adapter_get_desc(adapter, &desc3))) + memcpy(desc, &desc3, sizeof(*desc)); + + return hr; }
static HRESULT STDMETHODCALLTYPE dxgi_adapter_RegisterHardwareContentProtectionTeardownStatusEvent( @@ -304,9 +328,14 @@ static void STDMETHODCALLTYPE dxgi_adapter_UnregisterVideoMemoryBudgetChangeNoti
static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetDesc3(IWineDXGIAdapter *iface, DXGI_ADAPTER_DESC3 *desc) { - FIXME("iface %p, desc %p stub!\n", iface, desc); + struct dxgi_adapter *adapter = impl_from_IWineDXGIAdapter(iface);
- return E_NOTIMPL; + TRACE("iface %p, desc %p.\n", iface, desc); + + if (!desc) + return E_INVALIDARG; + + return dxgi_adapter_get_desc(adapter, desc); }
static const struct IWineDXGIAdapterVtbl dxgi_adapter_vtbl =
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com