Rebase against e3bd659be9b2868b121857fb2643d775bbf0d8c7.

[d3dx9_33-Share_Source]
Removed patch to share source of d3dx9_36 with d3dx9_33 to avoid Wine DLL
forwards (accepted upstream).
This commit is contained in:
Sebastian Lackner
2016-06-23 16:16:20 +02:00
parent a8976086e5
commit 1d08851c35
15 changed files with 466 additions and 2657 deletions

View File

@@ -0,0 +1,237 @@
From d1229f450e5b7f7cdda6654010c520dc79f7951a Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 14 Mar 2015 04:48:38 +0100
Subject: d3dx9_*: Adjust ID3DXEffect interface based on DLL version.
---
dlls/d3dx9_24/Makefile.in | 1 +
dlls/d3dx9_25/Makefile.in | 1 +
dlls/d3dx9_26/Makefile.in | 1 +
dlls/d3dx9_27/Makefile.in | 1 +
dlls/d3dx9_28/Makefile.in | 1 +
dlls/d3dx9_29/Makefile.in | 1 +
dlls/d3dx9_30/Makefile.in | 1 +
dlls/d3dx9_31/Makefile.in | 1 +
dlls/d3dx9_32/Makefile.in | 1 +
dlls/d3dx9_33/Makefile.in | 1 +
dlls/d3dx9_36/Makefile.in | 1 +
dlls/d3dx9_36/effect.c | 8 ++++++++
include/d3dx9effect.h | 12 ++++++++++++
13 files changed, 31 insertions(+)
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
index 71dee7f..7464bd1 100644
--- a/dlls/d3dx9_24/Makefile.in
+++ b/dlls/d3dx9_24/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_24.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=24
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
index 9b44be8..1531e66 100644
--- a/dlls/d3dx9_25/Makefile.in
+++ b/dlls/d3dx9_25/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_25.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=25
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
index 14a52d1..2a58c58 100644
--- a/dlls/d3dx9_26/Makefile.in
+++ b/dlls/d3dx9_26/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_26.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=26
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
index b2784fc..9ba1e2a 100644
--- a/dlls/d3dx9_27/Makefile.in
+++ b/dlls/d3dx9_27/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_27.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=27
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
index f6b31d6..15dec71 100644
--- a/dlls/d3dx9_28/Makefile.in
+++ b/dlls/d3dx9_28/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_28.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=28
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
index 9bd84be..5a5a8fc 100644
--- a/dlls/d3dx9_29/Makefile.in
+++ b/dlls/d3dx9_29/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_29.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=29
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
index a8ee15d..bafcdb4 100644
--- a/dlls/d3dx9_30/Makefile.in
+++ b/dlls/d3dx9_30/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_30.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=30
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
index 27bd337..f5df4d8 100644
--- a/dlls/d3dx9_31/Makefile.in
+++ b/dlls/d3dx9_31/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_31.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=31
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
index 1229c7f..cce9293 100644
--- a/dlls/d3dx9_32/Makefile.in
+++ b/dlls/d3dx9_32/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_32.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=32
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
index 44bd991..c9b6587 100644
--- a/dlls/d3dx9_33/Makefile.in
+++ b/dlls/d3dx9_33/Makefile.in
@@ -1,5 +1,6 @@
MODULE = d3dx9_33.dll
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=33
PARENTSRC = ../d3dx9_36
C_SRCS = \
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
index 83f7d1c..24ce09d 100644
--- a/dlls/d3dx9_36/Makefile.in
+++ b/dlls/d3dx9_36/Makefile.in
@@ -1,6 +1,7 @@
MODULE = d3dx9_36.dll
IMPORTLIB = d3dx9
IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32
+EXTRADEFS = -D_D3DX9_VER=36
C_SRCS = \
animation.c \
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
index fd8d59e..5b140fe 100644
--- a/dlls/d3dx9_36/effect.c
+++ b/dlls/d3dx9_36/effect.c
@@ -3888,6 +3888,7 @@ static HRESULT WINAPI ID3DXEffectImpl_ApplyParameterBlock(ID3DXEffect* iface, D3
return E_NOTIMPL;
}
+#if _D3DX9_VER >= 26
static HRESULT WINAPI ID3DXEffectImpl_DeleteParameterBlock(ID3DXEffect* iface, D3DXHANDLE parameter_block)
{
struct ID3DXEffectImpl *This = impl_from_ID3DXEffect(iface);
@@ -3896,6 +3897,7 @@ static HRESULT WINAPI ID3DXEffectImpl_DeleteParameterBlock(ID3DXEffect* iface, D
return E_NOTIMPL;
}
+#endif
static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface,
struct IDirect3DDevice9 *device, struct ID3DXEffect **effect)
@@ -3907,6 +3909,7 @@ static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface,
return E_NOTIMPL;
}
+#if _D3DX9_VER >= 27
static HRESULT WINAPI ID3DXEffectImpl_SetRawValue(ID3DXEffect *iface,
D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes)
{
@@ -3915,6 +3918,7 @@ static HRESULT WINAPI ID3DXEffectImpl_SetRawValue(ID3DXEffect *iface,
return E_NOTIMPL;
}
+#endif
static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl =
{
@@ -3997,9 +4001,13 @@ static const struct ID3DXEffectVtbl ID3DXEffect_Vtbl =
ID3DXEffectImpl_BeginParameterBlock,
ID3DXEffectImpl_EndParameterBlock,
ID3DXEffectImpl_ApplyParameterBlock,
+#if _D3DX9_VER >= 26
ID3DXEffectImpl_DeleteParameterBlock,
+#endif
ID3DXEffectImpl_CloneEffect,
+#if _D3DX9_VER >= 27
ID3DXEffectImpl_SetRawValue
+#endif
};
static inline struct ID3DXEffectCompilerImpl *impl_from_ID3DXEffectCompiler(ID3DXEffectCompiler *iface)
diff --git a/include/d3dx9effect.h b/include/d3dx9effect.h
index 3f527ed..b8259e4 100644
--- a/include/d3dx9effect.h
+++ b/include/d3dx9effect.h
@@ -1,5 +1,6 @@
/*
* Copyright 2010 Christian Costa
+ * Copyright 2015 Sebastian Lackner
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -197,7 +198,13 @@ DECLARE_INTERFACE_(ID3DXEffectStateManager, IUnknown)
typedef struct ID3DXEffect *LPD3DXEFFECT;
+#if defined(_D3DX9_VER) && _D3DX9_VER <= 25
+DEFINE_GUID(IID_ID3DXEffect, 0xd165ccb1, 0x62b0, 0x4a33, 0xb3, 0xfa, 0xa9, 0x23, 0x0, 0x30, 0x5a, 0x11);
+#elif defined(_D3DX9_VER) && _D3DX9_VER == 26
+DEFINE_GUID(IID_ID3DXEffect, 0xc7b17651, 0x5420, 0x490e, 0x8a, 0x7f, 0x92, 0x36, 0x75, 0xa2, 0xd6, 0x87);
+#else
DEFINE_GUID(IID_ID3DXEffect, 0xf6ceb4b3, 0x4e4c, 0x40dd, 0xb8, 0x83, 0x8d, 0x8d, 0xe5, 0xea, 0xc, 0xd5);
+#endif
#define INTERFACE ID3DXEffect
@@ -282,10 +289,15 @@ DECLARE_INTERFACE_(ID3DXEffect, ID3DXBaseEffect)
STDMETHOD(BeginParameterBlock)(THIS) PURE;
STDMETHOD_(D3DXHANDLE, EndParameterBlock)(THIS) PURE;
STDMETHOD(ApplyParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
+#if !defined(_D3DX9_VER) || _D3DX9_VER >= 26
STDMETHOD(DeleteParameterBlock)(THIS_ D3DXHANDLE parameter_block) PURE;
+#endif
STDMETHOD(CloneEffect)(THIS_ struct IDirect3DDevice9 *device, struct ID3DXEffect **effect) PURE;
+#if !defined(_D3DX9_VER) || _D3DX9_VER >= 27
STDMETHOD(SetRawValue)(THIS_ D3DXHANDLE parameter, const void *data, UINT byte_offset, UINT bytes) PURE;
+#endif
};
+
#undef INTERFACE
typedef struct ID3DXEffectCompiler *LPD3DXEFFECTCOMPILER;
--
2.8.0

View File

@@ -1,2 +1,2 @@
Fixes: [25138] Fix wrong version of ID3DXEffect interface for d3dx9_25
Category: stable
Fixes: Fix wrong version of ID3DXEffect interface for d3dx9_24