Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
bb4f7505
Commit
bb4f7505
authored
Jul 06, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jul 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: COM cleanup for the IDirect3DVertexShader9 iface.
parent
f12cbfb5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
d3d9_private.h
dlls/d3d9/d3d9_private.h
+1
-2
device.c
dlls/d3d9/device.c
+1
-1
shader.c
dlls/d3d9/shader.c
+9
-6
No files found.
dlls/d3d9/d3d9_private.h
View file @
bb4f7505
...
@@ -407,8 +407,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
...
@@ -407,8 +407,7 @@ HRESULT vertexdeclaration_init(IDirect3DVertexDeclaration9Impl *declaration,
* IDirect3DVertexShader implementation structure
* IDirect3DVertexShader implementation structure
*/
*/
typedef
struct
IDirect3DVertexShader9Impl
{
typedef
struct
IDirect3DVertexShader9Impl
{
/* IUnknown fields */
IDirect3DVertexShader9
IDirect3DVertexShader9_iface
;
const
IDirect3DVertexShader9Vtbl
*
lpVtbl
;
LONG
ref
;
LONG
ref
;
struct
wined3d_shader
*
wined3d_shader
;
struct
wined3d_shader
*
wined3d_shader
;
IDirect3DDevice9Ex
*
parentDevice
;
IDirect3DDevice9Ex
*
parentDevice
;
...
...
dlls/d3d9/device.c
View file @
bb4f7505
...
@@ -2289,7 +2289,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(IDirect3DDevice9Ex
...
@@ -2289,7 +2289,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_CreateVertexShader(IDirect3DDevice9Ex
}
}
TRACE
(
"Created vertex shader %p.
\n
"
,
object
);
TRACE
(
"Created vertex shader %p.
\n
"
,
object
);
*
shader
=
(
IDirect3DVertexShader9
*
)
object
;
*
shader
=
&
object
->
IDirect3DVertexShader9_iface
;
return
D3D_OK
;
return
D3D_OK
;
}
}
...
...
dlls/d3d9/shader.c
View file @
bb4f7505
...
@@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
...
@@ -25,7 +25,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d9);
static
inline
IDirect3DVertexShader9Impl
*
impl_from_IDirect3DVertexShader9
(
IDirect3DVertexShader9
*
iface
)
static
inline
IDirect3DVertexShader9Impl
*
impl_from_IDirect3DVertexShader9
(
IDirect3DVertexShader9
*
iface
)
{
{
return
CONTAINING_RECORD
(
iface
,
IDirect3DVertexShader9Impl
,
lpVtbl
);
return
CONTAINING_RECORD
(
iface
,
IDirect3DVertexShader9Impl
,
IDirect3DVertexShader9_iface
);
}
}
static
HRESULT
WINAPI
d3d9_vertexshader_QueryInterface
(
IDirect3DVertexShader9
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
WINAPI
d3d9_vertexshader_QueryInterface
(
IDirect3DVertexShader9
*
iface
,
REFIID
riid
,
void
**
object
)
...
@@ -48,7 +48,7 @@ static HRESULT WINAPI d3d9_vertexshader_QueryInterface(IDirect3DVertexShader9 *i
...
@@ -48,7 +48,7 @@ static HRESULT WINAPI d3d9_vertexshader_QueryInterface(IDirect3DVertexShader9 *i
static
ULONG
WINAPI
d3d9_vertexshader_AddRef
(
IDirect3DVertexShader9
*
iface
)
static
ULONG
WINAPI
d3d9_vertexshader_AddRef
(
IDirect3DVertexShader9
*
iface
)
{
{
IDirect3DVertexShader9Impl
*
shader
=
(
IDirect3DVertexShader9Impl
*
)
iface
;
IDirect3DVertexShader9Impl
*
shader
=
impl_from_IDirect3DVertexShader9
(
iface
)
;
ULONG
refcount
=
InterlockedIncrement
(
&
shader
->
ref
);
ULONG
refcount
=
InterlockedIncrement
(
&
shader
->
ref
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
refcount
);
...
@@ -66,7 +66,7 @@ static ULONG WINAPI d3d9_vertexshader_AddRef(IDirect3DVertexShader9 *iface)
...
@@ -66,7 +66,7 @@ static ULONG WINAPI d3d9_vertexshader_AddRef(IDirect3DVertexShader9 *iface)
static
ULONG
WINAPI
d3d9_vertexshader_Release
(
IDirect3DVertexShader9
*
iface
)
static
ULONG
WINAPI
d3d9_vertexshader_Release
(
IDirect3DVertexShader9
*
iface
)
{
{
IDirect3DVertexShader9Impl
*
shader
=
(
IDirect3DVertexShader9Impl
*
)
iface
;
IDirect3DVertexShader9Impl
*
shader
=
impl_from_IDirect3DVertexShader9
(
iface
)
;
ULONG
refcount
=
InterlockedDecrement
(
&
shader
->
ref
);
ULONG
refcount
=
InterlockedDecrement
(
&
shader
->
ref
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
refcount
);
...
@@ -88,9 +88,11 @@ static ULONG WINAPI d3d9_vertexshader_Release(IDirect3DVertexShader9 *iface)
...
@@ -88,9 +88,11 @@ static ULONG WINAPI d3d9_vertexshader_Release(IDirect3DVertexShader9 *iface)
static
HRESULT
WINAPI
d3d9_vertexshader_GetDevice
(
IDirect3DVertexShader9
*
iface
,
IDirect3DDevice9
**
device
)
static
HRESULT
WINAPI
d3d9_vertexshader_GetDevice
(
IDirect3DVertexShader9
*
iface
,
IDirect3DDevice9
**
device
)
{
{
IDirect3DVertexShader9Impl
*
shader
=
impl_from_IDirect3DVertexShader9
(
iface
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
TRACE
(
"iface %p, device %p.
\n
"
,
iface
,
device
);
*
device
=
(
IDirect3DDevice9
*
)
((
IDirect3DVertexShader9Impl
*
)
iface
)
->
parentDevice
;
*
device
=
(
IDirect3DDevice9
*
)
shader
->
parentDevice
;
IDirect3DDevice9_AddRef
(
*
device
);
IDirect3DDevice9_AddRef
(
*
device
);
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
TRACE
(
"Returning device %p.
\n
"
,
*
device
);
...
@@ -101,12 +103,13 @@ static HRESULT WINAPI d3d9_vertexshader_GetDevice(IDirect3DVertexShader9 *iface,
...
@@ -101,12 +103,13 @@ static HRESULT WINAPI d3d9_vertexshader_GetDevice(IDirect3DVertexShader9 *iface,
static
HRESULT
WINAPI
d3d9_vertexshader_GetFunction
(
IDirect3DVertexShader9
*
iface
,
static
HRESULT
WINAPI
d3d9_vertexshader_GetFunction
(
IDirect3DVertexShader9
*
iface
,
void
*
data
,
UINT
*
data_size
)
void
*
data
,
UINT
*
data_size
)
{
{
IDirect3DVertexShader9Impl
*
shader
=
impl_from_IDirect3DVertexShader9
(
iface
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, data %p, data_size %p.
\n
"
,
iface
,
data
,
data_size
);
TRACE
(
"iface %p, data %p, data_size %p.
\n
"
,
iface
,
data
,
data_size
);
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
wined3d_shader_get_byte_code
(
((
IDirect3DVertexShader9Impl
*
)
iface
)
->
wined3d_shader
,
data
,
data_size
);
hr
=
wined3d_shader_get_byte_code
(
shader
->
wined3d_shader
,
data
,
data_size
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
return
hr
;
return
hr
;
...
@@ -138,7 +141,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, IDirect3DDevice9Im
...
@@ -138,7 +141,7 @@ HRESULT vertexshader_init(IDirect3DVertexShader9Impl *shader, IDirect3DDevice9Im
HRESULT
hr
;
HRESULT
hr
;
shader
->
ref
=
1
;
shader
->
ref
=
1
;
shader
->
lpVtbl
=
&
d3d9_vertexshader_vtbl
;
shader
->
IDirect3DVertexShader9_iface
.
lpVtbl
=
&
d3d9_vertexshader_vtbl
;
wined3d_mutex_lock
();
wined3d_mutex_lock
();
hr
=
wined3d_shader_create_vs
(
device
->
wined3d_device
,
byte_code
,
NULL
,
hr
=
wined3d_shader_create_vs
(
device
->
wined3d_device
,
byte_code
,
NULL
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment