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
17ad42fc
Commit
17ad42fc
authored
Oct 06, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Oct 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core/tests: Check that private data is shared between d3d10 and d3d11 interfaces.
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
parent
d8a6972b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
device.c
dlls/d3d10core/tests/device.c
+33
-0
No files found.
dlls/d3d10core/tests/device.c
View file @
17ad42fc
...
@@ -2945,6 +2945,8 @@ static void test_private_data(void)
...
@@ -2945,6 +2945,8 @@ static void test_private_data(void)
{
{
D3D10_TEXTURE2D_DESC
texture_desc
;
D3D10_TEXTURE2D_DESC
texture_desc
;
ULONG
refcount
,
expected_refcount
;
ULONG
refcount
,
expected_refcount
;
ID3D11Texture2D
*
d3d11_texture
;
ID3D11Device
*
d3d11_device
;
ID3D10Device
*
test_object
;
ID3D10Device
*
test_object
;
ID3D10Texture2D
*
texture
;
ID3D10Texture2D
*
texture
;
IDXGIDevice
*
dxgi_device
;
IDXGIDevice
*
dxgi_device
;
...
@@ -3065,6 +3067,23 @@ static void test_private_data(void)
...
@@ -3065,6 +3067,23 @@ static void test_private_data(void)
IUnknown_Release
(
ptr
);
IUnknown_Release
(
ptr
);
--
expected_refcount
;
--
expected_refcount
;
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_ID3D11Device
,
(
void
**
)
&
d3d11_device
);
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
"Device should implement ID3D11Device.
\n
"
);
if
(
SUCCEEDED
(
hr
))
{
ptr
=
NULL
;
size
=
sizeof
(
ptr
);
hr
=
ID3D11Device_GetPrivateData
(
d3d11_device
,
&
test_guid
,
&
size
,
&
ptr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
ptr
==
(
IUnknown
*
)
test_object
,
"Got unexpected ptr %p, expected %p.
\n
"
,
ptr
,
test_object
);
IUnknown_Release
(
ptr
);
ID3D11Device_Release
(
d3d11_device
);
refcount
=
get_refcount
((
IUnknown
*
)
test_object
);
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
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
);
...
@@ -3102,6 +3121,20 @@ static void test_private_data(void)
...
@@ -3102,6 +3121,20 @@ static void test_private_data(void)
ok
(
ptr
==
(
IUnknown
*
)
test_object
,
"Got unexpected ptr %p, expected %p.
\n
"
,
ptr
,
test_object
);
ok
(
ptr
==
(
IUnknown
*
)
test_object
,
"Got unexpected ptr %p, expected %p.
\n
"
,
ptr
,
test_object
);
IUnknown_Release
(
ptr
);
IUnknown_Release
(
ptr
);
hr
=
ID3D10Texture2D_QueryInterface
(
texture
,
&
IID_ID3D11Texture2D
,
(
void
**
)
&
d3d11_texture
);
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
"Texture should implement ID3D11Texture2D.
\n
"
);
if
(
SUCCEEDED
(
hr
))
{
ptr
=
NULL
;
size
=
sizeof
(
ptr
);
hr
=
ID3D11Texture2D_GetPrivateData
(
d3d11_texture
,
&
test_guid
,
&
size
,
&
ptr
);
ok
(
hr
==
S_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
ptr
==
(
IUnknown
*
)
test_object
,
"Got unexpected ptr %p, expected %p.
\n
"
,
ptr
,
test_object
);
IUnknown_Release
(
ptr
);
ID3D11Texture2D_Release
(
d3d11_texture
);
}
IDXGISurface_Release
(
surface
);
IDXGISurface_Release
(
surface
);
ID3D10Texture2D_Release
(
texture
);
ID3D10Texture2D_Release
(
texture
);
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