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
28510c73
Commit
28510c73
authored
Feb 12, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Implement ID3D10Multithread.
parent
8b7c4e3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
1 deletion
+82
-1
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-0
device.c
dlls/d3d10core/device.c
+77
-1
device.c
dlls/dxgi/tests/device.c
+4
-0
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
28510c73
...
...
@@ -290,6 +290,7 @@ struct d3d10_device
{
IUnknown
IUnknown_inner
;
ID3D10Device1
ID3D10Device1_iface
;
ID3D10Multithread
ID3D10Multithread_iface
;
IWineDXGIDeviceParent
IWineDXGIDeviceParent_iface
;
IUnknown
*
outer_unk
;
LONG
refcount
;
...
...
dlls/d3d10core/device.c
View file @
28510c73
...
...
@@ -50,6 +50,10 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_inner_QueryInterface(IUnknown *ifa
{
*
out
=
&
device
->
ID3D10Device1_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_ID3D10Multithread
))
{
*
out
=
&
device
->
ID3D10Multithread_iface
;
}
else
if
(
IsEqualGUID
(
riid
,
&
IID_IWineDXGIDeviceParent
))
{
*
out
=
&
device
->
IWineDXGIDeviceParent_iface
;
...
...
@@ -1791,6 +1795,77 @@ static const struct IUnknownVtbl d3d10_device_inner_unknown_vtbl =
d3d10_device_inner_Release
,
};
static
inline
struct
d3d10_device
*
impl_from_ID3D10Multithread
(
ID3D10Multithread
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d10_device
,
ID3D10Multithread_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_multithread_QueryInterface
(
ID3D10Multithread
*
iface
,
REFIID
iid
,
void
**
out
)
{
struct
d3d10_device
*
device
=
impl_from_ID3D10Multithread
(
iface
);
TRACE
(
"iface %p, iid %s, out %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
out
);
return
IUnknown_QueryInterface
(
device
->
outer_unk
,
iid
,
out
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_multithread_AddRef
(
ID3D10Multithread
*
iface
)
{
struct
d3d10_device
*
device
=
impl_from_ID3D10Multithread
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IUnknown_AddRef
(
device
->
outer_unk
);
}
static
ULONG
STDMETHODCALLTYPE
d3d10_multithread_Release
(
ID3D10Multithread
*
iface
)
{
struct
d3d10_device
*
device
=
impl_from_ID3D10Multithread
(
iface
);
TRACE
(
"iface %p.
\n
"
,
iface
);
return
IUnknown_Release
(
device
->
outer_unk
);
}
static
void
STDMETHODCALLTYPE
d3d10_multithread_Enter
(
ID3D10Multithread
*
iface
)
{
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_lock
();
}
static
void
STDMETHODCALLTYPE
d3d10_multithread_Leave
(
ID3D10Multithread
*
iface
)
{
TRACE
(
"iface %p.
\n
"
,
iface
);
wined3d_mutex_unlock
();
}
static
BOOL
STDMETHODCALLTYPE
d3d10_multithread_SetMultithreadProtected
(
ID3D10Multithread
*
iface
,
BOOL
protect
)
{
FIXME
(
"iface %p, protect %#x stub!
\n
"
,
iface
,
protect
);
return
TRUE
;
}
static
BOOL
STDMETHODCALLTYPE
d3d10_multithread_GetMultithreadProtected
(
ID3D10Multithread
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
TRUE
;
}
static
const
struct
ID3D10MultithreadVtbl
d3d10_multithread_vtbl
=
{
d3d10_multithread_QueryInterface
,
d3d10_multithread_AddRef
,
d3d10_multithread_Release
,
d3d10_multithread_Enter
,
d3d10_multithread_Leave
,
d3d10_multithread_SetMultithreadProtected
,
d3d10_multithread_GetMultithreadProtected
,
};
static
void
STDMETHODCALLTYPE
d3d10_subresource_destroyed
(
void
*
parent
)
{}
static
const
struct
wined3d_parent_ops
d3d10_subresource_parent_ops
=
...
...
@@ -2048,8 +2123,9 @@ static const struct wine_rb_functions d3d10_rasterizer_state_rb_ops =
HRESULT
d3d10_device_init
(
struct
d3d10_device
*
device
,
void
*
outer_unknown
)
{
device
->
ID3D10Device1_iface
.
lpVtbl
=
&
d3d10_device1_vtbl
;
device
->
IUnknown_inner
.
lpVtbl
=
&
d3d10_device_inner_unknown_vtbl
;
device
->
ID3D10Device1_iface
.
lpVtbl
=
&
d3d10_device1_vtbl
;
device
->
ID3D10Multithread_iface
.
lpVtbl
=
&
d3d10_multithread_vtbl
;
device
->
IWineDXGIDeviceParent_iface
.
lpVtbl
=
&
d3d10_dxgi_device_parent_vtbl
;
device
->
device_parent
.
ops
=
&
d3d10_wined3d_device_parent_ops
;
device
->
refcount
=
1
;
...
...
dlls/dxgi/tests/device.c
View file @
28510c73
...
...
@@ -75,6 +75,10 @@ static void test_device_interfaces(void)
ok
(
SUCCEEDED
(
hr
),
"Failed to query ID3D10Device interface, hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
iface
);
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_ID3D10Multithread
,
(
void
**
)
&
iface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to query ID3D10Multithread interface, hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
iface
);
if
(
SUCCEEDED
(
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_ID3D10Device1
,
(
void
**
)
&
iface
)))
IUnknown_Release
(
iface
);
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
...
...
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