Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
ed418dc8
Commit
ed418dc8
authored
Nov 12, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Allow ID3D10Device to be aggregated.
parent
ccf48fff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
8 deletions
+49
-8
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+3
-0
device.c
dlls/d3d10core/device.c
+46
-8
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
ed418dc8
...
...
@@ -34,9 +34,12 @@ const char *debug_dxgi_format(DXGI_FORMAT format);
/* IDirect3D10Device */
extern
const
struct
ID3D10DeviceVtbl
d3d10_device_vtbl
;
extern
const
struct
IUnknownVtbl
d3d10_device_inner_unkown_vtbl
;
struct
d3d10_device
{
const
struct
ID3D10DeviceVtbl
*
vtbl
;
const
struct
IUnknownVtbl
*
inner_unknown_vtbl
;
IUnknown
*
outer_unknown
;
LONG
refcount
;
};
...
...
dlls/d3d10core/device.c
View file @
ed418dc8
...
...
@@ -24,17 +24,24 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d10core
);
/* IUnknown methods */
/* I
nner I
Unknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_QueryInterface
(
ID3D10Device
*
iface
,
REFIID
riid
,
void
**
object
)
static
inline
struct
d3d10_device
*
d3d10_device_from_inner_unknown
(
IUnknown
*
iface
)
{
return
(
struct
d3d10_device
*
)((
char
*
)
iface
-
FIELD_OFFSET
(
struct
d3d10_device
,
inner_unknown_vtbl
));
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_inner_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d10_device
*
This
=
d3d10_device_from_inner_unknown
(
iface
);
TRACE
(
"iface %p, riid %s, object %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
||
IsEqualGUID
(
riid
,
&
IID_ID3D10Device
))
{
IUnknown_AddRef
(
iface
);
*
object
=
iface
;
IUnknown_AddRef
(
(
IUnknown
*
)
This
);
*
object
=
This
;
return
S_OK
;
}
...
...
@@ -44,9 +51,9 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_QueryInterface(ID3D10Device *iface
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
d3d10_device_
AddRef
(
ID3D10Device
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d10_device_
inner_AddRef
(
IUnknown
*
iface
)
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
struct
d3d10_device
*
This
=
d3d10_device_from_inner_unknown
(
iface
)
;
ULONG
refcount
=
InterlockedIncrement
(
&
This
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
...
...
@@ -54,9 +61,9 @@ static ULONG STDMETHODCALLTYPE d3d10_device_AddRef(ID3D10Device *iface)
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
d3d10_device_
Release
(
ID3D10Device
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d10_device_
inner_Release
(
IUnknown
*
iface
)
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
struct
d3d10_device
*
This
=
d3d10_device_from_inner_unknown
(
iface
)
;
ULONG
refcount
=
InterlockedDecrement
(
&
This
->
refcount
);
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
...
...
@@ -64,6 +71,29 @@ static ULONG STDMETHODCALLTYPE d3d10_device_Release(ID3D10Device *iface)
return
refcount
;
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_QueryInterface
(
ID3D10Device
*
iface
,
REFIID
riid
,
void
**
object
)
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
TRACE
(
"Forwarding to outer IUnknown
\n
"
);
return
IUnknown_QueryInterface
(
This
->
outer_unknown
,
riid
,
object
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_device_AddRef
(
ID3D10Device
*
iface
)
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
TRACE
(
"Forwarding to outer IUnknown
\n
"
);
return
IUnknown_AddRef
(
This
->
outer_unknown
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_device_Release
(
ID3D10Device
*
iface
)
{
struct
d3d10_device
*
This
=
(
struct
d3d10_device
*
)
iface
;
TRACE
(
"Forwarding to outer IUnknown
\n
"
);
return
IUnknown_Release
(
This
->
outer_unknown
);
}
/* ID3D10Device methods */
static
void
STDMETHODCALLTYPE
d3d10_device_VSSetConstantBuffers
(
ID3D10Device
*
iface
,
...
...
@@ -845,3 +875,11 @@ const struct ID3D10DeviceVtbl d3d10_device_vtbl =
d3d10_device_SetTextFilterSize
,
d3d10_device_GetTextFilterSize
,
};
const
struct
IUnknownVtbl
d3d10_device_inner_unkown_vtbl
=
{
/* IUnknown methods */
d3d10_device_inner_QueryInterface
,
d3d10_device_inner_AddRef
,
d3d10_device_inner_Release
,
};
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