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
2190f026
Commit
2190f026
authored
Feb 12, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Implement dxgi_device_SetPrivateDataInterface().
parent
4e93a02a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
13 deletions
+33
-13
device.c
dlls/dxgi/device.c
+4
-2
dxgi_private.h
dlls/dxgi/dxgi_private.h
+2
-0
device.c
dlls/dxgi/tests/device.c
+11
-11
utils.c
dlls/dxgi/utils.c
+16
-0
No files found.
dlls/dxgi/device.c
View file @
2190f026
...
...
@@ -106,9 +106,11 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_SetPrivateData(IWineDXGIDevice *ifa
static
HRESULT
STDMETHODCALLTYPE
dxgi_device_SetPrivateDataInterface
(
IWineDXGIDevice
*
iface
,
REFGUID
guid
,
const
IUnknown
*
object
)
{
FIXME
(
"iface %p, guid %s, object %p stub!
\n
"
,
iface
,
debugstr_guid
(
guid
),
object
);
struct
dxgi_device
*
device
=
impl_from_IWineDXGIDevice
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, guid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
object
);
return
dxgi_set_private_data_interface
(
&
device
->
private_store
,
guid
,
object
);
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_device_GetPrivateData
(
IWineDXGIDevice
*
iface
,
...
...
dlls/dxgi/dxgi_private.h
View file @
2190f026
...
...
@@ -78,6 +78,8 @@ DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id format) DECLSP
enum
wined3d_format_id
wined3dformat_from_dxgi_format
(
DXGI_FORMAT
format
)
DECLSPEC_HIDDEN
;
HRESULT
dxgi_set_private_data
(
struct
wined3d_private_store
*
store
,
REFGUID
guid
,
UINT
data_size
,
const
void
*
data
)
DECLSPEC_HIDDEN
;
HRESULT
dxgi_set_private_data_interface
(
struct
wined3d_private_store
*
store
,
REFGUID
guid
,
const
IUnknown
*
object
)
DECLSPEC_HIDDEN
;
/* IDXGIFactory */
struct
dxgi_factory
...
...
dlls/dxgi/tests/device.c
View file @
2190f026
...
...
@@ -623,14 +623,14 @@ static void test_private_data(void)
hr
=
IDXGIDevice_SetPrivateData
(
device
,
&
dxgi_private_data_test_guid
,
0
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDXGIDevice_SetPrivateDataInterface
(
device
,
&
dxgi_private_data_test_guid
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDXGIDevice_SetPrivateData
(
device
,
&
dxgi_private_data_test_guid
,
~
0U
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDXGIDevice_SetPrivateData
(
device
,
&
dxgi_private_data_test_guid
,
~
0U
,
NULL
);
ok
(
hr
==
S_FALSE
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDXGIDevice_SetPrivateDataInterface
(
device
,
&
dxgi_private_data_test_guid
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
size
=
sizeof
(
ptr
)
*
2
;
ptr
=
(
IUnknown
*
)
0xdeadbeef
;
hr
=
IDXGIDevice_GetPrivateData
(
device
,
&
dxgi_private_data_test_guid
,
&
size
,
&
ptr
);
...
...
@@ -641,25 +641,25 @@ static void test_private_data(void)
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
hr
=
IDXGIDevice_SetPrivateDataInterface
(
device
,
&
dxgi_private_data_test_guid
,
(
IUnknown
*
)
test_object
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
expected_refcount
=
refcount
+
1
;
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
todo_wine
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
hr
=
IDXGIDevice_SetPrivateDataInterface
(
device
,
&
dxgi_private_data_test_guid
,
(
IUnknown
*
)
test_object
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
todo_wine
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
hr
=
IDXGIDevice_SetPrivateDataInterface
(
device
,
&
dxgi_private_data_test_guid
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
expected_refcount
--
;
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
hr
=
IDXGIDevice_SetPrivateDataInterface
(
device
,
&
dxgi_private_data_test_guid
,
(
IUnknown
*
)
test_object
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
size
=
sizeof
(
data
);
hr
=
IDXGIDevice_SetPrivateData
(
device
,
&
dxgi_private_data_test_guid
,
size
,
data
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
...
...
@@ -672,7 +672,7 @@ static void test_private_data(void)
hr
=
IDXGIDevice_SetPrivateDataInterface
(
device
,
&
dxgi_private_data_test_guid
,
(
IUnknown
*
)
test_object
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
expected_refcount
++
;
size
=
2
*
sizeof
(
ptr
);
ptr
=
NULL
;
...
...
@@ -696,7 +696,7 @@ static void test_private_data(void)
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
size
==
sizeof
(
device
),
"Got unexpected size %u.
\n
"
,
size
);
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
todo_wine
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
size
=
1
;
hr
=
IDXGIDevice_GetPrivateData
(
device
,
&
dxgi_private_data_test_guid
,
&
size
,
&
ptr
);
...
...
dlls/dxgi/utils.c
View file @
2190f026
...
...
@@ -352,3 +352,19 @@ HRESULT dxgi_set_private_data(struct wined3d_private_store *store,
return
hr
;
}
HRESULT
dxgi_set_private_data_interface
(
struct
wined3d_private_store
*
store
,
REFGUID
guid
,
const
IUnknown
*
object
)
{
HRESULT
hr
;
if
(
!
object
)
return
dxgi_set_private_data
(
store
,
guid
,
sizeof
(
object
),
&
object
);
EnterCriticalSection
(
&
dxgi_cs
);
hr
=
wined3d_private_store_set_private_data
(
store
,
guid
,
object
,
sizeof
(
object
),
WINED3DSPD_IUNKNOWN
);
LeaveCriticalSection
(
&
dxgi_cs
);
return
hr
;
}
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