Commit 9ea2ee5f authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of IWineD3DGeometryShader.

parent 49725ba5
......@@ -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;
};
......
......@@ -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;
}
......
......@@ -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;
}
......
......@@ -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,
......
......@@ -2832,7 +2832,7 @@ HRESULT vertexshader_init(IWineD3DVertexShaderImpl *shader, IWineD3DDeviceImpl *
struct wined3d_geometryshader
{
const struct IWineD3DGeometryShaderVtbl *vtbl;
const struct IWineD3DBaseShaderVtbl *vtbl;
IWineD3DBaseShaderClass base_shader;
};
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment