Rebase against 042e0625695a82aa71ddf825c693680d5d8aa0dd

This commit is contained in:
Alistair Leslie-Hughes 2019-05-16 08:50:22 +10:00
parent 6ce73c283d
commit 1b7ebd3bb8
12 changed files with 45 additions and 731 deletions

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "99114803b80f6e687f1d4ed11e0808b821cdbf22"
echo "042e0625695a82aa71ddf825c693680d5d8aa0dd"
}
# Show version information
@ -301,7 +301,6 @@ patch_enable_all ()
enable_version_VerQueryValue="$1"
enable_widl_SLTG_Typelib_Support="$1"
enable_windowscodecs_GIF_Encoder="$1"
enable_windowscodecs_IMILBitmapSource="$1"
enable_windowscodecs_TIFF_Support="$1"
enable_wine_inf_Directory_ContextMenuHandlers="$1"
enable_wine_inf_Dummy_CA_Certificate="$1"
@ -1033,9 +1032,6 @@ patch_enable ()
windowscodecs-GIF_Encoder)
enable_windowscodecs_GIF_Encoder="$2"
;;
windowscodecs-IMILBitmapSource)
enable_windowscodecs_IMILBitmapSource="$2"
;;
windowscodecs-TIFF_Support)
enable_windowscodecs_TIFF_Support="$2"
;;
@ -6340,23 +6336,6 @@ if test "$enable_windowscodecs_GIF_Encoder" -eq 1; then
) >> "$patchlist"
fi
# Patchset windowscodecs-IMILBitmapSource
# |
# | This patchset fixes the following Wine bugs:
# | * [#34764] Improve compatibility of IMILBitmapSource interface
# |
# | Modified files:
# | * dlls/windowscodecs/bitmap.c, dlls/windowscodecs/scaler.c, dlls/windowscodecs/wincodecs_private.h
# |
if test "$enable_windowscodecs_IMILBitmapSource" -eq 1; then
patch_apply windowscodecs-IMILBitmapSource/0001-windowscodecs-Improve-compatibility-of-IMILBitmapSou.patch
patch_apply windowscodecs-IMILBitmapSource/0002-windowscodecs-Add-support-for-IMILBitmapScaler-inter.patch
(
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Improve compatibility of IMILBitmapSource interface.", 3 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Add support for IMILBitmapScaler interface.", 2 },';
) >> "$patchlist"
fi
# Patchset windowscodecs-TIFF_Support
# |
# | This patchset has the following (direct or indirect) dependencies:
@ -7411,13 +7390,15 @@ fi
# | dlls/xaudio2_8/Makefile.in, dlls/xaudio2_9/Makefile.in, include/config.h.in, include/xapo.idl, include/xaudio2.idl
# |
if test "$enable_xaudio2_revert" -eq 1; then
patch_apply xaudio2-revert/0001-Revert-xaudio2_7-tests-Remove-redundant-not-NULL-che.patch
patch_apply xaudio2-revert/0002-Revert-xaudio2_7-Add-a-trailing-n-to-an-ERR-message.patch
patch_apply xaudio2-revert/0003-Revert-xaudio2-IXAPO-Process-out-parameter-should-no.patch
patch_apply xaudio2-revert/0004-Revert-xaudio2-IXAudio23-needs-its-own-interface-for.patch
patch_apply xaudio2-revert/0005-Revert-xaudio2-Fix-uninitialized-variable-access-Val.patch
patch_apply xaudio2-revert/0006-Revert-xaudio2-Rewrite-to-use-FAudio.patch
patch_apply xaudio2-revert/0001-Revert-xaudio2-Fix-32-bit-build.patch
patch_apply xaudio2-revert/0002-Revert-xaudio2_7-tests-Remove-redundant-not-NULL-che.patch
patch_apply xaudio2-revert/0003-Revert-xaudio2_7-Add-a-trailing-n-to-an-ERR-message.patch
patch_apply xaudio2-revert/0004-Revert-xaudio2-IXAPO-Process-out-parameter-should-no.patch
patch_apply xaudio2-revert/0005-Revert-xaudio2-IXAudio23-needs-its-own-interface-for.patch
patch_apply xaudio2-revert/0006-Revert-xaudio2-Fix-uninitialized-variable-access-Val.patch
patch_apply xaudio2-revert/0007-Revert-xaudio2-Rewrite-to-use-FAudio.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "Revert \"xaudio2: Fix 32-bit build.\".", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "Revert \"xaudio2_7/tests: Remove redundant not-NULL checks (coccinellery).\".", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "Revert \"xaudio2_7: Add a trailing '\''\\n'\'' to an ERR() message.\".", 1 },';
printf '%s\n' '+ { "Alistair Leslie-Hughes", "Revert \"xaudio2: IXAPO::Process out parameter should not be const.\".", 1 },';

View File

