Commit f2d8491e authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

dxgi: Update to IDXGIFactory4.

parent 729baa8a
...@@ -69,7 +69,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IDXGIAdapter1 *iface) ...@@ -69,7 +69,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IDXGIAdapter1 *iface)
if (!refcount) if (!refcount)
{ {
wined3d_private_store_cleanup(&adapter->private_store); wined3d_private_store_cleanup(&adapter->private_store);
IDXGIFactory2_Release(&adapter->factory->IDXGIFactory2_iface); IDXGIFactory4_Release(&adapter->factory->IDXGIFactory4_iface);
HeapFree(GetProcessHeap(), 0, adapter); HeapFree(GetProcessHeap(), 0, adapter);
} }
...@@ -112,7 +112,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetParent(IDXGIAdapter1 *iface, RE ...@@ -112,7 +112,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_GetParent(IDXGIAdapter1 *iface, RE
TRACE("iface %p, iid %s, parent %p.\n", iface, debugstr_guid(iid), parent); TRACE("iface %p, iid %s, parent %p.\n", iface, debugstr_guid(iid), parent);
return IDXGIFactory2_QueryInterface(&adapter->factory->IDXGIFactory2_iface, iid, parent); return IDXGIFactory4_QueryInterface(&adapter->factory->IDXGIFactory4_iface, iid, parent);
} }
static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IDXGIAdapter1 *iface, static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IDXGIAdapter1 *iface,
...@@ -273,7 +273,7 @@ static void dxgi_adapter_init(struct dxgi_adapter *adapter, struct dxgi_factory ...@@ -273,7 +273,7 @@ static void dxgi_adapter_init(struct dxgi_adapter *adapter, struct dxgi_factory
wined3d_private_store_init(&adapter->private_store); wined3d_private_store_init(&adapter->private_store);
adapter->ordinal = ordinal; adapter->ordinal = ordinal;
adapter->factory = factory; adapter->factory = factory;
IDXGIFactory2_AddRef(&adapter->factory->IDXGIFactory2_iface); IDXGIFactory4_AddRef(&adapter->factory->IDXGIFactory4_iface);
} }
HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal, struct dxgi_adapter **adapter) HRESULT dxgi_adapter_create(struct dxgi_factory *factory, UINT ordinal, struct dxgi_adapter **adapter)
......
...@@ -374,7 +374,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l ...@@ -374,7 +374,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
void *layer_base; void *layer_base;
HRESULT hr; HRESULT hr;
if (!(dxgi_factory = unsafe_impl_from_IDXGIFactory2((IDXGIFactory2 *)factory))) if (!(dxgi_factory = unsafe_impl_from_IDXGIFactory4((IDXGIFactory4 *)factory)))
{ {
WARN("This is not the factory we're looking for.\n"); WARN("This is not the factory we're looking for.\n");
return E_FAIL; return E_FAIL;
......
...@@ -104,7 +104,7 @@ HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store, ...@@ -104,7 +104,7 @@ HRESULT dxgi_set_private_data_interface(struct wined3d_private_store *store,
/* IDXGIFactory */ /* IDXGIFactory */
struct dxgi_factory struct dxgi_factory
{ {
IDXGIFactory2 IDXGIFactory2_iface; IDXGIFactory4 IDXGIFactory4_iface;
LONG refcount; LONG refcount;
struct wined3d_private_store private_store; struct wined3d_private_store private_store;
struct wined3d *wined3d; struct wined3d *wined3d;
...@@ -114,7 +114,7 @@ struct dxgi_factory ...@@ -114,7 +114,7 @@ struct dxgi_factory
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN; HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN;
HWND dxgi_factory_get_device_window(struct dxgi_factory *factory) DECLSPEC_HIDDEN; HWND dxgi_factory_get_device_window(struct dxgi_factory *factory) DECLSPEC_HIDDEN;
struct dxgi_factory *unsafe_impl_from_IDXGIFactory2(IDXGIFactory2 *iface) DECLSPEC_HIDDEN; struct dxgi_factory *unsafe_impl_from_IDXGIFactory4(IDXGIFactory4 *iface) DECLSPEC_HIDDEN;
/* IDXGIDevice */ /* IDXGIDevice */
struct dxgi_device struct dxgi_device
......
...@@ -24,18 +24,20 @@ ...@@ -24,18 +24,20 @@
WINE_DEFAULT_DEBUG_CHANNEL(dxgi); WINE_DEFAULT_DEBUG_CHANNEL(dxgi);
static inline struct dxgi_factory *impl_from_IDXGIFactory2(IDXGIFactory2 *iface) static inline struct dxgi_factory *impl_from_IDXGIFactory4(IDXGIFactory4 *iface)
{ {
return CONTAINING_RECORD(iface, struct dxgi_factory, IDXGIFactory2_iface); return CONTAINING_RECORD(iface, struct dxgi_factory, IDXGIFactory4_iface);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_QueryInterface(IDXGIFactory2 *iface, REFIID iid, void **out) static HRESULT STDMETHODCALLTYPE dxgi_factory_QueryInterface(IDXGIFactory4 *iface, REFIID iid, void **out)
{ {
struct dxgi_factory *factory = impl_from_IDXGIFactory2(iface); struct dxgi_factory *factory = impl_from_IDXGIFactory4(iface);
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
if (IsEqualGUID(iid, &IID_IDXGIFactory2) if (IsEqualGUID(iid, &IID_IDXGIFactory4)
|| IsEqualGUID(iid, &IID_IDXGIFactory3)
|| IsEqualGUID(iid, &IID_IDXGIFactory2)
|| (factory->extended && IsEqualGUID(iid, &IID_IDXGIFactory1)) || (factory->extended && IsEqualGUID(iid, &IID_IDXGIFactory1))
|| IsEqualGUID(iid, &IID_IDXGIFactory) || IsEqualGUID(iid, &IID_IDXGIFactory)
|| IsEqualGUID(iid, &IID_IDXGIObject) || IsEqualGUID(iid, &IID_IDXGIObject)
...@@ -52,9 +54,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_QueryInterface(IDXGIFactory2 *ifac ...@@ -52,9 +54,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_QueryInterface(IDXGIFactory2 *ifac
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IDXGIFactory2 *iface) static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IDXGIFactory4 *iface)
{ {
struct dxgi_factory *factory = impl_from_IDXGIFactory2(iface); struct dxgi_factory *factory = impl_from_IDXGIFactory4(iface);
ULONG refcount = InterlockedIncrement(&factory->refcount); ULONG refcount = InterlockedIncrement(&factory->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); TRACE("%p increasing refcount to %u.\n", iface, refcount);
...@@ -62,9 +64,9 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IDXGIFactory2 *iface) ...@@ -62,9 +64,9 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IDXGIFactory2 *iface)
return refcount; return refcount;
} }
static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory2 *iface) static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory4 *iface)
{ {
struct dxgi_factory *factory = impl_from_IDXGIFactory2(iface); struct dxgi_factory *factory = impl_from_IDXGIFactory4(iface);
ULONG refcount = InterlockedDecrement(&factory->refcount); ULONG refcount = InterlockedDecrement(&factory->refcount);
TRACE("%p decreasing refcount to %u.\n", iface, refcount); TRACE("%p decreasing refcount to %u.\n", iface, refcount);
...@@ -84,37 +86,37 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory2 *iface) ...@@ -84,37 +86,37 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IDXGIFactory2 *iface)
return refcount; return refcount;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateData(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateData(IDXGIFactory4 *iface,
REFGUID guid, UINT data_size, const void *data) REFGUID guid, UINT data_size, const void *data)
{ {
struct dxgi_factory *factory = impl_from_IDXGIFactory2(iface); struct dxgi_factory *factory = impl_from_IDXGIFactory4(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data); TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_set_private_data(&factory->private_store, guid, data_size, data); return dxgi_set_private_data(&factory->private_store, guid, data_size, data);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateDataInterface(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_SetPrivateDataInterface(IDXGIFactory4 *iface,
REFGUID guid, const IUnknown *object) REFGUID guid, const IUnknown *object)
{ {
struct dxgi_factory *factory = impl_from_IDXGIFactory2(iface); struct dxgi_factory *factory = impl_from_IDXGIFactory4(iface);
TRACE("iface %p, guid %s, object %p.\n", iface, debugstr_guid(guid), object); TRACE("iface %p, guid %s, object %p.\n", iface, debugstr_guid(guid), object);
return dxgi_set_private_data_interface(&factory->private_store, guid, object); return dxgi_set_private_data_interface(&factory->private_store, guid, object);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetPrivateData(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_GetPrivateData(IDXGIFactory4 *iface,
REFGUID guid, UINT *data_size, void *data) REFGUID guid, UINT *data_size, void *data)
{ {
struct dxgi_factory *factory = impl_from_IDXGIFactory2(iface); struct dxgi_factory *factory = impl_from_IDXGIFactory4(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data); TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_get_private_data(&factory->private_store, guid, data_size, data); return dxgi_get_private_data(&factory->private_store, guid, data_size, data);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetParent(IDXGIFactory2 *iface, REFIID iid, void **parent) static HRESULT STDMETHODCALLTYPE dxgi_factory_GetParent(IDXGIFactory4 *iface, REFIID iid, void **parent)
{ {
WARN("iface %p, iid %s, parent %p.\n", iface, debugstr_guid(iid), parent); WARN("iface %p, iid %s, parent %p.\n", iface, debugstr_guid(iid), parent);
...@@ -123,10 +125,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetParent(IDXGIFactory2 *iface, RE ...@@ -123,10 +125,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetParent(IDXGIFactory2 *iface, RE
return E_NOINTERFACE; return E_NOINTERFACE;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters1(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters1(IDXGIFactory4 *iface,
UINT adapter_idx, IDXGIAdapter1 **adapter) UINT adapter_idx, IDXGIAdapter1 **adapter)
{ {
struct dxgi_factory *factory = impl_from_IDXGIFactory2(iface); struct dxgi_factory *factory = impl_from_IDXGIFactory4(iface);
struct dxgi_adapter *adapter_object; struct dxgi_adapter *adapter_object;
UINT adapter_count; UINT adapter_count;
HRESULT hr; HRESULT hr;
...@@ -159,7 +161,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters1(IDXGIFactory2 *iface ...@@ -159,7 +161,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters1(IDXGIFactory2 *iface
return S_OK; return S_OK;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IDXGIFactory4 *iface,
UINT adapter_idx, IDXGIAdapter **adapter) UINT adapter_idx, IDXGIAdapter **adapter)
{ {
TRACE("iface %p, adapter_idx %u, adapter %p.\n", iface, adapter_idx, adapter); TRACE("iface %p, adapter_idx %u, adapter %p.\n", iface, adapter_idx, adapter);
...@@ -167,24 +169,24 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IDXGIFactory2 *iface, ...@@ -167,24 +169,24 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IDXGIFactory2 *iface,
return dxgi_factory_EnumAdapters1(iface, adapter_idx, (IDXGIAdapter1 **)adapter); return dxgi_factory_EnumAdapters1(iface, adapter_idx, (IDXGIAdapter1 **)adapter);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IDXGIFactory2 *iface, HWND window, UINT flags) static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IDXGIFactory4 *iface, HWND window, UINT flags)
{ {
FIXME("iface %p, window %p, flags %#x stub!\n", iface, window, flags); FIXME("iface %p, window %p, flags %#x stub!\n", iface, window, flags);
return S_OK; return S_OK;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IDXGIFactory2 *iface, HWND *window) static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IDXGIFactory4 *iface, HWND *window)
{ {
FIXME("iface %p, window %p stub!\n", iface, window); FIXME("iface %p, window %p stub!\n", iface, window);
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory4 *iface,
IUnknown *device, DXGI_SWAP_CHAIN_DESC *desc, IDXGISwapChain **swapchain) IUnknown *device, DXGI_SWAP_CHAIN_DESC *desc, IDXGISwapChain **swapchain)
{ {
struct dxgi_factory *factory = impl_from_IDXGIFactory2(iface); struct dxgi_factory *factory = impl_from_IDXGIFactory4(iface);
DXGI_SWAP_CHAIN_FULLSCREEN_DESC fullscreen_desc; DXGI_SWAP_CHAIN_FULLSCREEN_DESC fullscreen_desc;
DXGI_SWAP_CHAIN_DESC1 swapchain_desc; DXGI_SWAP_CHAIN_DESC1 swapchain_desc;
...@@ -213,12 +215,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory2 *ifa ...@@ -213,12 +215,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IDXGIFactory2 *ifa
fullscreen_desc.Scaling = desc->BufferDesc.Scaling; fullscreen_desc.Scaling = desc->BufferDesc.Scaling;
fullscreen_desc.Windowed = desc->Windowed; fullscreen_desc.Windowed = desc->Windowed;
return IDXGIFactory2_CreateSwapChainForHwnd(&factory->IDXGIFactory2_iface, return IDXGIFactory4_CreateSwapChainForHwnd(&factory->IDXGIFactory4_iface,
device, desc->OutputWindow, &swapchain_desc, &fullscreen_desc, NULL, device, desc->OutputWindow, &swapchain_desc, &fullscreen_desc, NULL,
(IDXGISwapChain1 **)swapchain); (IDXGISwapChain1 **)swapchain);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IDXGIFactory4 *iface,
HMODULE swrast, IDXGIAdapter **adapter) HMODULE swrast, IDXGIAdapter **adapter)
{ {
FIXME("iface %p, swrast %p, adapter %p stub!\n", iface, swrast, adapter); FIXME("iface %p, swrast %p, adapter %p stub!\n", iface, swrast, adapter);
...@@ -226,21 +228,21 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IDXGIFactory ...@@ -226,21 +228,21 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSoftwareAdapter(IDXGIFactory
return E_NOTIMPL; return E_NOTIMPL;
} }
static BOOL STDMETHODCALLTYPE dxgi_factory_IsCurrent(IDXGIFactory2 *iface) static BOOL STDMETHODCALLTYPE dxgi_factory_IsCurrent(IDXGIFactory4 *iface)
{ {
FIXME("iface %p stub!\n", iface); FIXME("iface %p stub!\n", iface);
return TRUE; return TRUE;
} }
static BOOL STDMETHODCALLTYPE dxgi_factory_IsWindowedStereoEnabled(IDXGIFactory2 *iface) static BOOL STDMETHODCALLTYPE dxgi_factory_IsWindowedStereoEnabled(IDXGIFactory4 *iface)
{ {
FIXME("iface %p stub!\n", iface); FIXME("iface %p stub!\n", iface);
return FALSE; return FALSE;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IDXGIFactory4 *iface,
IUnknown *device, HWND window, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc, IUnknown *device, HWND window, const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc,
const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc, const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc,
IDXGIOutput *output, IDXGISwapChain1 **swapchain) IDXGIOutput *output, IDXGISwapChain1 **swapchain)
...@@ -338,7 +340,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IDXGIFactor ...@@ -338,7 +340,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForHwnd(IDXGIFactor
return S_OK; return S_OK;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForCoreWindow(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForCoreWindow(IDXGIFactory4 *iface,
IUnknown *device, IUnknown *window, const DXGI_SWAP_CHAIN_DESC1 *desc, IUnknown *device, IUnknown *window, const DXGI_SWAP_CHAIN_DESC1 *desc,
IDXGIOutput *output, IDXGISwapChain1 **swapchain) IDXGIOutput *output, IDXGISwapChain1 **swapchain)
{ {
...@@ -348,7 +350,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForCoreWindow(IDXGI ...@@ -348,7 +350,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForCoreWindow(IDXGI
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetSharedResourceAdapterLuid(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_GetSharedResourceAdapterLuid(IDXGIFactory4 *iface,
HANDLE resource, LUID *luid) HANDLE resource, LUID *luid)
{ {
FIXME("iface %p, resource %p, luid %p stub!\n", iface, resource, luid); FIXME("iface %p, resource %p, luid %p stub!\n", iface, resource, luid);
...@@ -356,7 +358,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetSharedResourceAdapterLuid(IDXGI ...@@ -356,7 +358,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_GetSharedResourceAdapterLuid(IDXGI
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusWindow(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusWindow(IDXGIFactory4 *iface,
HWND window, UINT message, DWORD *cookie) HWND window, UINT message, DWORD *cookie)
{ {
FIXME("iface %p, window %p, message %#x, cookie %p stub!\n", FIXME("iface %p, window %p, message %#x, cookie %p stub!\n",
...@@ -365,7 +367,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusWindow(IDXG ...@@ -365,7 +367,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusWindow(IDXG
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusEvent(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusEvent(IDXGIFactory4 *iface,
HANDLE event, DWORD *cookie) HANDLE event, DWORD *cookie)
{ {
FIXME("iface %p, event %p, cookie %p stub!\n", iface, event, cookie); FIXME("iface %p, event %p, cookie %p stub!\n", iface, event, cookie);
...@@ -373,12 +375,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusEvent(IDXGIFac ...@@ -373,12 +375,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusEvent(IDXGIFac
return E_NOTIMPL; return E_NOTIMPL;
} }
static void STDMETHODCALLTYPE dxgi_factory_UnregisterStereoStatus(IDXGIFactory2 *iface, DWORD cookie) static void STDMETHODCALLTYPE dxgi_factory_UnregisterStereoStatus(IDXGIFactory4 *iface, DWORD cookie)
{ {
FIXME("iface %p, cookie %#x stub!n", iface, cookie); FIXME("iface %p, cookie %#x stub!n", iface, cookie);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusWindow(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusWindow(IDXGIFactory4 *iface,
HWND window, UINT message, DWORD *cookie) HWND window, UINT message, DWORD *cookie)
{ {
FIXME("iface %p, window %p, message %#x, cookie %p stub!\n", FIXME("iface %p, window %p, message %#x, cookie %p stub!\n",
...@@ -387,7 +389,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusWindow(IDXGIFa ...@@ -387,7 +389,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusWindow(IDXGIFa
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusEvent(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusEvent(IDXGIFactory4 *iface,
HANDLE event, DWORD *cookie) HANDLE event, DWORD *cookie)
{ {
FIXME("iface %p, event %p, cookie %p stub!\n", iface, event, cookie); FIXME("iface %p, event %p, cookie %p stub!\n", iface, event, cookie);
...@@ -395,12 +397,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusEvent(IDXGI ...@@ -395,12 +397,12 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusEvent(IDXGI
return E_NOTIMPL; return E_NOTIMPL;
} }
static void STDMETHODCALLTYPE dxgi_factory_UnregisterOcclusionStatus(IDXGIFactory2 *iface, DWORD cookie) static void STDMETHODCALLTYPE dxgi_factory_UnregisterOcclusionStatus(IDXGIFactory4 *iface, DWORD cookie)
{ {
FIXME("iface %p, cookie %#x stub!\n", iface, cookie); FIXME("iface %p, cookie %#x stub!\n", iface, cookie);
} }
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForComposition(IDXGIFactory2 *iface, static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForComposition(IDXGIFactory4 *iface,
IUnknown *device, const DXGI_SWAP_CHAIN_DESC1 *desc, IDXGIOutput *output, IDXGISwapChain1 **swapchain) IUnknown *device, const DXGI_SWAP_CHAIN_DESC1 *desc, IDXGIOutput *output, IDXGISwapChain1 **swapchain)
{ {
FIXME("iface %p, device %p, desc %p, output %p, swapchain %p stub!\n", FIXME("iface %p, device %p, desc %p, output %p, swapchain %p stub!\n",
...@@ -409,7 +411,31 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForComposition(IDXG ...@@ -409,7 +411,31 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChainForComposition(IDXG
return E_NOTIMPL; return E_NOTIMPL;
} }
static const struct IDXGIFactory2Vtbl dxgi_factory_vtbl = static UINT STDMETHODCALLTYPE dxgi_factory_GetCreationFlags(IDXGIFactory4 *iface)
{
FIXME("iface %p stub!\n", iface);
return 0;
}
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByLuid(IDXGIFactory4 *iface,
LUID luid, REFIID iid, void **adapter)
{
FIXME("iface %p, luid %08x:%08x, iid %s, adapter %p stub!\n",
iface, luid.HighPart, luid.LowPart, debugstr_guid(iid), adapter);
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumWarpAdapter(IDXGIFactory4 *iface,
REFIID iid, void **adapter)
{
FIXME("iface %p, iid %s, adapter %p stub!\n", iface, debugstr_guid(iid), adapter);
return E_NOTIMPL;
}
static const struct IDXGIFactory4Vtbl dxgi_factory_vtbl =
{ {
dxgi_factory_QueryInterface, dxgi_factory_QueryInterface,
dxgi_factory_AddRef, dxgi_factory_AddRef,
...@@ -438,19 +464,24 @@ static const struct IDXGIFactory2Vtbl dxgi_factory_vtbl = ...@@ -438,19 +464,24 @@ static const struct IDXGIFactory2Vtbl dxgi_factory_vtbl =
dxgi_factory_RegisterOcclusionStatusEvent, dxgi_factory_RegisterOcclusionStatusEvent,
dxgi_factory_UnregisterOcclusionStatus, dxgi_factory_UnregisterOcclusionStatus,
dxgi_factory_CreateSwapChainForComposition, dxgi_factory_CreateSwapChainForComposition,
/* IDXGIFactory3 methods */
dxgi_factory_GetCreationFlags,
/* IDXGIFactory4 methods */
dxgi_factory_EnumAdapterByLuid,
dxgi_factory_EnumWarpAdapter,
}; };
struct dxgi_factory *unsafe_impl_from_IDXGIFactory2(IDXGIFactory2 *iface) struct dxgi_factory *unsafe_impl_from_IDXGIFactory4(IDXGIFactory4 *iface)
{ {
if (!iface) if (!iface)
return NULL; return NULL;
assert(iface->lpVtbl == &dxgi_factory_vtbl); assert(iface->lpVtbl == &dxgi_factory_vtbl);
return CONTAINING_RECORD(iface, struct dxgi_factory, IDXGIFactory2_iface); return CONTAINING_RECORD(iface, struct dxgi_factory, IDXGIFactory4_iface);
} }
static HRESULT dxgi_factory_init(struct dxgi_factory *factory, BOOL extended) static HRESULT dxgi_factory_init(struct dxgi_factory *factory, BOOL extended)
{ {
factory->IDXGIFactory2_iface.lpVtbl = &dxgi_factory_vtbl; factory->IDXGIFactory4_iface.lpVtbl = &dxgi_factory_vtbl;
factory->refcount = 1; factory->refcount = 1;
wined3d_private_store_init(&factory->private_store); wined3d_private_store_init(&factory->private_store);
...@@ -485,8 +516,8 @@ HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) ...@@ -485,8 +516,8 @@ HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended)
TRACE("Created factory %p.\n", object); TRACE("Created factory %p.\n", object);
hr = IDXGIFactory2_QueryInterface(&object->IDXGIFactory2_iface, riid, factory); hr = IDXGIFactory4_QueryInterface(&object->IDXGIFactory4_iface, riid, factory);
IDXGIFactory2_Release(&object->IDXGIFactory2_iface); IDXGIFactory4_Release(&object->IDXGIFactory4_iface);
return hr; return hr;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment