d3d8: Remove unused code.

Henri Verbeet hverbeet at codeweavers.com
Mon Dec 15 09:35:13 CST 2008


Also corrects some related comments.
---
 dlls/d3d8/d3d8_private.h |   18 ++----------------
 dlls/d3d8/pixelshader.c  |   24 ------------------------
 dlls/d3d8/vertexshader.c |   29 -----------------------------
 3 files changed, 2 insertions(+), 69 deletions(-)

diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h
index 28952a3..b9850b6 100644
--- a/dlls/d3d8/d3d8_private.h
+++ b/dlls/d3d8/d3d8_private.h
@@ -536,7 +536,7 @@ typedef struct {
 
 
 /*****************************************************************************
- * IDirect3DVertexShader9 interface
+ * IDirect3DVertexShader8 interface
  */
 #define INTERFACE IDirect3DVertexShader8
 DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
@@ -545,9 +545,6 @@ DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
     STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirect3DVertexShader9 methods ***/
-    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
-    STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
 };
 #undef INTERFACE
 
@@ -555,16 +552,13 @@ DECLARE_INTERFACE_(IDirect3DVertexShader8, IUnknown)
 #define IDirect3DVertexShader8_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
 #define IDirect3DVertexShader8_AddRef(p)              (p)->lpVtbl->AddRef(p)
 #define IDirect3DVertexShader8_Release(p)             (p)->lpVtbl->Release(p)
-/*** IDirect3DVertexShader8 methods ***/
-#define IDirect3DVertexShader8_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DVertexShader8_GetFunction(p,a,b)     (p)->lpVtbl->GetFunction(p,a,b)
 
 /* ------------------------- */
 /* IDirect3DVertexShader8Impl */
 /* ------------------------- */
 
 /*****************************************************************************
- * IDirect3DPixelShader9 interface
+ * IDirect3DPixelShader8 interface
  */
 #define INTERFACE IDirect3DPixelShader8
 DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
@@ -573,9 +567,6 @@ DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
     STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
     STDMETHOD_(ULONG,Release)(THIS) PURE;
-    /*** IDirect3DPixelShader8 methods ***/
-    STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice8** ppDevice) PURE;
-    STDMETHOD(GetFunction)(THIS_ void*, UINT* pSizeOfData) PURE;
 };
 #undef INTERFACE
 
@@ -583,10 +574,6 @@ DECLARE_INTERFACE_(IDirect3DPixelShader8,IUnknown)
 #define IDirect3DPixelShader8_QueryInterface(p,a,b)  (p)->lpVtbl->QueryInterface(p,a,b)
 #define IDirect3DPixelShader8_AddRef(p)              (p)->lpVtbl->AddRef(p)
 #define IDirect3DPixelShader8_Release(p)             (p)->lpVtbl->Release(p)
-/*** IDirect3DPixelShader8 methods ***/
-#define IDirect3DPixelShader8_GetDevice(p,a)         (p)->lpVtbl->GetDevice(p,a)
-#define IDirect3DPixelShader8_GetFunction(p,a,b)     (p)->lpVtbl->GetFunction(p,a,b)
-
 
 /*****************************************************************************
  * Predeclare the interface implementation structures
@@ -624,7 +611,6 @@ typedef struct IDirect3DPixelShader8Impl {
     LONG                             ref;
 
     DWORD                            handle;
-    /* The device, to be replaced by an IDirect3DDeviceImpl */
     IWineD3DPixelShader             *wineD3DPixelShader;
 } IDirect3DPixelShader8Impl;
 
diff --git a/dlls/d3d8/pixelshader.c b/dlls/d3d8/pixelshader.c
index 3ad39e6..5cfb0ca 100644
--- a/dlls/d3d8/pixelshader.c
+++ b/dlls/d3d8/pixelshader.c
@@ -62,34 +62,10 @@ static ULONG WINAPI IDirect3DPixelShader8Impl_Release(IDirect3DPixelShader8 * if
     return ref;
 }
 