@ -1,439 +0,0 @@
From 7d80b158b2cb555c16e82d3422c25356b78b4d53 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 22 Mar 2016 23:46:30 +0800
Subject: [PATCH] windowscodecs: Improve compatibility of IMILBitmapSource
interface. (v3)
Based on Focht's investigation. This makes the test application attached
to the bug 34764 work.
---
dlls/windowscodecs/bitmap.c | 186 +++++++++++++++++++------
dlls/windowscodecs/wincodecs_private.h | 58 +++++++-
2 files changed, 198 insertions(+), 46 deletions(-)
diff --git a/dlls/windowscodecs/bitmap.c b/dlls/windowscodecs/bitmap.c
index e8fe822e84..30a36535f4 100644
--- a/dlls/windowscodecs/bitmap.c
+++ b/dlls/windowscodecs/bitmap.c
@@ -27,7 +27,7 @@
#include "objbase.h"
#include "wincodecs_private.h"
-
+#include "wine/asm.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
@@ -137,6 +137,7 @@ static HRESULT WINAPI BitmapLockImpl_QueryInterface(IWICBitmapLock *iface, REFII
}
else
{
+ FIXME("unknown interface %s\n", debugstr_guid(iid));
*ppv = NULL;
return E_NOINTERFACE;
}
@@ -250,12 +251,14 @@ static HRESULT WINAPI BitmapImpl_QueryInterface(IWICBitmap *iface, REFIID iid,
{
*ppv = &This->IWICBitmap_iface;
}
- else if (IsEqualIID(&IID_IMILBitmapSource, iid))
+ else if (IsEqualIID(&IID_IMILBitmap, iid) ||
+ IsEqualIID(&IID_IMILBitmapSource, iid))
{
*ppv = &This->IMILBitmapSource_iface;
}
else
{
+ FIXME("unknown interface %s\n", debugstr_guid(iid));
*ppv = NULL;
return E_NOINTERFACE;
}
@@ -484,13 +487,22 @@ static HRESULT WINAPI IMILBitmapImpl_QueryInterface(IMILBitmapSource *iface, REF
if (!ppv) return E_INVALIDARG;
if (IsEqualIID(&IID_IUnknown, iid) ||
+ IsEqualIID(&IID_IMILBitmap, iid) ||
IsEqualIID(&IID_IMILBitmapSource, iid))
{
IUnknown_AddRef(&This->IMILBitmapSource_iface);
*ppv = &This->IMILBitmapSource_iface;
return S_OK;
}
+ else if (IsEqualIID(&IID_IWICBitmap, iid) ||
+ IsEqualIID(&IID_IWICBitmapSource, iid))
+ {
+ IUnknown_AddRef(&This->IWICBitmap_iface);
+ *ppv = &This->IWICBitmap_iface;
+ return S_OK;
+ }
+ FIXME("unknown interface %s\n", debugstr_guid(iid));
*ppv = NULL;
return E_NOINTERFACE;
}
@@ -511,6 +523,7 @@ static HRESULT WINAPI IMILBitmapImpl_GetSize(IMILBitmapSource *iface,
UINT *width, UINT *height)
{
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ TRACE("(%p,%p,%p)\n", iface, width, height);
return IWICBitmap_GetSize(&This->IWICBitmap_iface, width, height);
}
@@ -564,6 +577,7 @@ static HRESULT WINAPI IMILBitmapImpl_GetPixelFormat(IMILBitmapSource *iface,
}
}
+ TRACE("=> %u\n", *format);
return S_OK;
}
@@ -571,6 +585,7 @@ static HRESULT WINAPI IMILBitmapImpl_GetResolution(IMILBitmapSource *iface,
double *dpix, double *dpiy)
{
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ TRACE("(%p,%p,%p)\n", iface, dpix, dpiy);
return IWICBitmap_GetResolution(&This->IWICBitmap_iface, dpix, dpiy);
}
@@ -578,6 +593,7 @@ static HRESULT WINAPI IMILBitmapImpl_CopyPalette(IMILBitmapSource *iface,
IWICPalette *palette)
{
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ TRACE("(%p,%p)\n", iface, palette);
return IWICBitmap_CopyPalette(&This->IWICBitmap_iface, palette);
}
@@ -585,10 +601,11 @@ static HRESULT WINAPI IMILBitmapImpl_CopyPixels(IMILBitmapSource *iface,
const WICRect *rc, UINT stride, UINT size, BYTE *buffer)
{
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ TRACE("(%p,%p,%u,%u,%p)\n", iface, rc, stride, size, buffer);
return IWICBitmap_CopyPixels(&This->IWICBitmap_iface, rc, stride, size, buffer);
}
-static HRESULT WINAPI IMILBitmapImpl_UnknownMethod1(IMILBitmapSource *iface, void **ppv)
+static HRESULT WINAPI IMILBitmapImpl_unknown1(IMILBitmapSource *iface, void **ppv)
{
BitmapImpl *This = impl_from_IMILBitmapSource(iface);
@@ -596,12 +613,46 @@ static HRESULT WINAPI IMILBitmapImpl_UnknownMethod1(IMILBitmapSource *iface, voi
if (!ppv) return E_INVALIDARG;
- IUnknown_AddRef(&This->IMILUnknown1_iface);
+ /* reference count is not incremented here */
*ppv = &This->IMILUnknown1_iface;
return S_OK;
}
+static HRESULT WINAPI IMILBitmapImpl_Lock(IMILBitmapSource *iface, const WICRect *rc, DWORD flags, IWICBitmapLock **lock)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ TRACE("(%p,%p,%08x,%p)\n", iface, rc, flags, lock);
+ return IWICBitmap_Lock(&This->IWICBitmap_iface, rc, flags, lock);
+}
+
+static HRESULT WINAPI IMILBitmapImpl_Unlock(IMILBitmapSource *iface, IWICBitmapLock *lock)
+{
+ TRACE("(%p,%p)\n", iface, lock);
+ IWICBitmapLock_Release(lock);
+ return S_OK;
+}
+
+static HRESULT WINAPI IMILBitmapImpl_SetPalette(IMILBitmapSource *iface, IWICPalette *palette)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ TRACE("(%p,%p)\n", iface, palette);
+ return IWICBitmap_SetPalette(&This->IWICBitmap_iface, palette);
+}
+
+static HRESULT WINAPI IMILBitmapImpl_SetResolution(IMILBitmapSource *iface, double dpix, double dpiy)
+{
+ BitmapImpl *This = impl_from_IMILBitmapSource(iface);
+ TRACE("(%p,%f,%f)\n", iface, dpix, dpiy);
+ return IWICBitmap_SetResolution(&This->IWICBitmap_iface, dpix, dpiy);
+}
+
+static HRESULT WINAPI IMILBitmapImpl_AddDirtyRect(IMILBitmapSource *iface, const WICRect *rc)
+{
+ FIXME("(%p,%p): stub\n", iface, rc);
+ return E_NOTIMPL;
+}
+
static const IMILBitmapSourceVtbl IMILBitmapImpl_Vtbl =
{
IMILBitmapImpl_QueryInterface,
@@ -612,26 +663,20 @@ static const IMILBitmapSourceVtbl IMILBitmapImpl_Vtbl =
IMILBitmapImpl_GetResolution,
IMILBitmapImpl_CopyPalette,
IMILBitmapImpl_CopyPixels,
- IMILBitmapImpl_UnknownMethod1,
+ IMILBitmapImpl_unknown1,
+ IMILBitmapImpl_Lock,
+ IMILBitmapImpl_Unlock,
+ IMILBitmapImpl_SetPalette,
+ IMILBitmapImpl_SetResolution,
+ IMILBitmapImpl_AddDirtyRect
};
static HRESULT WINAPI IMILUnknown1Impl_QueryInterface(IMILUnknown1 *iface, REFIID iid,
void **ppv)
{
- BitmapImpl *This = impl_from_IMILUnknown1(iface);
-
- TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
-
- if (!ppv) return E_INVALIDARG;
-
- if (IsEqualIID(&IID_IUnknown, iid))
- {
- IUnknown_AddRef(&This->IMILUnknown1_iface);
- *ppv = iface;
- return S_OK;
- }
-
- return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv);
+ FIXME("(%p,%s,%p): stub\n", iface, debugstr_guid(iid), ppv);
+ *ppv = NULL;
+ return E_NOINTERFACE;
}
static ULONG WINAPI IMILUnknown1Impl_AddRef(IMILUnknown1 *iface)
@@ -646,47 +691,108 @@ static ULONG WINAPI IMILUnknown1Impl_Release(IMILUnknown1 *iface)
return IWICBitmap_Release(&This->IWICBitmap_iface);
}
+DECLSPEC_HIDDEN void WINAPI IMILUnknown1Impl_unknown1(IMILUnknown1 *iface, void *arg)
+{
+ FIXME("(%p,%p): stub\n", iface, arg);
+}
+
+static HRESULT WINAPI IMILUnknown1Impl_unknown2(IMILUnknown1 *iface, void *arg1, void *arg2)
+{
+ FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2);
+ return E_NOTIMPL;
+}
+
+DECLSPEC_HIDDEN HRESULT WINAPI IMILUnknown1Impl_unknown3(IMILUnknown1 *iface, void *arg)
+{
+ FIXME("(%p,%p): stub\n", iface, arg);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IMILUnknown1Impl_unknown4(IMILUnknown1 *iface, void *arg)
+{
+ FIXME("(%p,%p): stub\n", iface, arg);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IMILUnknown1Impl_unknown5(IMILUnknown1 *iface, void *arg)
+{
+ FIXME("(%p,%p): stub\n", iface, arg);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IMILUnknown1Impl_unknown6(IMILUnknown1 *iface, DWORD64 arg)
+{
+ FIXME("(%p,%s): stub\n", iface, wine_dbgstr_longlong(arg));
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IMILUnknown1Impl_unknown7(IMILUnknown1 *iface, void *arg)
+{
+ FIXME("(%p,%p): stub\n", iface, arg);
+ return E_NOTIMPL;
+}
+
+DECLSPEC_HIDDEN HRESULT WINAPI IMILUnknown1Impl_unknown8(IMILUnknown1 *iface)
+{
+ FIXME("(%p): stub\n", iface);
+ return E_NOTIMPL;
+}
+
+DEFINE_THISCALL_WRAPPER(IMILUnknown1Impl_unknown1, 8)
+DEFINE_THISCALL_WRAPPER(IMILUnknown1Impl_unknown3, 8)
+DEFINE_THISCALL_WRAPPER(IMILUnknown1Impl_unknown8, 4)
+
static const IMILUnknown1Vtbl IMILUnknown1Impl_Vtbl =
{
IMILUnknown1Impl_QueryInterface,
IMILUnknown1Impl_AddRef,
IMILUnknown1Impl_Release,
+ THISCALL(IMILUnknown1Impl_unknown1),
+ IMILUnknown1Impl_unknown2,
+ THISCALL(IMILUnknown1Impl_unknown3),
+ IMILUnknown1Impl_unknown4,
+ IMILUnknown1Impl_unknown5,
+ IMILUnknown1Impl_unknown6,
+ IMILUnknown1Impl_unknown7,
+ THISCALL(IMILUnknown1Impl_unknown8)
};
static HRESULT WINAPI IMILUnknown2Impl_QueryInterface(IMILUnknown2 *iface, REFIID iid,
void **ppv)
{
- BitmapImpl *This = impl_from_IMILUnknown2(iface);
-
- TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
-
- if (!ppv) return E_INVALIDARG;
-
- if (IsEqualIID(&IID_IUnknown, iid))
- {
- IUnknown_AddRef(&This->IMILUnknown2_iface);
- *ppv = iface;
- return S_OK;
- }
-
- return IWICBitmap_QueryInterface(&This->IWICBitmap_iface, iid, ppv);
+ FIXME("(%p,%s,%p): stub\n", iface, debugstr_guid(iid), ppv);
+ *ppv = NULL;
+ return E_NOINTERFACE;
}
static ULONG WINAPI IMILUnknown2Impl_AddRef(IMILUnknown2 *iface)
{
- BitmapImpl *This = impl_from_IMILUnknown2(iface);
- return IWICBitmap_AddRef(&This->IWICBitmap_iface);
+ FIXME("(%p): stub\n", iface);
+ return 0;
}
static ULONG WINAPI IMILUnknown2Impl_Release(IMILUnknown2 *iface)
{
- BitmapImpl *This = impl_from_IMILUnknown2(iface);
- return IWICBitmap_Release(&This->IWICBitmap_iface);
+ FIXME("(%p): stub\n", iface);
+ return 0;
}
-static HRESULT WINAPI IMILUnknown2Impl_UnknownMethod1(IMILUnknown2 *iface, void *arg1, void *arg2)
+static HRESULT WINAPI IMILUnknown2Impl_unknown1(IMILUnknown2 *iface, void *arg1, void **arg2)
{
FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2);
+ if (arg2) *arg2 = NULL;
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IMILUnknown2Impl_unknown2(IMILUnknown2 *iface, void *arg1, void *arg2)
+{
+ FIXME("(%p,%p,%p): stub\n", iface, arg1, arg2);
+ return E_NOTIMPL;
+}
+
+static HRESULT WINAPI IMILUnknown2Impl_unknown3(IMILUnknown2 *iface, void *arg1)
+{
+ FIXME("(%p,%p): stub\n", iface, arg1);
return E_NOTIMPL;
}
@@ -695,7 +801,9 @@ static const IMILUnknown2Vtbl IMILUnknown2Impl_Vtbl =
IMILUnknown2Impl_QueryInterface,
IMILUnknown2Impl_AddRef,
IMILUnknown2Impl_Release,
- IMILUnknown2Impl_UnknownMethod1,
+ IMILUnknown2Impl_unknown1,
+ IMILUnknown2Impl_unknown2,
+ IMILUnknown2Impl_unknown3
};
HRESULT BitmapImpl_Create(UINT uiWidth, UINT uiHeight, UINT stride, UINT datasize, void *view,
diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h
index 2221cc7dce..34a417d130 100644
--- a/dlls/windowscodecs/wincodecs_private.h
+++ b/dlls/windowscodecs/wincodecs_private.h
@@ -33,7 +33,13 @@ DEFINE_GUID(GUID_WineContainerFormatTga, 0x0c44fda1,0xa5c5,0x4298,0x96,0x85,0x47
DEFINE_GUID(GUID_VendorWine, 0xddf46da1,0x7dc1,0x404e,0x98,0xf2,0xef,0xa4,0x8d,0xfc,0x95,0x0a);
+DEFINE_GUID(IID_IMILBitmap,0xb1784d3f,0x8115,0x4763,0x13,0xaa,0x32,0xed,0xdb,0x68,0x29,0x4a);
DEFINE_GUID(IID_IMILBitmapSource,0x7543696a,0xbc8d,0x46b0,0x5f,0x81,0x8d,0x95,0x72,0x89,0x72,0xbe);
+DEFINE_GUID(IID_IMILBitmapLock,0xa67b2b53,0x8fa1,0x4155,0x8f,0x64,0x0c,0x24,0x7a,0x8f,0x84,0xcd);
+DEFINE_GUID(IID_IMILBitmapScaler,0xa767b0f0,0x1c8c,0x4aef,0x56,0x8f,0xad,0xf9,0x6d,0xcf,0xd5,0xcb);
+DEFINE_GUID(IID_IMILFormatConverter,0x7e2a746f,0x25c5,0x4851,0xb3,0xaf,0x44,0x3b,0x79,0x63,0x9e,0xc0);
+DEFINE_GUID(IID_IMILPalette,0xca8e206f,0xf22c,0x4af7,0x6f,0xba,0x7b,0xed,0x5e,0xb1,0xc9,0x2f);
+
#define INTERFACE IMILBitmapSource
DECLARE_INTERFACE_(IMILBitmapSource,IUnknown)
{
@@ -41,16 +47,39 @@ DECLARE_INTERFACE_(IMILBitmapSource,IUnknown)
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IWICBitmapSource methods ***/
+ STDMETHOD_(HRESULT,GetSize)(THIS_ UINT *,UINT *) PURE;
+ STDMETHOD_(HRESULT,GetPixelFormat)(THIS_ int *) PURE;
+ STDMETHOD_(HRESULT,GetResolution)(THIS_ double *,double *) PURE;
+ STDMETHOD_(HRESULT,CopyPalette)(THIS_ IWICPalette *) PURE;
+ STDMETHOD_(HRESULT,CopyPixels)(THIS_ const WICRect *,UINT,UINT,BYTE *) PURE;
/*** IMILBitmapSource methods ***/
- STDMETHOD_(HRESULT,GetSize)(THIS_ UINT *,UINT *);
- STDMETHOD_(HRESULT,GetPixelFormat)(THIS_ int *);
- STDMETHOD_(HRESULT,GetResolution)(THIS_ double *,double *);
- STDMETHOD_(HRESULT,CopyPalette)(THIS_ IWICPalette *);
- STDMETHOD_(HRESULT,CopyPixels)(THIS_ const WICRect *,UINT,UINT,BYTE *);
- STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void **);
+ STDMETHOD_(HRESULT,unknown1)(THIS_ void **) PURE;
+ STDMETHOD_(HRESULT,Lock)(THIS_ const WICRect *,DWORD,IWICBitmapLock **) PURE;
+ STDMETHOD_(HRESULT,Unlock)(THIS_ IWICBitmapLock *) PURE;
+ STDMETHOD_(HRESULT,SetPalette)(THIS_ IWICPalette *) PURE;
+ STDMETHOD_(HRESULT,SetResolution)(THIS_ double,double) PURE;
+ STDMETHOD_(HRESULT,AddDirtyRect)(THIS_ const WICRect *) PURE;
};
#undef INTERFACE
+#ifdef __i386__ /* thiscall functions are i386-specific */
+
+#define THISCALL(func) __thiscall_ ## func
+#define DEFINE_THISCALL_WRAPPER(func,args) \
+ extern typeof(func) THISCALL(func); \
+ __ASM_STDCALL_FUNC(__thiscall_ ## func, args, \
+ "popl %eax\n\t" \
+ "pushl %ecx\n\t" \
+ "pushl %eax\n\t" \
+ "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
+#else /* __i386__ */
+
+#define THISCALL(func) func
+#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */
+
+#endif /* __i386__ */
+
#define INTERFACE IMILUnknown1
DECLARE_INTERFACE_(IMILUnknown1,IUnknown)
{
@@ -58,6 +87,19 @@ DECLARE_INTERFACE_(IMILUnknown1,IUnknown)
STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** thiscall method ***/
+ STDMETHOD_(void,unknown1)(THIS_ void*) PURE;
+ /*** stdcall ***/
+ STDMETHOD_(HRESULT,unknown2)(THIS_ void*, void*) PURE;
+ /*** thiscall method ***/
+ STDMETHOD_(HRESULT,unknown3)(THIS_ void*) PURE;
+ /*** stdcall ***/
+ STDMETHOD_(HRESULT,unknown4)(THIS_ void*) PURE;
+ STDMETHOD_(HRESULT,unknown5)(THIS_ void*) PURE;
+ STDMETHOD_(HRESULT,unknown6)(THIS_ DWORD64) PURE;
+ STDMETHOD_(HRESULT,unknown7)(THIS_ void*) PURE;
+ /*** thiscall method ***/
+ STDMETHOD_(HRESULT,unknown8)(THIS) PURE;
};
#undef INTERFACE
@@ -69,7 +111,9 @@ DECLARE_INTERFACE_(IMILUnknown2,IUnknown)
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
STDMETHOD_(ULONG,Release)(THIS) PURE;
/*** unknown methods ***/
- STDMETHOD_(HRESULT,UnknownMethod1)(THIS_ void *, void *) PURE;
+ STDMETHOD_(HRESULT,unknown1)(THIS_ void *,void **) PURE;
+ STDMETHOD_(HRESULT,unknown2)(THIS_ void *,void *) PURE;
+ STDMETHOD_(HRESULT,unknown3)(THIS_ void *) PURE;
};
#undef INTERFACE
--
2.20.1

View File

@ -1,254 +0,0 @@
From 1a218a3cd7425d1cab7e11126c86948d38606704 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 22 Mar 2016 23:49:42 +0800
Subject: windowscodecs: Add support for IMILBitmapScaler interface. (v2)
This patch makes the GOG downloader work.
---
dlls/windowscodecs/scaler.c | 169 +++++++++++++++++++++++++++++++++
dlls/windowscodecs/wincodecs_private.h | 19 ++++
2 files changed, 188 insertions(+)
diff --git a/dlls/windowscodecs/scaler.c b/dlls/windowscodecs/scaler.c
index ebcc790..3801ea5 100644
--- a/dlls/windowscodecs/scaler.c
+++ b/dlls/windowscodecs/scaler.c
@@ -35,6 +35,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
typedef struct BitmapScaler {
IWICBitmapScaler IWICBitmapScaler_iface;
LONG ref;
+ IMILBitmapScaler IMILBitmapScaler_iface;
IWICBitmapSource *source;
UINT width, height;
UINT src_width, src_height;
@@ -50,6 +51,11 @@ static inline BitmapScaler *impl_from_IWICBitmapScaler(IWICBitmapScaler *iface)
return CONTAINING_RECORD(iface, BitmapScaler, IWICBitmapScaler_iface);
}
+static inline BitmapScaler *impl_from_IMILBitmapScaler(IMILBitmapScaler *iface)
+{
+ return CONTAINING_RECORD(iface, BitmapScaler, IMILBitmapScaler_iface);
+}
+
static HRESULT WINAPI BitmapScaler_QueryInterface(IWICBitmapScaler *iface, REFIID iid,
void **ppv)
{
@@ -64,8 +70,13 @@ static HRESULT WINAPI BitmapScaler_QueryInterface(IWICBitmapScaler *iface, REFII
{
*ppv = &This->IWICBitmapScaler_iface;
}
+ else if (IsEqualIID(&IID_IMILBitmapScaler, iid))
+ {
+ *ppv = &This->IMILBitmapScaler_iface;
+ }
else
{
+ FIXME("unknown interface %s\n", debugstr_guid(iid));
*ppv = NULL;
return E_NOINTERFACE;
}
@@ -374,6 +385,163 @@ static const IWICBitmapScalerVtbl BitmapScaler_Vtbl = {
BitmapScaler_Initialize
};
+static HRESULT WINAPI IMILBitmapScaler_QueryInterface(IMILBitmapScaler *iface, REFIID iid,
+ void **ppv)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+
+ TRACE("(%p,%s,%p)\n", iface, debugstr_guid(iid), ppv);
+
+ if (!ppv) return E_INVALIDARG;
+
+ if (IsEqualIID(&IID_IUnknown, iid) ||
+ IsEqualIID(&IID_IMILBitmapScaler, iid) ||
+ IsEqualIID(&IID_IMILBitmapSource, iid))
+ {
+ IUnknown_AddRef(&This->IMILBitmapScaler_iface);
+ *ppv = &This->IMILBitmapScaler_iface;
+ return S_OK;
+ }
+ else if (IsEqualIID(&IID_IWICBitmapScaler, iid) ||
+ IsEqualIID(&IID_IWICBitmapSource, iid))
+ {
+ IUnknown_AddRef(&This->IWICBitmapScaler_iface);
+ *ppv = &This->IWICBitmapScaler_iface;
+ return S_OK;
+ }
+
+ FIXME("unknown interface %s\n", debugstr_guid(iid));
+ *ppv = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI IMILBitmapScaler_AddRef(IMILBitmapScaler *iface)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+ return IWICBitmapScaler_AddRef(&This->IWICBitmapScaler_iface);
+}
+
+static ULONG WINAPI IMILBitmapScaler_Release(IMILBitmapScaler *iface)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+ return IWICBitmapScaler_Release(&This->IWICBitmapScaler_iface);
+}
+
+static HRESULT WINAPI IMILBitmapScaler_GetSize(IMILBitmapScaler *iface,
+ UINT *width, UINT *height)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+
+ TRACE("(%p,%p,%p)\n", iface, width, height);
+
+ if (!This->source)
+ return WINCODEC_ERR_NOTINITIALIZED;
+
+ return IWICBitmapScaler_GetSize(&This->IWICBitmapScaler_iface, width, height);
+}
+
+static HRESULT WINAPI IMILBitmapScaler_GetPixelFormat(IMILBitmapScaler *iface,
+ int *format)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+ IMILBitmapSource *source;
+ HRESULT hr;
+
+ TRACE("(%p,%p)\n", iface, format);
+
+ if (!format) return E_INVALIDARG;
+
+ if (!This->source)
+ return WINCODEC_ERR_NOTINITIALIZED;
+
+ hr = IWICBitmapSource_QueryInterface(This->source, &IID_IMILBitmapSource, (void **)&source);
+ if (hr == S_OK)
+ {
+ hr = source->lpVtbl->GetPixelFormat(source, format);
+ source->lpVtbl->Release(source);
+ }
+ return hr;
+}
+
+static HRESULT WINAPI IMILBitmapScaler_GetResolution(IMILBitmapScaler *iface,
+ double *dpix, double *dpiy)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+
+ TRACE("(%p,%p,%p)\n", iface, dpix, dpiy);
+
+ if (!This->source)
+ return WINCODEC_ERR_NOTINITIALIZED;
+
+ return IWICBitmapScaler_GetResolution(&This->IWICBitmapScaler_iface, dpix, dpiy);
+}
+
+static HRESULT WINAPI IMILBitmapScaler_CopyPalette(IMILBitmapScaler *iface,
+ IWICPalette *palette)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+
+ TRACE("(%p,%p)\n", iface, palette);
+
+ if (!This->source)
+ return WINCODEC_ERR_NOTINITIALIZED;
+
+ return IWICBitmapScaler_CopyPalette(&This->IWICBitmapScaler_iface, palette);
+}
+
+static HRESULT WINAPI IMILBitmapScaler_CopyPixels(IMILBitmapScaler *iface,
+ const WICRect *rc, UINT stride, UINT size, BYTE *buffer)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+
+ TRACE("(%p,%p,%u,%u,%p)\n", iface, rc, stride, size, buffer);
+
+ if (!This->source)
+ return WINCODEC_ERR_NOTINITIALIZED;
+
+ return IWICBitmapScaler_CopyPixels(&This->IWICBitmapScaler_iface, rc, stride, size, buffer);
+}
+
+static HRESULT WINAPI IMILBitmapScaler_unknown1(IMILBitmapScaler *iface, void **ppv)
+{
+ TRACE("(%p,%p)\n", iface, ppv);
+ return E_NOINTERFACE;
+}
+
+static HRESULT WINAPI IMILBitmapScaler_Initialize(IMILBitmapScaler *iface,
+ IMILBitmapSource *mil_source, UINT width, UINT height,
+ WICBitmapInterpolationMode mode)
+{
+ BitmapScaler *This = impl_from_IMILBitmapScaler(iface);
+ IWICBitmapSource *wic_source;
+ HRESULT hr;
+
+ TRACE("(%p,%p,%u,%u,%u)\n", iface, mil_source, width, height, mode);
+
+ if (!mil_source) return E_INVALIDARG;
+
+ hr = mil_source->lpVtbl->QueryInterface(mil_source, &IID_IWICBitmapSource, (void **)&wic_source);
+ if (hr == S_OK)
+ {
+ hr = IWICBitmapScaler_Initialize(&This->IWICBitmapScaler_iface, wic_source, width, height, mode);
+ IWICBitmapSource_Release(wic_source);
+ }
+ return hr;
+}
+
+static const IMILBitmapScalerVtbl IMILBitmapScaler_Vtbl = {
+ IMILBitmapScaler_QueryInterface,
+ IMILBitmapScaler_AddRef,
+ IMILBitmapScaler_Release,
+ IMILBitmapScaler_GetSize,
+ IMILBitmapScaler_GetPixelFormat,
+ IMILBitmapScaler_GetResolution,
+ IMILBitmapScaler_CopyPalette,
+ IMILBitmapScaler_CopyPixels,
+ IMILBitmapScaler_unknown1,
+ IMILBitmapScaler_Initialize
+};
+
HRESULT BitmapScaler_Create(IWICBitmapScaler **scaler)
{
BitmapScaler *This;
@@ -382,6 +550,7 @@ HRESULT BitmapScaler_Create(IWICBitmapScaler **scaler)
if (!This) return E_OUTOFMEMORY;
This->IWICBitmapScaler_iface.lpVtbl = &BitmapScaler_Vtbl;
+ This->IMILBitmapScaler_iface.lpVtbl = &IMILBitmapScaler_Vtbl;
This->ref = 1;
This->source = NULL;
This->width = 0;
diff --git a/dlls/windowscodecs/wincodecs_private.h b/dlls/windowscodecs/wincodecs_private.h
index eda1b7a..2a17fdf 100644
--- a/dlls/windowscodecs/wincodecs_private.h
+++ b/dlls/windowscodecs/wincodecs_private.h
@@ -60,6 +60,25 @@ DECLARE_INTERFACE_(IMILBitmapSource,IUnknown)
};
#undef INTERFACE
+#define INTERFACE IMILBitmapScaler
+DECLARE_INTERFACE_(IMILBitmapScaler,IUnknown)
+{
+ /*** IUnknown methods ***/
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID,void **) PURE;
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
+ /*** IWICBitmapSource methods ***/
+ STDMETHOD_(HRESULT,GetSize)(THIS_ UINT *,UINT *) PURE;
+ STDMETHOD_(HRESULT,GetPixelFormat)(THIS_ int *) PURE;
+ STDMETHOD_(HRESULT,GetResolution)(THIS_ double *,double *) PURE;
+ STDMETHOD_(HRESULT,CopyPalette)(THIS_ IWICPalette *) PURE;
+ STDMETHOD_(HRESULT,CopyPixels)(THIS_ const WICRect *,UINT,UINT,BYTE *) PURE;
+ /*** IMILBitmapScaler methods ***/
+ STDMETHOD_(HRESULT,unknown1)(THIS_ void **) PURE;
+ STDMETHOD_(HRESULT,Initialize)(THIS_ IMILBitmapSource *,UINT,UINT,WICBitmapInterpolationMode);
+};
+#undef INTERFACE
+
#ifdef __i386__ /* thiscall functions are i386-specific */
#define THISCALL(func) __thiscall_ ## func
--
2.7.1

