[PATCH 3/7] wined3d: Get rid of IWineD3DGeometryShader.
Henri Verbeet
hverbeet at codeweavers.com
Tue Mar 29 12:21:48 CDT 2011
---
dlls/d3d10core/d3d10core_private.h | 2 +-
dlls/d3d10core/shader.c | 4 +---
dlls/wined3d/device.c | 4 ++--
dlls/wined3d/shader.c | 17 ++++++++---------
dlls/wined3d/wined3d_private.h | 2 +-
include/wine/wined3d.idl | 11 +----------
6 files changed, 14 insertions(+), 26 deletions(-)
diff --git a/dlls/d3d10core/d3d10core_private.h b/dlls/d3d10core/d3d10core_private.h
index 131790f..bdfbc34 100644
--- a/dlls/d3d10core/d3d10core_private.h
+++ b/dlls/d3d10core/d3d10core_private.h
@@ -182,7 +182,7 @@ struct d3d10_geometry_shader
const struct ID3D10GeometryShaderVtbl *vtbl;
LONG refcount;
- IWineD3DGeometryShader *wined3d_shader;
+ IWineD3DBaseShader *wined3d_shader;
struct wined3d_shader_signature output_signature;
};
diff --git a/dlls/d3d10core/shader.c b/dlls/d3d10core/shader.c
index 5f41927..a1140fe 100644
--- a/dlls/d3d10core/shader.c
+++ b/dlls/d3d10core/shader.c
@@ -307,9 +307,7 @@ static ULONG STDMETHODCALLTYPE d3d10_geometry_shader_Release(ID3D10GeometryShade
TRACE("%p decreasing refcount to %u\n", This, refcount);
if (!refcount)
- {
- IWineD3DGeometryShader_Release(This->wined3d_shader);
- }
+ IWineD3DBaseShader_Release(This->wined3d_shader);
return refcount;
}
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 3ab4a4c..6aebf7e 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1546,7 +1546,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateVertexShader(IWineD3DDevice *ifac
static HRESULT WINAPI IWineD3DDeviceImpl_CreateGeometryShader(IWineD3DDevice *iface,
const DWORD *byte_code, const struct wined3d_shader_signature *output_signature,
void *parent, const struct wined3d_parent_ops *parent_ops,
- IWineD3DGeometryShader **shader)
+ IWineD3DBaseShader **shader)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct wined3d_geometryshader *object;
@@ -1568,7 +1568,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateGeometryShader(IWineD3DDevice *if
}
TRACE("Created geometry shader %p.\n", object);
- *shader = (IWineD3DGeometryShader *)object;
+ *shader = (IWineD3DBaseShader *)object;
return WINED3D_OK;
}
diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c
index 413de0a..3343363 100644
--- a/dlls/wined3d/shader.c
+++ b/dlls/wined3d/shader.c
@@ -1892,13 +1892,12 @@ HRESULT vertexshader_init(IWineD3DVertexShaderImpl *shader, IWineD3DDeviceImpl *
return WINED3D_OK;
}
-static HRESULT STDMETHODCALLTYPE geometryshader_QueryInterface(IWineD3DGeometryShader *iface,
+static HRESULT STDMETHODCALLTYPE geometryshader_QueryInterface(IWineD3DBaseShader *iface,
REFIID riid, void **object)
{
TRACE("iface %p, riid %s, object %p.\n", iface, debugstr_guid(riid), object);
- if (IsEqualGUID(riid, &IID_IWineD3DGeometryShader)
- || IsEqualGUID(riid, &IID_IWineD3DBaseShader)
+ if (IsEqualGUID(riid, &IID_IWineD3DBaseShader)
|| IsEqualGUID(riid, &IID_IWineD3DBase)
|| IsEqualGUID(riid, &IID_IUnknown))
{
@@ -1913,7 +1912,7 @@ static HRESULT STDMETHODCALLTYPE geometryshader_QueryInterface(IWineD3DGeometryS
return E_NOINTERFACE;
}
-static ULONG STDMETHODCALLTYPE geometryshader_AddRef(IWineD3DGeometryShader *iface)
+static ULONG STDMETHODCALLTYPE geometryshader_AddRef(IWineD3DBaseShader *iface)
{
struct wined3d_geometryshader *shader = (struct wined3d_geometryshader *)iface;
ULONG refcount = InterlockedIncrement(&shader->base_shader.ref);
@@ -1924,7 +1923,7 @@ static ULONG STDMETHODCALLTYPE geometryshader_AddRef(IWineD3DGeometryShader *ifa
}
/* Do not call while under the GL lock. */
-static ULONG STDMETHODCALLTYPE geometryshader_Release(IWineD3DGeometryShader *iface)
+static ULONG STDMETHODCALLTYPE geometryshader_Release(IWineD3DBaseShader *iface)
{
struct wined3d_geometryshader *shader = (struct wined3d_geometryshader *)iface;
ULONG refcount = InterlockedDecrement(&shader->base_shader.ref);
@@ -1941,21 +1940,21 @@ static ULONG STDMETHODCALLTYPE geometryshader_Release(IWineD3DGeometryShader *if
return refcount;
}
-static void * STDMETHODCALLTYPE geometryshader_GetParent(IWineD3DGeometryShader *iface)
+static void * STDMETHODCALLTYPE geometryshader_GetParent(IWineD3DBaseShader *iface)
{
TRACE("iface %p.\n", iface);
return ((IWineD3DBaseShaderImpl *)iface)->baseShader.parent;
}
-static HRESULT STDMETHODCALLTYPE geometryshader_GetFunction(IWineD3DGeometryShader *iface, void *data, UINT *data_size)
+static HRESULT STDMETHODCALLTYPE geometryshader_GetFunction(IWineD3DBaseShader *iface, void *data, UINT *data_size)
{
TRACE("iface %p, data %p, data_size %p.\n", iface, data, data_size);
return shader_get_function((IWineD3DBaseShaderImpl *)iface, data, data_size);
}
-static HRESULT STDMETHODCALLTYPE geometryshader_SetLocalConstantsF(IWineD3DGeometryShader *iface,
+static HRESULT STDMETHODCALLTYPE geometryshader_SetLocalConstantsF(IWineD3DBaseShader *iface,
UINT start_idx, const float *src_data, UINT count)
{
TRACE("iface %p, start_idx %u, src_data %p, count %u.\n", iface, start_idx, src_data, count);
@@ -1964,7 +1963,7 @@ static HRESULT STDMETHODCALLTYPE geometryshader_SetLocalConstantsF(IWineD3DGeome
start_idx, src_data, count);
}
-static const IWineD3DGeometryShaderVtbl wined3d_geometryshader_vtbl =
+static const IWineD3DBaseShaderVtbl wined3d_geometryshader_vtbl =
{
/* IUnknown methods */
geometryshader_QueryInterface,
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 0ac14d7..4fecd9a 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2832,7 +2832,7 @@ HRESULT vertexshader_init(IWineD3DVertexShaderImpl *shader, IWineD3DDeviceImpl *
struct wined3d_geometryshader
{
- const struct IWineD3DGeometryShaderVtbl *vtbl;
+ const struct IWineD3DBaseShaderVtbl *vtbl;
IWineD3DBaseShaderClass base_shader;
};
diff --git a/include/wine/wined3d.idl b/include/wine/wined3d.idl
index 0055659..934f23f 100644
--- a/include/wine/wined3d.idl
+++ b/include/wine/wined3d.idl
@@ -2405,15 +2405,6 @@ interface IWineD3DBaseShader : IWineD3DBase
[
object,
local,
- uuid(8276c113-388b-49d1-ad8b-c9dd8bcbabcd)
-]
-interface IWineD3DGeometryShader : IWineD3DBaseShader
-{
-}
-
-[
- object,
- local,
uuid(818503da-6f30-11d9-c687-00046142c14f)
]
interface IWineD3DPixelShader : IWineD3DBaseShader
@@ -2554,7 +2545,7 @@ interface IWineD3DDevice : IUnknown
[in] const struct wined3d_shader_signature *output_signature,
[in] void *parent,
[in] const struct wined3d_parent_ops *parent_ops,
- [out] IWineD3DGeometryShader **shader
+ [out] IWineD3DBaseShader **shader
);
HRESULT CreatePixelShader(
[in] const DWORD *function,
--
1.7.3.4
More information about the wine-patches
mailing list