Commit f196050f authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

d3d10core: COM cleanup for the ID3D10PixelShader iface.

parent 887a4ff3
...@@ -194,7 +194,7 @@ HRESULT d3d10_geometry_shader_init(struct d3d10_geometry_shader *shader, struct ...@@ -194,7 +194,7 @@ HRESULT d3d10_geometry_shader_init(struct d3d10_geometry_shader *shader, struct
/* ID3D10PixelShader */ /* ID3D10PixelShader */
struct d3d10_pixel_shader struct d3d10_pixel_shader
{ {
const struct ID3D10PixelShaderVtbl *vtbl; ID3D10PixelShader ID3D10PixelShader_iface;
LONG refcount; LONG refcount;
struct wined3d_shader *wined3d_shader; struct wined3d_shader *wined3d_shader;
......
...@@ -952,7 +952,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePixelShader(ID3D10Device *if ...@@ -952,7 +952,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreatePixelShader(ID3D10Device *if
} }
TRACE("Created pixel shader %p.\n", object); TRACE("Created pixel shader %p.\n", object);
*shader = (ID3D10PixelShader *)object; *shader = &object->ID3D10PixelShader_iface;
return S_OK; return S_OK;
} }
......
...@@ -421,7 +421,7 @@ HRESULT d3d10_geometry_shader_init(struct d3d10_geometry_shader *shader, struct ...@@ -421,7 +421,7 @@ HRESULT d3d10_geometry_shader_init(struct d3d10_geometry_shader *shader, struct
static inline struct d3d10_pixel_shader *impl_from_ID3D10PixelShader(ID3D10PixelShader *iface) static inline struct d3d10_pixel_shader *impl_from_ID3D10PixelShader(ID3D10PixelShader *iface)
{ {
return CONTAINING_RECORD(iface, struct d3d10_pixel_shader, vtbl); return CONTAINING_RECORD(iface, struct d3d10_pixel_shader, ID3D10PixelShader_iface);
} }
/* IUnknown methods */ /* IUnknown methods */
...@@ -448,7 +448,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_pixel_shader_QueryInterface(ID3D10PixelSh ...@@ -448,7 +448,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_pixel_shader_QueryInterface(ID3D10PixelSh
static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_AddRef(ID3D10PixelShader *iface) static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_AddRef(ID3D10PixelShader *iface)
{ {
struct d3d10_pixel_shader *This = (struct d3d10_pixel_shader *)iface; struct d3d10_pixel_shader *This = impl_from_ID3D10PixelShader(iface);
ULONG refcount = InterlockedIncrement(&This->refcount); ULONG refcount = InterlockedIncrement(&This->refcount);
TRACE("%p increasing refcount to %u\n", This, refcount); TRACE("%p increasing refcount to %u\n", This, refcount);
...@@ -461,7 +461,7 @@ static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_AddRef(ID3D10PixelShader *ifac ...@@ -461,7 +461,7 @@ static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_AddRef(ID3D10PixelShader *ifac
static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_Release(ID3D10PixelShader *iface) static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_Release(ID3D10PixelShader *iface)
{ {
struct d3d10_pixel_shader *This = (struct d3d10_pixel_shader *)iface; struct d3d10_pixel_shader *This = impl_from_ID3D10PixelShader(iface);
ULONG refcount = InterlockedDecrement(&This->refcount); ULONG refcount = InterlockedDecrement(&This->refcount);
TRACE("%p decreasing refcount to %u\n", This, refcount); TRACE("%p decreasing refcount to %u\n", This, refcount);
...@@ -536,7 +536,7 @@ HRESULT d3d10_pixel_shader_init(struct d3d10_pixel_shader *shader, struct d3d10_ ...@@ -536,7 +536,7 @@ HRESULT d3d10_pixel_shader_init(struct d3d10_pixel_shader *shader, struct d3d10_
struct d3d10_shader_info shader_info; struct d3d10_shader_info shader_info;
HRESULT hr; HRESULT hr;
shader->vtbl = &d3d10_pixel_shader_vtbl; shader->ID3D10PixelShader_iface.lpVtbl = &d3d10_pixel_shader_vtbl;
shader->refcount = 1; shader->refcount = 1;
shader_info.output_signature = &shader->output_signature; shader_info.output_signature = &shader->output_signature;
......
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