View File

@ -1 +0,0 @@
Fixes: [34764] Improve compatibility of IMILBitmapSource interface

View File

@ -1,20 +1,22 @@
From db68f510b12411a5efc5b27c7bd6156e95760bae Mon Sep 17 00:00:00 2001
From 96a14002a93d7c058944649b0720159f98a75f71 Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Sun, 30 Sep 2018 12:02:00 -0500
Subject: [PATCH] wined3d: Use glReadPixels for RT texture download.
Signed-off-by: Andrew Wesie <awesie@gmail.com>
---
dlls/wined3d/texture.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
dlls/wined3d/texture.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
index 05f210f6..e7c47260 100644
index b865c9c..b2e5ea3 100644
--- a/dlls/wined3d/texture.c
+++ b/dlls/wined3d/texture.c
@@ -2394,11 +2394,13 @@ void wined3d_texture_download_data(struct wined3d_texture *texture, unsigned int
@@ -2366,12 +2366,15 @@ void wined3d_texture_download_data(struct wined3d_texture *texture, unsigned int
struct wined3d_context *context, const struct wined3d_bo_address *data)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
+ struct wined3d_context_gl *context_gl = wined3d_context_gl(context);
const struct wined3d_format_gl *format_gl;
+ struct wined3d_texture_sub_resource *sub_resource;
unsigned int level;
@ -26,7 +28,7 @@ index 05f210f6..e7c47260 100644
level = sub_resource_idx % texture->level_count;
if ((texture->resource.type == WINED3D_RTYPE_TEXTURE_2D
@@ -2432,6 +2434,23 @@ void wined3d_texture_download_data(struct wined3d_texture *texture, unsigned int
@@ -2405,6 +2408,23 @@ void wined3d_texture_download_data(struct wined3d_texture *texture, unsigned int
GL_EXTCALL(glGetCompressedTexImage(target, level, data->addr));
checkGLcall("glGetCompressedTexImage");
}
@ -36,9 +38,9 @@ index 05f210f6..e7c47260 100644
+ TRACE("Downloading (glReadPixels) texture %p, %u, level %u, format %#x, type %#x, data %p.\n",
+ texture, sub_resource_idx, level, format_gl->format, format_gl->type, data->addr);
+
+ context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, &texture->resource, sub_resource_idx, NULL,
+ wined3d_context_gl_apply_fbo_state_blit(context_gl, GL_READ_FRAMEBUFFER, &texture->resource, sub_resource_idx, NULL,
+ 0, sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB));
+ context_check_fbo_status(context, GL_READ_FRAMEBUFFER);
+ wined3d_context_gl_check_fbo_status(context_gl, GL_READ_FRAMEBUFFER);
+ context_invalidate_state(context, STATE_FRAMEBUFFER);
+ gl_info->gl_ops.gl.p_glReadBuffer(GL_COLOR_ATTACHMENT0);
+ checkGLcall("glReadBuffer()");
@ -51,5 +53,5 @@ index 05f210f6..e7c47260 100644
{
TRACE("Downloading texture %p, %u, level %u, format %#x, type %#x, data %p.\n",
--
2.19.1
1.9.1

View File

@ -0,0 +1,25 @@
From f917f4fe0b07dc32dac01c6759de8e10217d4143 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Thu, 16 May 2019 08:45:11 +1000
Subject: [PATCH] Revert "xaudio2: Fix 32-bit build."
This reverts commit 2de9d9ec440cb29460ca8ceeaa11c867c5d29359.
---
dlls/xaudio2_7/xaudio_dll.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/dlls/xaudio2_7/xaudio_dll.c b/dlls/xaudio2_7/xaudio_dll.c
index 70ba243..cbbedc4 100644
--- a/dlls/xaudio2_7/xaudio_dll.c
+++ b/dlls/xaudio2_7/xaudio_dll.c
@@ -35,7 +35,6 @@
#include "ole2.h"
#include "rpcproxy.h"
-#include "wine/asm.h"
#include "wine/debug.h"
#include "wine/heap.h"
--
1.9.1