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
34f4c407
Commit
34f4c407
authored
Feb 23, 2015
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core: Implement d3d10_device_GetPrivateData().
parent
7f7844a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
20 deletions
+27
-20
device.c
dlls/d3d10core/device.c
+10
-2
device.c
dlls/d3d10core/tests/device.c
+17
-18
No files found.
dlls/d3d10core/device.c
View file @
34f4c407
...
@@ -1275,10 +1275,18 @@ static UINT STDMETHODCALLTYPE d3d10_device_GetExceptionMode(ID3D10Device1 *iface
...
@@ -1275,10 +1275,18 @@ static UINT STDMETHODCALLTYPE d3d10_device_GetExceptionMode(ID3D10Device1 *iface
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_GetPrivateData
(
ID3D10Device1
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_GetPrivateData
(
ID3D10Device1
*
iface
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
{
{
FIXME
(
"iface %p, guid %s, data_size %p, data %p stub!
\n
"
,
IDXGIDevice
*
dxgi_device
;
HRESULT
hr
;
TRACE
(
"iface %p, guid %s, data_size %p, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
E_NOTIMPL
;
if
(
FAILED
(
hr
=
ID3D10Device1_QueryInterface
(
iface
,
&
IID_IDXGIDevice
,
(
void
**
)
&
dxgi_device
)))
return
hr
;
hr
=
IDXGIDevice_GetPrivateData
(
dxgi_device
,
guid
,
data_size
,
data
);
IDXGIDevice_Release
(
dxgi_device
);
return
hr
;
}
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_SetPrivateData
(
ID3D10Device1
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d10_device_SetPrivateData
(
ID3D10Device1
*
iface
,
...
...
dlls/d3d10core/tests/device.c
View file @
34f4c407
...
@@ -2562,9 +2562,9 @@ static void test_private_data(void)
...
@@ -2562,9 +2562,9 @@ static void test_private_data(void)
size
=
sizeof
(
ptr
)
*
2
;
size
=
sizeof
(
ptr
)
*
2
;
ptr
=
(
IUnknown
*
)
0xdeadbeef
;
ptr
=
(
IUnknown
*
)
0xdeadbeef
;
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
&
ptr
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
&
ptr
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
!
ptr
,
"Got unexpected pointer %p.
\n
"
,
ptr
);
ok
(
!
ptr
,
"Got unexpected pointer %p.
\n
"
,
ptr
);
todo_wine
ok
(
size
==
sizeof
(
IUnknown
*
),
"Got unexpected size %u.
\n
"
,
size
);
ok
(
size
==
sizeof
(
IUnknown
*
),
"Got unexpected size %u.
\n
"
,
size
);
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IDXGIDevice
,
(
void
**
)
&
dxgi_device
);
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IDXGIDevice
,
(
void
**
)
&
dxgi_device
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get DXGI device, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to get DXGI device, hr %#x.
\n
"
,
hr
);
...
@@ -2615,41 +2615,40 @@ static void test_private_data(void)
...
@@ -2615,41 +2615,40 @@ static void test_private_data(void)
size
=
2
*
sizeof
(
ptr
);
size
=
2
*
sizeof
(
ptr
);
ptr
=
NULL
;
ptr
=
NULL
;
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
&
ptr
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
&
ptr
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
size
==
sizeof
(
test_object
),
"Got unexpected size %u.
\n
"
,
size
);
ok
(
size
==
sizeof
(
test_object
),
"Got unexpected size %u.
\n
"
,
size
);
++
expected_refcount
;
++
expected_refcount
;
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
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
);
if
(
ptr
)
IUnknown_Release
(
ptr
);
IUnknown_Release
(
ptr
);
--
expected_refcount
;
--
expected_refcount
;
ptr
=
(
IUnknown
*
)
0xdeadbeef
;
ptr
=
(
IUnknown
*
)
0xdeadbeef
;
size
=
1
;
size
=
1
;
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
NULL
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
size
==
sizeof
(
device
),
"Got unexpected size %u.
\n
"
,
size
);
ok
(
size
==
sizeof
(
device
),
"Got unexpected size %u.
\n
"
,
size
);
size
=
2
*
sizeof
(
ptr
);
size
=
2
*
sizeof
(
ptr
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
NULL
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
size
==
sizeof
(
device
),
"Got unexpected size %u.
\n
"
,
size
);
ok
(
size
==
sizeof
(
device
),
"Got unexpected size %u.
\n
"
,
size
);
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
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
;
size
=
1
;
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
&
ptr
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
&
size
,
&
ptr
);
todo_wine
ok
(
hr
==
DXGI_ERROR_MORE_DATA
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DXGI_ERROR_MORE_DATA
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
size
==
sizeof
(
device
),
"Got unexpected size %u.
\n
"
,
size
);
ok
(
size
==
sizeof
(
device
),
"Got unexpected size %u.
\n
"
,
size
);
ok
(
ptr
==
(
IUnknown
*
)
0xdeadbeef
,
"Got unexpected pointer %p.
\n
"
,
ptr
);
ok
(
ptr
==
(
IUnknown
*
)
0xdeadbeef
,
"Got unexpected pointer %p.
\n
"
,
ptr
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid2
,
NULL
,
NULL
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid2
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
size
=
0xdeadbabe
;
size
=
0xdeadbabe
;
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid2
,
&
size
,
&
ptr
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid2
,
&
size
,
&
ptr
);
todo_wine
ok
(
hr
==
DXGI_ERROR_NOT_FOUND
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
DXGI_ERROR_NOT_FOUND
,
"Got unexpected hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
size
==
0
,
"Got unexpected size %u.
\n
"
,
size
);
ok
(
size
==
0
,
"Got unexpected size %u.
\n
"
,
size
);
ok
(
ptr
==
(
IUnknown
*
)
0xdeadbeef
,
"Got unexpected pointer %p.
\n
"
,
ptr
);
ok
(
ptr
==
(
IUnknown
*
)
0xdeadbeef
,
"Got unexpected pointer %p.
\n
"
,
ptr
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
NULL
,
&
ptr
);
hr
=
ID3D10Device_GetPrivateData
(
device
,
&
test_guid
,
NULL
,
&
ptr
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
ptr
==
(
IUnknown
*
)
0xdeadbeef
,
"Got unexpected pointer %p.
\n
"
,
ptr
);
ok
(
ptr
==
(
IUnknown
*
)
0xdeadbeef
,
"Got unexpected pointer %p.
\n
"
,
ptr
);
refcount
=
ID3D10Device_Release
(
device
);
refcount
=
ID3D10Device_Release
(
device
);
...
...
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