diff --git a/patches/directmanipulation-new-dll/0006-directmanipulation-Support-DCompManipulationComposit.patch b/patches/directmanipulation-new-dll/0006-directmanipulation-Support-DCompManipulationComposit.patch deleted file mode 100644 index 2e81e1aa..00000000 --- a/patches/directmanipulation-new-dll/0006-directmanipulation-Support-DCompManipulationComposit.patch +++ /dev/null @@ -1,182 +0,0 @@ -From 4e92430f5d923dba1aa6174957b3d589b38d5fd7 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Fri, 19 Jul 2019 08:49:51 +1000 -Subject: [PATCH 6/6] directmanipulation: Support DCompManipulationCompositor - interface - ---- - dlls/directmanipulation/directmanip.idl | 10 ++ - dlls/directmanipulation/directmanipulation.c | 124 +++++++++++++++++++ - 2 files changed, 134 insertions(+) - -diff --git a/dlls/directmanipulation/directmanip.idl b/dlls/directmanipulation/directmanip.idl -index ff00668ba5..9e1efa48ed 100644 ---- a/dlls/directmanipulation/directmanip.idl -+++ b/dlls/directmanipulation/directmanip.idl -@@ -36,3 +36,13 @@ coclass DirectManipulationSharedManager - interface IDirectManipulationManager2; - [default] interface IDirectManipulationManager; - } -+ -+[ -+ uuid(79dea627-a08a-43ac-8ef5-6900b9299126), -+ threading(both) -+] -+coclass DCompManipulationCompositor -+{ -+ [default] interface IDirectManipulationCompositor; -+ interface IDirectManipulationFrameInfoProvider; -+} -diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c -index 81efa3688b..0fe5c4be34 100644 ---- a/dlls/directmanipulation/directmanipulation.c -+++ b/dlls/directmanipulation/directmanipulation.c -@@ -210,6 +210,117 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU - return ret; - } - -+struct directcompositor -+{ -+ IDirectManipulationCompositor IDirectManipulationCompositor_iface; -+ LONG ref; -+}; -+ -+static inline struct directcompositor *impl_from_IDirectManipulationCompositor(IDirectManipulationCompositor *iface) -+{ -+ return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationCompositor_iface); -+} -+ -+static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *iface, REFIID riid, void **ppv) -+{ -+ if (IsEqualGUID(riid, &IID_IUnknown) || -+ IsEqualGUID(riid, &IID_IDirectManipulationCompositor)) -+ { -+ IUnknown_AddRef(iface); -+ *ppv = iface; -+ return S_OK; -+ } -+ -+ FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv); -+ return E_NOINTERFACE; -+} -+ -+static ULONG WINAPI compositor_AddRef(IDirectManipulationCompositor *iface) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface); -+ ULONG ref = InterlockedIncrement(&This->ref); -+ -+ TRACE("(%p) ref=%u\n", This, ref); -+ -+ return ref; -+} -+ -+static ULONG WINAPI compositor_Release(IDirectManipulationCompositor *iface) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface); -+ ULONG ref = InterlockedDecrement(&This->ref); -+ -+ TRACE("(%p) ref=%u\n", This, ref); -+ -+ if (!ref) -+ { -+ heap_free(This); -+ } -+ return ref; -+} -+ -+static HRESULT WINAPI compositor_AddContent(IDirectManipulationCompositor *iface, IDirectManipulationContent *content, -+ IUnknown *device, IUnknown *parent, IUnknown *child) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface); -+ FIXME("%p, %p, %p, %p, %p\n", This, content, device, parent, child); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI compositor_RemoveContent(IDirectManipulationCompositor *iface, IDirectManipulationContent *content) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface); -+ FIXME("%p, %p\n", This, content); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI compositor_SetUpdateManager(IDirectManipulationCompositor *iface, IDirectManipulationUpdateManager *manager) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface); -+ FIXME("%p, %p\n", This, manager); -+ return E_NOTIMPL; -+} -+ -+static HRESULT WINAPI compositor_Flush(IDirectManipulationCompositor *iface) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface); -+ FIXME("%p\n", This); -+ return E_NOTIMPL; -+} -+ -+static const struct IDirectManipulationCompositorVtbl compositorVtbl = -+{ -+ compositor_QueryInterface, -+ compositor_AddRef, -+ compositor_Release, -+ compositor_AddContent, -+ compositor_RemoveContent, -+ compositor_SetUpdateManager, -+ compositor_Flush -+}; -+ -+static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) -+{ -+ struct directcompositor *object; -+ HRESULT ret; -+ -+ TRACE("(%p, %s, %p)\n", outer, debugstr_guid(riid), ppv); -+ -+ *ppv = NULL; -+ -+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); -+ if (!object) -+ return E_OUTOFMEMORY; -+ -+ object->IDirectManipulationCompositor_iface.lpVtbl = &compositorVtbl; -+ object->ref = 1; -+ -+ ret = compositor_QueryInterface(&object->IDirectManipulationCompositor_iface, riid, ppv); -+ compositor_Release(&object->IDirectManipulationCompositor_iface); -+ -+ return ret; -+} -+ - static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) - { - *ppv = NULL; -@@ -253,7 +364,16 @@ static const IClassFactoryVtbl DirectFactoryVtbl = { - ClassFactory_LockServer - }; - -+static const IClassFactoryVtbl DirectCompositorVtbl = { -+ ClassFactory_QueryInterface, -+ ClassFactory_AddRef, -+ ClassFactory_Release, -+ DirectCompositor_CreateInstance, -+ ClassFactory_LockServer -+}; -+ - static IClassFactory direct_factory = { &DirectFactoryVtbl }; -+static IClassFactory compositor_factory = { &DirectCompositorVtbl }; - - HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) - { -@@ -262,6 +382,10 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) - TRACE("(CLSID_DirectManipulationManager %s %p)\n", debugstr_guid(riid), ppv); - return IClassFactory_QueryInterface(&direct_factory, riid, ppv); - } -+ else if(IsEqualGUID(&CLSID_DCompManipulationCompositor, rclsid)) { -+ TRACE("(CLSID_DCompManipulationCompositor %s %p)\n", debugstr_guid(riid), ppv); -+ return IClassFactory_QueryInterface(&compositor_factory, riid, ppv); -+ } - - FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); - return CLASS_E_CLASSNOTAVAILABLE; --- -2.17.1 - diff --git a/patches/directmanipulation-new-dll/0007-directmanipulation-Supprot-IDirectManipulationFrameI.patch b/patches/directmanipulation-new-dll/0007-directmanipulation-Supprot-IDirectManipulationFrameI.patch deleted file mode 100644 index fcc924f6..00000000 --- a/patches/directmanipulation-new-dll/0007-directmanipulation-Supprot-IDirectManipulationFrameI.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 9a5ebfa598dedd23eeef0ea4d1a292f4e6281a1c Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Tue, 23 Jul 2019 08:37:12 +1000 -Subject: [PATCH] directmanipulation: Supprot - IDirectManipulationFrameInfoProvider interface in - IDirectManipulationCompositor. - ---- - dlls/directmanipulation/directmanipulation.c | 49 ++++++++++++++++++++ - 1 file changed, 49 insertions(+) - -diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c -index 3b4c19a7994..e1cfec7a6a5 100644 ---- a/dlls/directmanipulation/directmanipulation.c -+++ b/dlls/directmanipulation/directmanipulation.c -@@ -340,6 +340,7 @@ static HRESULT WINAPI DirectManipulation_CreateInstance(IClassFactory *iface, IU - struct directcompositor - { - IDirectManipulationCompositor IDirectManipulationCompositor_iface; -+ IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider_iface; - LONG ref; - }; - -@@ -348,8 +349,15 @@ static inline struct directcompositor *impl_from_IDirectManipulationCompositor(I - return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationCompositor_iface); - } - -+static inline struct directcompositor *impl_from_IDirectManipulationFrameInfoProvider(IDirectManipulationFrameInfoProvider *iface) -+{ -+ return CONTAINING_RECORD(iface, struct directcompositor, IDirectManipulationFrameInfoProvider_iface); -+} -+ - static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *iface, REFIID riid, void **ppv) - { -+ struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface); -+ - if (IsEqualGUID(riid, &IID_IUnknown) || - IsEqualGUID(riid, &IID_IDirectManipulationCompositor)) - { -@@ -357,6 +365,12 @@ static HRESULT WINAPI compositor_QueryInterface(IDirectManipulationCompositor *i - *ppv = iface; - return S_OK; - } -+ else if(IsEqualGUID(riid, &IID_IDirectManipulationFrameInfoProvider)) -+ { -+ IUnknown_AddRef(iface); -+ *ppv = &This->IDirectManipulationFrameInfoProvider_iface; -+ return S_OK; -+ } - - FIXME("(%p)->(%s,%p),not found\n", iface, debugstr_guid(riid), ppv); - return E_NOINTERFACE; -@@ -426,6 +440,40 @@ static const struct IDirectManipulationCompositorVtbl compositorVtbl = - compositor_Flush - }; - -+static HRESULT WINAPI provider_QueryInterface(IDirectManipulationFrameInfoProvider *iface, REFIID riid, void **ppv) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface); -+ return IDirectManipulationCompositor_QueryInterface(&This->IDirectManipulationCompositor_iface, riid, ppv); -+} -+ -+static ULONG WINAPI provider_AddRef(IDirectManipulationFrameInfoProvider *iface) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface); -+ return IDirectManipulationCompositor_AddRef(&This->IDirectManipulationCompositor_iface); -+} -+ -+static ULONG WINAPI provider_Release(IDirectManipulationFrameInfoProvider *iface) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface); -+ return IDirectManipulationCompositor_Release(&This->IDirectManipulationCompositor_iface); -+} -+ -+static HRESULT WINAPI provider_GetNextFrameInfo(IDirectManipulationFrameInfoProvider *iface, ULONGLONG *time, -+ ULONGLONG *process, ULONGLONG *composition) -+{ -+ struct directcompositor *This = impl_from_IDirectManipulationFrameInfoProvider(iface); -+ FIXME("%p, %p, %p, %p\n", This, time, process, composition); -+ return E_NOTIMPL; -+} -+ -+static const struct IDirectManipulationFrameInfoProviderVtbl providerVtbl = -+{ -+ provider_QueryInterface, -+ provider_AddRef, -+ provider_Release, -+ provider_GetNextFrameInfo -+}; -+ - static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) - { - struct directcompositor *object; -@@ -440,6 +488,7 @@ static HRESULT WINAPI DirectCompositor_CreateInstance(IClassFactory *iface, IUnk - return E_OUTOFMEMORY; - - object->IDirectManipulationCompositor_iface.lpVtbl = &compositorVtbl; -+ object->IDirectManipulationFrameInfoProvider_iface.lpVtbl = &providerVtbl; - object->ref = 1; - - ret = compositor_QueryInterface(&object->IDirectManipulationCompositor_iface, riid, ppv); --- -2.27.0 - diff --git a/patches/directmanipulation-new-dll/0009-directmanipulation-Implement-IDirectManipulationComp.patch b/patches/directmanipulation-new-dll/0009-directmanipulation-Implement-IDirectManipulationComp.patch deleted file mode 100644 index f1623b57..00000000 --- a/patches/directmanipulation-new-dll/0009-directmanipulation-Implement-IDirectManipulationComp.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 6f2fd8dc5086a0c0982f71416b8a2b1e25ac6433 Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Wed, 24 Jul 2019 09:15:18 +1000 -Subject: [PATCH] directmanipulation: Implement IDirectManipulationCompositor - SetUpdateManager. - ---- - dlls/directmanipulation/directmanipulation.c | 13 +++++++++++-- - 1 file changed, 11 insertions(+), 2 deletions(-) - -diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c -index 7d00354963..629a41c845 100644 ---- a/dlls/directmanipulation/directmanipulation.c -+++ b/dlls/directmanipulation/directmanipulation.c -@@ -339,6 +339,7 @@ struct directcompositor - { - IDirectManipulationCompositor IDirectManipulationCompositor_iface; - IDirectManipulationFrameInfoProvider IDirectManipulationFrameInfoProvider_iface; -+ IDirectManipulationUpdateManager *manager; - LONG ref; - }; - -@@ -393,6 +394,8 @@ static ULONG WINAPI compositor_Release(IDirectManipulationCompositor *iface) - - if (!ref) - { -+ if(This->manager) -+ IDirectManipulationUpdateManager_Release(This->manager); - heap_free(This); - } - return ref; -@@ -416,8 +419,14 @@ static HRESULT WINAPI compositor_RemoveContent(IDirectManipulationCompositor *if - static HRESULT WINAPI compositor_SetUpdateManager(IDirectManipulationCompositor *iface, IDirectManipulationUpdateManager *manager) - { - struct directcompositor *This = impl_from_IDirectManipulationCompositor(iface); -- FIXME("%p, %p\n", This, manager); -- return E_NOTIMPL; -+ TRACE("%p, %p\n", This, manager); -+ -+ if(!manager) -+ return E_INVALIDARG; -+ -+ This->manager = manager; -+ IDirectManipulationUpdateManager_AddRef(This->manager); -+ return S_OK; - } - - static HRESULT WINAPI compositor_Flush(IDirectManipulationCompositor *iface) --- -2.17.1 - diff --git a/patches/dxva2-Video_Decoder/0001-dxva2-Implement-semi-stub-for-Direct3DDeviceManager9.patch b/patches/dxva2-Video_Decoder/0001-dxva2-Implement-semi-stub-for-Direct3DDeviceManager9.patch deleted file mode 100644 index b43f9c6c..00000000 --- a/patches/dxva2-Video_Decoder/0001-dxva2-Implement-semi-stub-for-Direct3DDeviceManager9.patch +++ /dev/null @@ -1,305 +0,0 @@ -From 32344f3d3cb10c07b4dc2c5547d2226e293f730b Mon Sep 17 00:00:00 2001 -From: Sebastian Lackner -Date: Tue, 10 Feb 2015 16:34:05 +0100 -Subject: [PATCH] dxva2: Implement semi-stub for Direct3DDeviceManager9 - interface. - ---- - dlls/dxva2/Makefile.in | 2 + - dlls/dxva2/devicemanager.c | 213 +++++++++++++++++++++++++++++++++++++ - dlls/dxva2/dxva2_private.h | 21 ++++ - dlls/dxva2/main.c | 7 +- - 4 files changed, 241 insertions(+), 2 deletions(-) - create mode 100644 dlls/dxva2/devicemanager.c - create mode 100644 dlls/dxva2/dxva2_private.h - -diff --git a/dlls/dxva2/Makefile.in b/dlls/dxva2/Makefile.in -index 44e125e9b5..5c3e3842d7 100644 ---- a/dlls/dxva2/Makefile.in -+++ b/dlls/dxva2/Makefile.in -@@ -1,6 +1,8 @@ - MODULE = dxva2.dll -+IMPORTS = ole32 - - EXTRADLLFLAGS = -mno-cygwin - - C_SRCS = \ -+ devicemanager.c \ - main.c -diff --git a/dlls/dxva2/devicemanager.c b/dlls/dxva2/devicemanager.c -new file mode 100644 -index 0000000000..bba0fbc619 ---- /dev/null -+++ b/dlls/dxva2/devicemanager.c -@@ -0,0 +1,213 @@ -+/* -+ * Copyright 2014 Sebastian Lackner for Pipelight -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -+ */ -+ -+#include -+#include "windef.h" -+#include "winbase.h" -+ -+#include "wine/debug.h" -+ -+#define COBJMACROS -+#include "d3d9.h" -+#include "dxva2api.h" -+#include "dxva2_private.h" -+ -+WINE_DEFAULT_DEBUG_CHANNEL(dxva2); -+ -+typedef struct -+{ -+ IDirect3DDeviceManager9 IDirect3DDeviceManager9_iface; -+ LONG refCount; -+ UINT token; -+ IDirect3DDevice9 *device; -+} Direct3DDeviceManager9Impl; -+ -+static inline Direct3DDeviceManager9Impl *impl_from_Direct3DDeviceManager9( IDirect3DDeviceManager9 *iface ) -+{ -+ return CONTAINING_RECORD(iface, Direct3DDeviceManager9Impl, IDirect3DDeviceManager9_iface); -+} -+ -+/***************************************************************************** -+ * IDirect3DDeviceManager9 interface -+ */ -+ -+static HRESULT WINAPI Direct3DDeviceManager9_QueryInterface( IDirect3DDeviceManager9 *iface, REFIID riid, LPVOID *ppv ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_guid(riid), ppv); -+ -+ *ppv = NULL; -+ -+ if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_IDirect3DDeviceManager9)) -+ *ppv = &This->IDirect3DDeviceManager9_iface; -+ -+ if (*ppv) -+ { -+ IUnknown_AddRef((IUnknown *)(*ppv)); -+ return S_OK; -+ } -+ -+ FIXME("No interface for %s\n", debugstr_guid(riid)); -+ return E_NOINTERFACE; -+} -+ -+static ULONG WINAPI Direct3DDeviceManager9_AddRef( IDirect3DDeviceManager9 *iface ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ ULONG refCount = InterlockedIncrement(&This->refCount); -+ -+ TRACE("(%p)->() AddRef from %d\n", This, refCount - 1); -+ -+ return refCount; -+} -+ -+static ULONG WINAPI Direct3DDeviceManager9_Release( IDirect3DDeviceManager9 *iface ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ ULONG refCount = InterlockedDecrement(&This->refCount); -+ -+ TRACE("(%p)->() Release from %d\n", This, refCount + 1); -+ -+ if (!refCount) -+ { -+ TRACE("Destroying\n"); -+ -+ if (This->device) -+ IDirect3DDevice9_Release(This->device); -+ -+ CoTaskMemFree(This); -+ } -+ -+ return refCount; -+} -+ -+static HRESULT WINAPI Direct3DDeviceManager9_ResetDevice( IDirect3DDeviceManager9 *iface, IDirect3DDevice9 *pDevice, UINT resetToken ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ -+ FIXME("(%p)->(%p, %u): semi-stub\n", This, pDevice, resetToken); -+ -+ if (This->device) -+ return E_FAIL; -+ -+ if (resetToken != This->token) -+ return E_INVALIDARG; -+ -+ This->device = pDevice; -+ IDirect3DDevice9_AddRef(This->device); -+ -+ /* TODO: Reset the device, verify token ... */ -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI Direct3DDeviceManager9_OpenDeviceHandle( IDirect3DDeviceManager9 *iface, HANDLE *phDevice ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ -+ FIXME("(%p)->(%p): semi-stub\n", This, phDevice); -+ -+ *phDevice = (HANDLE)This->device; -+ return S_OK; -+} -+ -+static HRESULT WINAPI Direct3DDeviceManager9_CloseDeviceHandle( IDirect3DDeviceManager9 *iface, HANDLE hDevice ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ -+ FIXME("(%p)->(%p): stub\n", This, hDevice); -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI Direct3DDeviceManager9_TestDevice( IDirect3DDeviceManager9 *iface, HANDLE hDevice ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ static int once = 0; -+ -+ if (!once++) -+ FIXME("(%p)->(%p): stub\n", This, hDevice); -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI Direct3DDeviceManager9_LockDevice( IDirect3DDeviceManager9 *iface, HANDLE hDevice, IDirect3DDevice9 **ppDevice, BOOL fBlock ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ -+ FIXME("(%p)->(%p, %p, %d): semi-stub\n", This, hDevice, ppDevice, fBlock); -+ -+ *ppDevice = (IDirect3DDevice9 *)hDevice; -+ IDirect3DDevice9_AddRef(*ppDevice); -+ return S_OK; -+} -+ -+static HRESULT WINAPI Direct3DDeviceManager9_UnlockDevice( IDirect3DDeviceManager9 *iface, HANDLE hDevice, BOOL fSaveState ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ -+ FIXME("(%p)->(%p, %d): stub\n", This, hDevice, fSaveState); -+ -+ return S_OK; -+} -+ -+static HRESULT WINAPI Direct3DDeviceManager9_GetVideoService( IDirect3DDeviceManager9 *iface, HANDLE hDevice, REFIID riid, void **ppService ) -+{ -+ Direct3DDeviceManager9Impl *This = impl_from_Direct3DDeviceManager9(iface); -+ -+ FIXME("(%p)->(%p, %p, %p): stub\n", This, hDevice, riid, ppService); -+ -+ return E_NOTIMPL; -+} -+ -+static const IDirect3DDeviceManager9Vtbl Direct3DDeviceManager9_VTable = -+{ -+ Direct3DDeviceManager9_QueryInterface, -+ Direct3DDeviceManager9_AddRef, -+ Direct3DDeviceManager9_Release, -+ Direct3DDeviceManager9_ResetDevice, -+ Direct3DDeviceManager9_OpenDeviceHandle, -+ Direct3DDeviceManager9_CloseDeviceHandle, -+ Direct3DDeviceManager9_TestDevice, -+ Direct3DDeviceManager9_LockDevice, -+ Direct3DDeviceManager9_UnlockDevice, -+ Direct3DDeviceManager9_GetVideoService -+}; -+ -+HRESULT devicemanager_create( UINT *resetToken, void **ppv ) -+{ -+ Direct3DDeviceManager9Impl *devicemanager; -+ -+ if (!resetToken || !ppv) -+ return E_INVALIDARG; -+ -+ *ppv = NULL; -+ -+ devicemanager = CoTaskMemAlloc(sizeof(Direct3DDeviceManager9Impl)); -+ if (!devicemanager) -+ return E_OUTOFMEMORY; -+ -+ devicemanager->IDirect3DDeviceManager9_iface.lpVtbl = &Direct3DDeviceManager9_VTable; -+ devicemanager->refCount = 1; -+ devicemanager->token = 0xdeadbeef; /* FIXME: provide some better value? */ -+ devicemanager->device = NULL; -+ -+ *resetToken = devicemanager->token; -+ *ppv = devicemanager; -+ return S_OK; -+} -diff --git a/dlls/dxva2/dxva2_private.h b/dlls/dxva2/dxva2_private.h -new file mode 100644 -index 0000000000..d6e59fc6da ---- /dev/null -+++ b/dlls/dxva2/dxva2_private.h -@@ -0,0 +1,21 @@ -+/* -+ * Copyright 2014 Michael Müller for Pipelight -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Lesser General Public -+ * License as published by the Free Software Foundation; either -+ * version 2.1 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Lesser General Public License for more details. -+ * -+ * You should have received a copy of the GNU Lesser General Public -+ * License along with this library; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -+ */ -+ -+#include "dxva2api.h" -+ -+extern HRESULT devicemanager_create( UINT *resetToken, void **ppv ) DECLSPEC_HIDDEN; -diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c -index 782f0dfa3d..df8f203010 100644 ---- a/dlls/dxva2/main.c -+++ b/dlls/dxva2/main.c -@@ -19,8 +19,11 @@ - #include - #include "windef.h" - #include "winbase.h" -+ -+#define INITGUID - #include "d3d9.h" - #include "dxva2api.h" -+#include "dxva2_private.h" - #include "physicalmonitorenumerationapi.h" - #include "lowlevelmonitorconfigurationapi.h" - #include "highlevelmonitorconfigurationapi.h" -@@ -39,9 +42,9 @@ BOOL WINAPI CapabilitiesRequestAndCapabilitiesReply( HMONITOR monitor, LPSTR buf - - HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9( UINT *resetToken, IDirect3DDeviceManager9 **dxvManager ) - { -- FIXME("(%p, %p): stub\n", resetToken, dxvManager); -+ TRACE("(%p, %p)\n", resetToken, dxvManager); - -- return E_NOTIMPL; -+ return devicemanager_create( resetToken, (void **)dxvManager ); - } - - HRESULT WINAPI DXVA2CreateVideoService( IDirect3DDevice9 *device, REFIID riid, void **ppv ) --- -2.17.1 - diff --git a/patches/dxva2-Video_Decoder/definition b/patches/dxva2-Video_Decoder/definition index eff3ac2e..6ca29f4f 100644 --- a/patches/dxva2-Video_Decoder/definition +++ b/patches/dxva2-Video_Decoder/definition @@ -1,2 +1,4 @@ Fixes: Support for MPEG2 DXVA2 GPU video decoding through vaapi Fixes: Support for H264 DXVA2 GPU video decoding through vaapi +# In the process of upstreaming... +Disabled: true \ No newline at end of file diff --git a/patches/ntdll-CriticalSection/0004-ntdll-Use-fast-CS-functions-for-threadpool-locking.patch b/patches/ntdll-CriticalSection/0004-ntdll-Use-fast-CS-functions-for-threadpool-locking.patch index fcb54c58..876cf491 100644 --- a/patches/ntdll-CriticalSection/0004-ntdll-Use-fast-CS-functions-for-threadpool-locking.patch +++ b/patches/ntdll-CriticalSection/0004-ntdll-Use-fast-CS-functions-for-threadpool-locking.patch @@ -1,4 +1,4 @@ -From 7dcc94642b6771f949fa2ff747a2f992e862157d Mon Sep 17 00:00:00 2001 +From e9a9468200f7f0b42e806822d1c5519cae3d4f9c Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 5 Aug 2017 03:39:37 +0200 Subject: [PATCH] ntdll: Use fast CS functions for threadpool locking. @@ -8,7 +8,7 @@ Subject: [PATCH] ntdll: Use fast CS functions for threadpool locking. 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/dlls/ntdll/threadpool.c b/dlls/ntdll/threadpool.c -index 451d441f5725..253a13002950 100644 +index 84286fbee90..0c7a454c705 100644 --- a/dlls/ntdll/threadpool.c +++ b/dlls/ntdll/threadpool.c @@ -1279,7 +1279,7 @@ static void CALLBACK timerqueue_thread_proc( void *param ) @@ -29,7 +29,7 @@ index 451d441f5725..253a13002950 100644 TRACE( "terminating timer queue thread\n" ); RtlExitUserThread( 0 ); -@@ -1399,7 +1399,7 @@ static NTSTATUS tp_timerqueue_lock( struct threadpool_object *timer ) +@@ -1398,7 +1398,7 @@ static NTSTATUS tp_timerqueue_lock( struct threadpool_object *timer ) timer->u.timer.period = 0; timer->u.timer.window_length = 0; @@ -38,7 +38,7 @@ index 451d441f5725..253a13002950 100644 /* Make sure that the timerqueue thread is running. */ if (!timerqueue.thread_running) -@@ -1420,7 +1420,7 @@ static NTSTATUS tp_timerqueue_lock( struct threadpool_object *timer ) +@@ -1419,7 +1419,7 @@ static NTSTATUS tp_timerqueue_lock( struct threadpool_object *timer ) timerqueue.objcount++; } @@ -47,7 +47,7 @@ index 451d441f5725..253a13002950 100644 return status; } -@@ -1433,7 +1433,7 @@ static void tp_timerqueue_unlock( struct threadpool_object *timer ) +@@ -1432,7 +1432,7 @@ static void tp_timerqueue_unlock( struct threadpool_object *timer ) { assert( timer->type == TP_OBJECT_TYPE_TIMER ); @@ -56,7 +56,7 @@ index 451d441f5725..253a13002950 100644 if (timer->u.timer.timer_initialized) { /* If timer was pending, remove it. */ -@@ -1452,7 +1452,7 @@ static void tp_timerqueue_unlock( struct threadpool_object *timer ) +@@ -1451,7 +1451,7 @@ static void tp_timerqueue_unlock( struct threadpool_object *timer ) timer->u.timer.timer_initialized = FALSE; } @@ -65,7 +65,7 @@ index 451d441f5725..253a13002950 100644 } /*********************************************************************** -@@ -1470,7 +1470,7 @@ static void CALLBACK waitqueue_thread_proc( void *param ) +@@ -1469,7 +1469,7 @@ static void CALLBACK waitqueue_thread_proc( void *param ) TRACE( "starting wait queue thread\n" ); @@ -74,7 +74,7 @@ index 451d441f5725..253a13002950 100644 for (;;) { -@@ -1507,10 +1507,10 @@ static void CALLBACK waitqueue_thread_proc( void *param ) +@@ -1506,10 +1506,10 @@ static void CALLBACK waitqueue_thread_proc( void *param ) /* All wait objects have been destroyed, if no new wait objects are created * within some amount of time, then we can shutdown this thread. */ assert( num_handles == 0 ); @@ -87,7 +87,7 @@ index 451d441f5725..253a13002950 100644 if (status == STATUS_TIMEOUT && !bucket->objcount) break; -@@ -1518,9 +1518,9 @@ static void CALLBACK waitqueue_thread_proc( void *param ) +@@ -1517,9 +1517,9 @@ static void CALLBACK waitqueue_thread_proc( void *param ) else { handles[num_handles] = bucket->update_event; @@ -99,7 +99,7 @@ index 451d441f5725..253a13002950 100644 if (status >= STATUS_WAIT_0 && status < STATUS_WAIT_0 + num_handles) { -@@ -1593,7 +1593,7 @@ static void CALLBACK waitqueue_thread_proc( void *param ) +@@ -1592,7 +1592,7 @@ static void CALLBACK waitqueue_thread_proc( void *param ) if (!--waitqueue.num_buckets) assert( list_empty( &waitqueue.buckets ) ); @@ -108,7 +108,7 @@ index 451d441f5725..253a13002950 100644 TRACE( "terminating wait queue thread\n" ); -@@ -1622,7 +1622,7 @@ static NTSTATUS tp_waitqueue_lock( struct threadpool_object *wait ) +@@ -1621,7 +1621,7 @@ static NTSTATUS tp_waitqueue_lock( struct threadpool_object *wait ) wait->u.wait.timeout = 0; wait->u.wait.handle = INVALID_HANDLE_VALUE; @@ -117,7 +117,7 @@ index 451d441f5725..253a13002950 100644 /* Try to assign to existing bucket if possible. */ LIST_FOR_EACH_ENTRY( bucket, &waitqueue.buckets, struct waitqueue_bucket, bucket_entry ) -@@ -1678,7 +1678,7 @@ static NTSTATUS tp_waitqueue_lock( struct threadpool_object *wait ) +@@ -1677,7 +1677,7 @@ static NTSTATUS tp_waitqueue_lock( struct threadpool_object *wait ) } out: @@ -126,7 +126,7 @@ index 451d441f5725..253a13002950 100644 return status; } -@@ -1689,7 +1689,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait ) +@@ -1688,7 +1688,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait ) { assert( wait->type == TP_OBJECT_TYPE_WAIT ); @@ -135,7 +135,7 @@ index 451d441f5725..253a13002950 100644 if (wait->u.wait.bucket) { struct waitqueue_bucket *bucket = wait->u.wait.bucket; -@@ -1701,7 +1701,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait ) +@@ -1700,7 +1700,7 @@ static void tp_waitqueue_unlock( struct threadpool_object *wait ) NtSetEvent( bucket->update_event, NULL ); } @@ -144,7 +144,7 @@ index 451d441f5725..253a13002950 100644 } static void CALLBACK ioqueue_thread_proc( void *param ) -@@ -1956,7 +1956,7 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON +@@ -1955,7 +1955,7 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON pool = default_threadpool; } @@ -153,7 +153,7 @@ index 451d441f5725..253a13002950 100644 /* Make sure that the threadpool has at least one thread. */ if (!pool->num_workers) -@@ -1970,7 +1970,7 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON +@@ -1969,7 +1969,7 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON pool->objcount++; } @@ -162,7 +162,7 @@ index 451d441f5725..253a13002950 100644 if (status != STATUS_SUCCESS) return status; -@@ -1986,9 +1986,9 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON +@@ -1985,9 +1985,9 @@ static NTSTATUS tp_threadpool_lock( struct threadpool **out, TP_CALLBACK_ENVIRON */ static void tp_threadpool_unlock( struct threadpool *pool ) { @@ -174,7 +174,7 @@ index 451d441f5725..253a13002950 100644 tp_threadpool_release( pool ); } -@@ -2125,10 +2125,10 @@ static void tp_object_initialize( struct threadpool_object *object, struct threa +@@ -2124,10 +2124,10 @@ static void tp_object_initialize( struct threadpool_object *object, struct threa struct threadpool_group *group = object->group; InterlockedIncrement( &group->refcount ); @@ -263,28 +263,28 @@ index 451d441f5725..253a13002950 100644 - RtlEnterCriticalSection( &pool->cs ); + enter_critical_section( &pool->cs ); - pool->num_busy_workers--; for (;;) { -@@ -2361,7 +2361,7 @@ static void CALLBACK threadpool_worker_proc( void *param ) + while ((ptr = threadpool_get_next_item( pool ))) +@@ -2359,7 +2359,7 @@ static void CALLBACK threadpool_worker_proc( void *param ) + /* Leave critical section and do the actual callback. */ object->num_associated_callbacks++; object->num_running_callbacks++; - pool->num_busy_workers++; - RtlLeaveCriticalSection( &pool->cs ); + leave_critical_section( &pool->cs ); /* Initialize threadpool instance struct. */ callback_instance = (TP_CALLBACK_INSTANCE *)&instance; -@@ -2465,7 +2465,7 @@ static void CALLBACK threadpool_worker_proc( void *param ) +@@ -2463,7 +2463,7 @@ static void CALLBACK threadpool_worker_proc( void *param ) } skip_cleanup: - RtlEnterCriticalSection( &pool->cs ); + enter_critical_section( &pool->cs ); + assert(pool->num_busy_workers); pool->num_busy_workers--; - /* Simple callbacks are automatically shutdown after execution. */ -@@ -2507,7 +2507,7 @@ static void CALLBACK threadpool_worker_proc( void *param ) +@@ -2506,7 +2506,7 @@ static void CALLBACK threadpool_worker_proc( void *param ) } } pool->num_workers--; @@ -293,7 +293,7 @@ index 451d441f5725..253a13002950 100644 TRACE( "terminating worker thread for pool %p\n", pool ); tp_threadpool_release( pool ); -@@ -2747,7 +2747,7 @@ NTSTATUS WINAPI TpCallbackMayRunLong( TP_CALLBACK_INSTANCE *instance ) +@@ -2746,7 +2746,7 @@ NTSTATUS WINAPI TpCallbackMayRunLong( TP_CALLBACK_INSTANCE *instance ) return STATUS_SUCCESS; pool = object->pool; @@ -302,7 +302,7 @@ index 451d441f5725..253a13002950 100644 /* Start new worker threads if required. */ if (pool->num_busy_workers >= pool->num_workers) -@@ -2762,7 +2762,7 @@ NTSTATUS WINAPI TpCallbackMayRunLong( TP_CALLBACK_INSTANCE *instance ) +@@ -2761,7 +2761,7 @@ NTSTATUS WINAPI TpCallbackMayRunLong( TP_CALLBACK_INSTANCE *instance ) } } @@ -311,7 +311,7 @@ index 451d441f5725..253a13002950 100644 this->may_run_long = TRUE; return status; } -@@ -2843,13 +2843,13 @@ VOID WINAPI TpDisassociateCallback( TP_CALLBACK_INSTANCE *instance ) +@@ -2842,13 +2842,13 @@ VOID WINAPI TpDisassociateCallback( TP_CALLBACK_INSTANCE *instance ) return; pool = object->pool; @@ -327,7 +327,7 @@ index 451d441f5725..253a13002950 100644 this->associated = FALSE; } -@@ -2901,7 +2901,7 @@ VOID WINAPI TpReleaseCleanupGroupMembers( TP_CLEANUP_GROUP *group, BOOL cancel_p +@@ -2900,7 +2900,7 @@ VOID WINAPI TpReleaseCleanupGroupMembers( TP_CLEANUP_GROUP *group, BOOL cancel_p TRACE( "%p %u %p\n", group, cancel_pending, userdata ); @@ -336,7 +336,7 @@ index 451d441f5725..253a13002950 100644 /* Unset group, increase references, and mark objects for shutdown */ LIST_FOR_EACH_ENTRY_SAFE( object, next, &this->members, struct threadpool_object, group_entry ) -@@ -2927,7 +2927,7 @@ VOID WINAPI TpReleaseCleanupGroupMembers( TP_CLEANUP_GROUP *group, BOOL cancel_p +@@ -2926,7 +2926,7 @@ VOID WINAPI TpReleaseCleanupGroupMembers( TP_CLEANUP_GROUP *group, BOOL cancel_p list_init( &members ); list_move_tail( &members, &this->members ); @@ -345,7 +345,7 @@ index 451d441f5725..253a13002950 100644 /* Cancel pending callbacks if requested */ if (cancel_pending) -@@ -3041,10 +3041,10 @@ VOID WINAPI TpSetPoolMaxThreads( TP_POOL *pool, DWORD maximum ) +@@ -3040,10 +3040,10 @@ VOID WINAPI TpSetPoolMaxThreads( TP_POOL *pool, DWORD maximum ) TRACE( "%p %u\n", pool, maximum ); @@ -358,7 +358,7 @@ index 451d441f5725..253a13002950 100644 } /*********************************************************************** -@@ -3057,7 +3057,7 @@ BOOL WINAPI TpSetPoolMinThreads( TP_POOL *pool, DWORD minimum ) +@@ -3056,7 +3056,7 @@ BOOL WINAPI TpSetPoolMinThreads( TP_POOL *pool, DWORD minimum ) TRACE( "%p %u\n", pool, minimum ); @@ -367,7 +367,7 @@ index 451d441f5725..253a13002950 100644 while (this->num_workers < minimum) { -@@ -3072,7 +3072,7 @@ BOOL WINAPI TpSetPoolMinThreads( TP_POOL *pool, DWORD minimum ) +@@ -3071,7 +3071,7 @@ BOOL WINAPI TpSetPoolMinThreads( TP_POOL *pool, DWORD minimum ) this->max_workers = max( this->min_workers, this->max_workers ); } @@ -376,7 +376,7 @@ index 451d441f5725..253a13002950 100644 return !status; } -@@ -3088,7 +3088,7 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO +@@ -3087,7 +3087,7 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO TRACE( "%p %p %u %u\n", timer, timeout, period, window_length ); @@ -385,7 +385,7 @@ index 451d441f5725..253a13002950 100644 assert( this->u.timer.timer_initialized ); this->u.timer.timer_set = timeout != NULL; -@@ -3148,7 +3148,7 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO +@@ -3147,7 +3147,7 @@ VOID WINAPI TpSetTimer( TP_TIMER *timer, LARGE_INTEGER *timeout, LONG period, LO this->u.timer.timer_pending = TRUE; } @@ -394,7 +394,7 @@ index 451d441f5725..253a13002950 100644 if (submit_timer) tp_object_submit( this, FALSE ); -@@ -3165,7 +3165,7 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout ) +@@ -3164,7 +3164,7 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout ) TRACE( "%p %p %p\n", wait, handle, timeout ); @@ -403,7 +403,7 @@ index 451d441f5725..253a13002950 100644 assert( this->u.wait.bucket ); this->u.wait.handle = handle; -@@ -3209,7 +3209,7 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout ) +@@ -3208,7 +3208,7 @@ VOID WINAPI TpSetWait( TP_WAIT *wait, HANDLE handle, LARGE_INTEGER *timeout ) NtSetEvent( bucket->update_event, NULL ); } @@ -413,5 +413,5 @@ index 451d441f5725..253a13002950 100644 if (submit_wait) tp_object_submit( this, FALSE ); -- -2.26.2 +2.27.0 diff --git a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch index ade27581..eea5e9e7 100644 --- a/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch +++ b/patches/ntdll-HashLinks/0001-ntdll-Implement-HashLinks-field-in-LDR-module-data.patch @@ -1,4 +1,4 @@ -From 6f7c87fdffe6aca49a2795eb29821557f20858c2 Mon Sep 17 00:00:00 2001 +From b1af584b5d5b8905bf4dd3ec6be9227e5221a744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Mon, 3 Apr 2017 05:30:27 +0200 Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. @@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: Implement HashLinks field in LDR module data. 3 files changed, 142 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c -index 4bafd0f6349..f8a65e10758 100644 +index 59965984a67..95f18fb71e3 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -30,6 +30,7 @@ @@ -21,7 +21,7 @@ index 4bafd0f6349..f8a65e10758 100644 #include "wine/test.h" #include "delayloadhandler.h" -@@ -3970,6 +3971,79 @@ static void test_LoadPackagedLibrary(void) +@@ -3968,6 +3969,79 @@ static void test_LoadPackagedLibrary(void) h, GetLastError()); } @@ -101,7 +101,7 @@ index 4bafd0f6349..f8a65e10758 100644 START_TEST(loader) { int argc; -@@ -4042,10 +4116,12 @@ START_TEST(loader) +@@ -4040,10 +4114,12 @@ START_TEST(loader) test_InMemoryOrderModuleList(); test_LoadPackagedLibrary(); test_wow64_redirection(); @@ -115,20 +115,20 @@ index 4bafd0f6349..f8a65e10758 100644 test_Loader(); } diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c -index 0c8f05285c4..ebbd910d6cd 100644 +index c90cdcc860b..63e1227cc55 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c -@@ -122,6 +122,9 @@ static const char * const reason_names[] = - - static const WCHAR dllW[] = {'.','d','l','l',0}; +@@ -128,6 +128,9 @@ struct file_id + BYTE ObjectId[16]; + }; +#define HASH_MAP_SIZE 32 +static LIST_ENTRY hash_table[HASH_MAP_SIZE]; + - /* internal representation of 32bit modules. per process. */ + /* internal representation of loaded modules */ typedef struct _wine_modref { -@@ -462,6 +465,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) +@@ -467,6 +470,52 @@ static void call_ldr_notifications( ULONG reason, LDR_DATA_TABLE_ENTRY *module ) } } @@ -181,7 +181,7 @@ index 0c8f05285c4..ebbd910d6cd 100644 /************************************************************************* * get_modref * -@@ -1227,7 +1276,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name +@@ -1231,7 +1280,12 @@ static WINE_MODREF *alloc_module( HMODULE hModule, const UNICODE_STRING *nt_name &wm->ldr.InLoadOrderLinks); InsertTailList(&NtCurrentTeb()->Peb->LdrData->InMemoryOrderModuleList, &wm->ldr.InMemoryOrderLinks); @@ -194,7 +194,7 @@ index 0c8f05285c4..ebbd910d6cd 100644 if (!(nt->OptionalHeader.DllCharacteristics & IMAGE_DLLCHARACTERISTICS_NX_COMPAT)) { -@@ -1886,6 +1940,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN +@@ -1892,6 +1946,7 @@ static NTSTATUS build_so_dll_module( const WCHAR *load_path, const UNICODE_STRIN /* the module has only been inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -202,7 +202,7 @@ index 0c8f05285c4..ebbd910d6cd 100644 /* FIXME: free the modref */ return status; } -@@ -2429,6 +2484,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam +@@ -2433,6 +2488,7 @@ static NTSTATUS load_native_dll( LPCWSTR load_path, const UNICODE_STRING *nt_nam /* the module has only be inserted in the load & memory order lists */ RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -210,7 +210,7 @@ index 0c8f05285c4..ebbd910d6cd 100644 /* FIXME: there are several more dangling references * left. Including dlls loaded by this dll before the -@@ -3649,6 +3705,7 @@ static void free_modref( WINE_MODREF *wm ) +@@ -3652,6 +3708,7 @@ static void free_modref( WINE_MODREF *wm ) { RemoveEntryList(&wm->ldr.InLoadOrderLinks); RemoveEntryList(&wm->ldr.InMemoryOrderLinks); @@ -218,7 +218,7 @@ index 0c8f05285c4..ebbd910d6cd 100644 if (wm->ldr.InInitializationOrderLinks.Flink) RemoveEntryList(&wm->ldr.InInitializationOrderLinks); -@@ -4369,6 +4426,7 @@ void __wine_process_init(void) +@@ -4372,6 +4429,7 @@ void __wine_process_init(void) SIZE_T info_size; TEB *teb; PEB *peb; @@ -226,7 +226,7 @@ index 0c8f05285c4..ebbd910d6cd 100644 if (!unix_funcs) load_ntdll_so( ntdll_module, &__wine_spec_nt_header ); -@@ -4389,6 +4447,10 @@ void __wine_process_init(void) +@@ -4388,6 +4446,10 @@ void __wine_process_init(void) load_global_options(); version_init(); @@ -237,7 +237,7 @@ index 0c8f05285c4..ebbd910d6cd 100644 /* setup the load callback and create ntdll modref */ RtlInitUnicodeString( &nt_name, ntdllW ); status = build_so_dll_module( params->DllPath.Buffer, &nt_name, ntdll_module, 0, &wm ); -@@ -4464,6 +4526,9 @@ void __wine_process_init(void) +@@ -4463,6 +4525,9 @@ void __wine_process_init(void) teb->Tib.StackLimit = stack.StackLimit; teb->DeallocationStack = stack.DeallocationStack; @@ -248,10 +248,10 @@ index 0c8f05285c4..ebbd910d6cd 100644 } diff --git a/include/winternl.h b/include/winternl.h -index acbce20c212..150a3777d4b 100644 +index 3ff15f28c15..59e9eddd26d 100644 --- a/include/winternl.h +++ b/include/winternl.h -@@ -2354,8 +2354,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY +@@ -2369,8 +2369,8 @@ typedef struct _LDR_DATA_TABLE_ENTRY ULONG Flags; SHORT LoadCount; SHORT TlsIndex; @@ -262,5 +262,5 @@ index acbce20c212..150a3777d4b 100644 HANDLE ActivationContext; void* Lock; -- -2.26.2 +2.27.0 diff --git a/patches/ntdll-NtQueryEaFile/definition b/patches/ntdll-NtQueryEaFile/definition index a86870c2..0a8262fc 100644 --- a/patches/ntdll-NtQueryEaFile/definition +++ b/patches/ntdll-NtQueryEaFile/definition @@ -1,3 +1,5 @@ Fixes: Improve stub for NtQueryEaFile # Depends: ntdll-Syscall_Wrappers Depends: ntdll-Junction_Points +# Temporarily disabled until it's moved to unixlib. +Disabled: true diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 4a8188d3..00d97d7a 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "16ac83bcbf0487576171a9d5ffbbef89f5a772ad" + echo "449b8c7e9212d0a80e28babff20f2755b7370872" } # Show version information @@ -132,7 +132,6 @@ patch_enable_all () enable_dwrite_FontFallback="$1" enable_dxdiagn_Enumerate_DirectSound="$1" enable_dxdiagn_GetChildContainer_Leaf_Nodes="$1" - enable_dxva2_Video_Decoder="$1" enable_explorer_Video_Registry_Key="$1" enable_fonts_Missing_Fonts="$1" enable_fsutil_Stub_Program="$1" @@ -183,7 +182,6 @@ patch_enable_all () enable_ntdll_Manifest_Range="$1" enable_ntdll_NtAccessCheck="$1" enable_ntdll_NtDevicePath="$1" - enable_ntdll_NtQueryEaFile="$1" enable_ntdll_NtQuerySection="$1" enable_ntdll_NtSetLdtEntries="$1" enable_ntdll_Pipe_SpecialCharacters="$1" @@ -491,9 +489,6 @@ patch_enable () dxdiagn-GetChildContainer_Leaf_Nodes) enable_dxdiagn_GetChildContainer_Leaf_Nodes="$2" ;; - dxva2-Video_Decoder) - enable_dxva2_Video_Decoder="$2" - ;; explorer-Video_Registry_Key) enable_explorer_Video_Registry_Key="$2" ;; @@ -644,9 +639,6 @@ patch_enable () ntdll-NtDevicePath) enable_ntdll_NtDevicePath="$2" ;; - ntdll-NtQueryEaFile) - enable_ntdll_NtQueryEaFile="$2" - ;; ntdll-NtQuerySection) enable_ntdll_NtQuerySection="$2" ;; @@ -1486,13 +1478,9 @@ if test "$enable_winex11_WM_WINDOWPOSCHANGING" -eq 1; then fi if test "$enable_winedevice_Default_Drivers" -eq 1; then - if test "$enable_dxva2_Video_Decoder" -gt 1; then - abort "Patchset dxva2-Video_Decoder disabled, but winedevice-Default_Drivers depends on that." - fi if test "$enable_ntoskrnl_Stubs" -gt 1; then abort "Patchset ntoskrnl-Stubs disabled, but winedevice-Default_Drivers depends on that." fi - enable_dxva2_Video_Decoder=1 enable_ntoskrnl_Stubs=1 fi @@ -1667,13 +1655,6 @@ if test "$enable_winebuild_Fake_Dlls" -eq 1; then enable_ws2_32_WSACleanup=1 fi -if test "$enable_ntdll_NtQueryEaFile" -eq 1; then - if test "$enable_ntdll_Junction_Points" -gt 1; then - abort "Patchset ntdll-Junction_Points disabled, but ntdll-NtQueryEaFile depends on that." - fi - enable_ntdll_Junction_Points=1 -fi - if test "$enable_ntdll_NtDevicePath" -eq 1; then if test "$enable_ntdll_Pipe_SpecialCharacters" -gt 1; then abort "Patchset ntdll-Pipe_SpecialCharacters disabled, but ntdll-NtDevicePath depends on that." @@ -2707,21 +2688,15 @@ fi # | * [#44865] directmanipulation: New DLL. # | # | Modified files: -# | * dlls/directmanipulation/directmanip.idl, dlls/directmanipulation/directmanipulation.c +# | * dlls/directmanipulation/directmanipulation.c # | if test "$enable_directmanipulation_new_dll" -eq 1; then - patch_apply directmanipulation-new-dll/0006-directmanipulation-Support-DCompManipulationComposit.patch - patch_apply directmanipulation-new-dll/0007-directmanipulation-Supprot-IDirectManipulationFrameI.patch - patch_apply directmanipulation-new-dll/0009-directmanipulation-Implement-IDirectManipulationComp.patch patch_apply directmanipulation-new-dll/0011-directmanipulation-Implement-IDirectManipulationMana.patch patch_apply directmanipulation-new-dll/0013-directmanipulation-Fake-success-from-IDirectManipula.patch patch_apply directmanipulation-new-dll/0015-directmanipulation-Implement-IDirectManipulationView.patch patch_apply directmanipulation-new-dll/0016-directmanipulation-Support-IDirectManipulationConten.patch patch_apply directmanipulation-new-dll/0017-directmanipulation-Fake-success-in-some-functions.patch ( - printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Support DCompManipulationCompositor interface.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Supprot IDirectManipulationFrameInfoProvider interface in IDirectManipulationCompositor.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationCompositor SetUpdateManager.", 1 },'; printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationManager2 CreateViewport.", 1 },'; printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Fake success from IDirectManipulationViewport2 ActivateConfiguration.", 1 },'; printf '%s\n' '+ { "Alistair Leslie-Hughes", "directmanipulation: Implement IDirectManipulationViewport2 GetPrimaryContent.", 1 },'; @@ -2939,41 +2914,6 @@ if test "$enable_dxdiagn_GetChildContainer_Leaf_Nodes" -eq 1; then ) >> "$patchlist" fi -# Patchset dxva2-Video_Decoder -# | -# | Modified files: -# | * configure.ac, dlls/dxva2/Makefile.in, dlls/dxva2/backend.idl, dlls/dxva2/devicemanager.c, dlls/dxva2/dxva2_private.h, -# | dlls/dxva2/genericdecoder.c, dlls/dxva2/main.c, dlls/dxva2/softwareprocessor.c, dlls/dxva2/tests/Makefile.in, -# | dlls/dxva2/tests/dxva2.c, dlls/dxva2/vaapi-h264.c, dlls/dxva2/vaapi-mpeg2.c, dlls/dxva2/vaapi.c, -# | dlls/dxva2/videoservices.c -# | -if test "$enable_dxva2_Video_Decoder" -eq 1; then - patch_apply dxva2-Video_Decoder/0001-dxva2-Implement-semi-stub-for-Direct3DDeviceManager9.patch - patch_apply dxva2-Video_Decoder/0002-dxva2-Implement-stubbed-interfaces-for-IDirectXVideo.patch - patch_apply dxva2-Video_Decoder/0004-dxva2-Implement-stubbed-DirectX-Software-VideoProces.patch - patch_apply dxva2-Video_Decoder/0006-dxva2-tests-Add-tests-for-dxva2-decoder.patch - patch_apply dxva2-Video_Decoder/0007-dxva2-Initial-implementation-of-MPEG2-decoder-using-.patch - patch_apply dxva2-Video_Decoder/0008-dxva2-Implement-h264-decoder.patch - patch_apply dxva2-Video_Decoder/0009-dxva2-Add-DRM-mode-for-vaapi.patch - patch_apply dxva2-Video_Decoder/0010-dxva2-Fill-h264-luma-and-chroma-weights-offsets-with.patch - patch_apply dxva2-Video_Decoder/0011-dxva2-Always-destroy-buffers-when-calling-vaRenderPi.patch - patch_apply dxva2-Video_Decoder/0012-dxva2-Only-declare-debug-channels-when-they-are-actu.patch - patch_apply dxva2-Video_Decoder/0013-Revert-dxva2-Build-with-msvcrt.patch - ( - printf '%s\n' '+ { "Sebastian Lackner", "dxva2: Implement semi-stub for Direct3DDeviceManager9 interface.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2: Implement stubbed interfaces for IDirectXVideo{Acceleration,Decoder,Processor}Service.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2: Implement stubbed DirectX Software VideoProcessor interface.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2/tests: Add tests for dxva2 decoder.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2: Initial implementation of MPEG2 decoder using vaapi backend.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2: Implement h264 decoder.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2: Add DRM mode for vaapi.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2: Fill h264 luma and chroma weights / offsets with default values in case they are not specified.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2: Always destroy buffers when calling vaRenderPicture.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "dxva2: Only declare debug channels when they are actually used.", 1 },'; - printf '%s\n' '+ { "Alistair Leslie-Hughes", "Revert \"dxva2: Build with msvcrt.\".", 1 },'; - ) >> "$patchlist" -fi - # Patchset explorer-Video_Registry_Key # | # | Modified files: @@ -3858,21 +3798,6 @@ if test "$enable_ntdll_NtDevicePath" -eq 1; then ) >> "$patchlist" fi -# Patchset ntdll-NtQueryEaFile -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * ntdll-DOS_Attributes, ntdll-Junction_Points -# | -# | Modified files: -# | * dlls/ntdll/file.c, dlls/ntdll/tests/file.c -# | -if test "$enable_ntdll_NtQueryEaFile" -eq 1; then - patch_apply ntdll-NtQueryEaFile/0001-ntdll-Improve-stub-of-NtQueryEaFile.patch - ( - printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Improve stub of NtQueryEaFile.", 1 },'; - ) >> "$patchlist" -fi - # Patchset ntdll-NtQuerySection # | # | Modified files: @@ -5957,7 +5882,7 @@ fi # Patchset winedevice-Default_Drivers # | # | This patchset has the following (direct or indirect) dependencies: -# | * dxva2-Video_Decoder, ntoskrnl-Stubs +# | * ntoskrnl-Stubs # | # | Modified files: # | * configure.ac, dlls/dxgkrnl.sys/Makefile.in, dlls/dxgkrnl.sys/dxgkrnl.sys.spec, dlls/dxgkrnl.sys/main.c, diff --git a/patches/winedevice-Default_Drivers/definition b/patches/winedevice-Default_Drivers/definition index 4cc63161..89d3862b 100644 --- a/patches/winedevice-Default_Drivers/definition +++ b/patches/winedevice-Default_Drivers/definition @@ -1,3 +1,2 @@ Fixes: Simulate a more realistic kernel environment in ntoskrnl/winedevice -Depends: dxva2-Video_Decoder Depends: ntoskrnl-Stubs diff --git a/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch b/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch index 5a1970a0..833c7647 100644 --- a/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch +++ b/patches/ws2_32-WSACleanup/0002-ws2_32-Invalidate-client-side-file-descriptor-cache-.patch @@ -1,4 +1,4 @@ -From 87580d2eef0c3d91a89be07e912dea3053c26d71 Mon Sep 17 00:00:00 2001 +From 95070fa887dfecb93e3fbf8afd0cd4ac17e03b69 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 6 Sep 2015 12:41:17 +0200 Subject: [PATCH] ws2_32: Invalidate client-side file descriptor cache in @@ -17,10 +17,10 @@ Subject: [PATCH] ws2_32: Invalidate client-side file descriptor cache in 9 files changed, 35 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec -index a9422723b71..e4f2f0e9c2b 100644 +index 0b0d4587969..99d4c57cdfe 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec -@@ -1578,6 +1578,7 @@ +@@ -1577,6 +1577,7 @@ # Server interface @ cdecl -norelay wine_server_call(ptr) @@ -48,22 +48,22 @@ index 9e1cc85a36e..3f4ba60b7bb 100644 /*********************************************************************** * wine_server_release_fd (NTDLL.@) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c -index 91b98c44b3f..105dc07c085 100644 +index 51ff7f950e8..5da6dc7fa9d 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c -@@ -974,6 +974,7 @@ static struct unix_funcs unix_funcs = +@@ -1024,6 +1024,7 @@ static struct unix_funcs unix_funcs = exec_process, wine_server_call, server_send_fd, + server_remove_fds_from_cache_by_type, - server_get_unix_fd, server_fd_to_handle, server_handle_to_fd, + server_release_fd, diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c -index a4d1bdf9373..eacc38c984d 100644 +index 299a311496b..0fac751d12f 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c -@@ -1001,6 +1001,26 @@ static int remove_fd_from_cache( HANDLE handle ) +@@ -981,6 +981,26 @@ static int remove_fd_from_cache( HANDLE handle ) return fd; } @@ -91,34 +91,34 @@ index a4d1bdf9373..eacc38c984d 100644 /*********************************************************************** * server_get_unix_fd diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h -index 9361092f0f1..fc5269ed1ec 100644 +index e0bc5a9603e..c24b7503ede 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h -@@ -100,6 +100,7 @@ extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN; +@@ -111,6 +111,7 @@ extern void CDECL virtual_release_address_space(void) DECLSPEC_HIDDEN; extern void CDECL virtual_set_large_address_space(void) DECLSPEC_HIDDEN; extern void CDECL server_send_fd( int fd ) DECLSPEC_HIDDEN; +extern void CDECL server_remove_fds_from_cache_by_type( enum server_fd_type type ) DECLSPEC_HIDDEN; - extern int CDECL server_get_unix_fd( HANDLE handle, unsigned int wanted_access, int *unix_fd, - int *needs_close, enum server_fd_type *type, - unsigned int *options ) DECLSPEC_HIDDEN; + extern NTSTATUS CDECL server_fd_to_handle( int fd, unsigned int access, unsigned int attributes, + HANDLE *handle ) DECLSPEC_HIDDEN; + extern NTSTATUS CDECL server_handle_to_fd( HANDLE handle, unsigned int access, int *unix_fd, diff --git a/dlls/ntdll/unixlib.h b/dlls/ntdll/unixlib.h -index 4169e3e8ece..0709c7e7441 100644 +index 311d99f482d..39b30566365 100644 --- a/dlls/ntdll/unixlib.h +++ b/dlls/ntdll/unixlib.h -@@ -291,6 +291,7 @@ struct unix_funcs +@@ -310,6 +310,7 @@ struct unix_funcs /* server functions */ unsigned int (CDECL *server_call)( void *req_ptr ); void (CDECL *server_send_fd)( int fd ); + void (CDECL *server_remove_fds_from_cache_by_type)( enum server_fd_type type ); - int (CDECL *server_get_unix_fd)( HANDLE handle, unsigned int wanted_access, int *unix_fd, - int *needs_close, enum server_fd_type *type, unsigned int *options ); NTSTATUS (CDECL *server_fd_to_handle)( int fd, unsigned int access, unsigned int attributes, + HANDLE *handle ); + NTSTATUS (CDECL *server_handle_to_fd)( HANDLE handle, unsigned int access, int *unix_fd, diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index bbc44ca2c20..37d110d216f 100644 +index f81d23650bc..27b309172ea 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c -@@ -1729,6 +1729,7 @@ INT WINAPI WSACleanup(void) +@@ -1740,6 +1740,7 @@ INT WINAPI WSACleanup(void) if (!--num_startup) { diff --git a/staging/upstream-commit b/staging/upstream-commit index 3c986934..fa451edc 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -e80df2d2d54a3f16389bea77f6863cc1c05d6251 +449b8c7e9212d0a80e28babff20f2755b7370872