-/* IDirect3DPixelShader8 Interface follow: */
-static HRESULT WINAPI IDirect3DPixelShader8Impl_GetDevice(IDirect3DPixelShader8 *iface, IDirect3DDevice8 **ppDevice) {
-    IDirect3DPixelShader8Impl *This = (IDirect3DPixelShader8Impl *)iface;
-    IWineD3DDevice *myDevice = NULL;
-
-    TRACE("(%p) : Relay\n", This);
-
-    IWineD3DPixelShader_GetDevice(This->wineD3DPixelShader, &myDevice);
-    IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice);
-    IWineD3DDevice_Release(myDevice);
-    TRACE("(%p) returning (%p)\n", This, *ppDevice);
-    return D3D_OK;
-}
-
-static HRESULT WINAPI IDirect3DPixelShader8Impl_GetFunction(IDirect3DPixelShader8 *iface, VOID *pData, UINT *pSizeOfData) {
-    IDirect3DPixelShader8Impl *This = (IDirect3DPixelShader8Impl *)iface;
-    TRACE("(%p) Relay\n", This);
-    return IWineD3DPixelShader_GetFunction(This->wineD3DPixelShader, pData, pSizeOfData);
-}
-
-
 const IDirect3DPixelShader8Vtbl Direct3DPixelShader8_Vtbl =
 {
     /* IUnknown */
     IDirect3DPixelShader8Impl_QueryInterface,
     IDirect3DPixelShader8Impl_AddRef,
     IDirect3DPixelShader8Impl_Release,
-    /* IDirect3DPixelShader8 */
-    IDirect3DPixelShader8Impl_GetDevice,
-    IDirect3DPixelShader8Impl_GetFunction
 };
diff --git a/dlls/d3d8/vertexshader.c b/dlls/d3d8/vertexshader.c
index 16a809e..bdc6685 100644
--- a/dlls/d3d8/vertexshader.c
+++ b/dlls/d3d8/vertexshader.c
@@ -63,39 +63,10 @@ static ULONG WINAPI IDirect3DVertexShader8Impl_Release(IDirect3DVertexShader8 *i
     return ref;
 }
 
-/* IDirect3DVertexShader8 Interface follow: */
-static HRESULT WINAPI IDirect3DVertexShader8Impl_GetDevice(IDirect3DVertexShader8 *iface, IDirect3DDevice8** ppDevice) {
-    IDirect3DVertexShader8Impl *This = (IDirect3DVertexShader8Impl *)iface;
-    IWineD3DDevice *myDevice = NULL;
-    HRESULT hr;
-    TRACE("(%p) : Relay\n", This);
-
-    hr = IWineD3DVertexShader_GetDevice(This->wineD3DVertexShader, &myDevice);
-    if (WINED3D_OK == hr && myDevice != NULL) {
-        hr = IWineD3DDevice_GetParent(myDevice, (IUnknown **)ppDevice);
-        IWineD3DDevice_Release(myDevice);
-    } else {
-        *ppDevice = NULL;
-    }
-    TRACE("(%p) returning (%p)\n", This, *ppDevice);
-    return hr;
-}
-
-static HRESULT WINAPI IDirect3DVertexShader8Impl_GetFunction(IDirect3DVertexShader8 *iface, VOID* pData, UINT* pSizeOfData) {
-    IDirect3DVertexShader8Impl *This = (IDirect3DVertexShader8Impl *)iface;
-
-    TRACE("(%p) : Relay\n", This);
-    return IWineD3DVertexShader_GetFunction(This->wineD3DVertexShader, pData, pSizeOfData);
-}
-
-
 const IDirect3DVertexShader8Vtbl Direct3DVertexShader8_Vtbl =
 {
     /* IUnknown */
     IDirect3DVertexShader8Impl_QueryInterface,
     IDirect3DVertexShader8Impl_AddRef,
     IDirect3DVertexShader8Impl_Release,
-    /* IDirect3DVertexShader8 */
-    IDirect3DVertexShader8Impl_GetDevice,
-    IDirect3DVertexShader8Impl_GetFunction
 };
-- 
1.5.6.4



--------------030308080905020601060108--



More information about the wine-patches mailing list