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
2be432b4
Commit
2be432b4
authored
Feb 11, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Feb 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi/tests: Also test for ID3D10Device1 and ID3D11Device in test_device_interfaces().
parent
e806b5ba
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
97 deletions
+24
-97
device.c
dlls/d3d10/tests/device.c
+0
-49
device.c
dlls/d3d10core/tests/device.c
+0
-34
device.c
dlls/dxgi/tests/device.c
+24
-14
No files found.
dlls/d3d10/tests/device.c
View file @
2be432b4
...
...
@@ -21,54 +21,6 @@
#include "d3d10.h"
#include "wine/test.h"
static
ID3D10Device
*
create_device
(
void
)
{
ID3D10Device
*
device
;
if
(
SUCCEEDED
(
D3D10CreateDevice
(
NULL
,
D3D10_DRIVER_TYPE_HARDWARE
,
NULL
,
0
,
D3D10_SDK_VERSION
,
&
device
)))
return
device
;
if
(
SUCCEEDED
(
D3D10CreateDevice
(
NULL
,
D3D10_DRIVER_TYPE_WARP
,
NULL
,
0
,
D3D10_SDK_VERSION
,
&
device
)))
return
device
;
if
(
SUCCEEDED
(
D3D10CreateDevice
(
NULL
,
D3D10_DRIVER_TYPE_REFERENCE
,
NULL
,
0
,
D3D10_SDK_VERSION
,
&
device
)))
return
device
;
return
NULL
;
}
static
void
test_device_interfaces
(
void
)
{
ID3D10Device
*
device
;
ULONG
refcount
;
IUnknown
*
obj
;
HRESULT
hr
;
device
=
create_device
();
if
(
!
device
)
{
skip
(
"Failed to create device, skipping tests
\n
"
);
return
;
}
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IUnknown
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IUnknown (%#x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_ID3D10Device
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement ID3D10Device (%#x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IDXGIObject
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IDXGIObject (%#x)
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IDXGIDevice
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IDXGIDevice (%#x)
\n
"
,
hr
);
refcount
=
ID3D10Device_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
static
void
test_stateblock_mask
(
void
)
{
static
const
struct
...
...
@@ -229,6 +181,5 @@ static void test_stateblock_mask(void)
START_TEST
(
device
)
{
test_device_interfaces
();
test_stateblock_mask
();
}
dlls/d3d10core/tests/device.c
View file @
2be432b4
...
...
@@ -35,39 +35,6 @@ static ID3D10Device *create_device(void)
return
NULL
;
}
static
void
test_device_interfaces
(
void
)
{
ID3D10Device
*
device
;
ULONG
refcount
;
IUnknown
*
obj
;
HRESULT
hr
;
if
(
!
(
device
=
create_device
()))
{
skip
(
"Failed to create device, skipping tests.
\n
"
);
return
;
}
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IUnknown
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IUnknown
\n
"
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IDXGIObject
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IDXGIObject
\n
"
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IDXGIDevice
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IDXGIDevice
\n
"
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_ID3D10Device
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement ID3D10Device
\n
"
);
refcount
=
ID3D10Device_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
static
void
test_create_texture2d
(
void
)
{
D3D10_TEXTURE2D_DESC
desc
;
...
...
@@ -761,7 +728,6 @@ static void test_create_predicate(void)
START_TEST
(
device
)
{
test_device_interfaces
();
test_create_texture2d
();
test_create_texture3d
();
test_create_depthstencil_view
();
...
...
dlls/dxgi/tests/device.c
View file @
2be432b4
...
...
@@ -18,7 +18,7 @@
#define COBJMACROS
#include "initguid.h"
#include "d3d1
0
.h"
#include "d3d1
1
.h"
#include "wine/test.h"
static
HRESULT
(
WINAPI
*
pCreateDXGIFactory1
)(
REFIID
iid
,
void
**
factory
);
...
...
@@ -49,8 +49,8 @@ success:
static
void
test_device_interfaces
(
void
)
{
IDXGIDevice
*
device
;
IUnknown
*
iface
;
ULONG
refcount
;
IUnknown
*
obj
;
HRESULT
hr
;
if
(
!
(
device
=
create_device
()))
...
...
@@ -59,21 +59,31 @@ static void test_device_interfaces(void)
return
;
}
if
(
SUCCEEDED
(
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_IUnknown
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"IDXGIDevice does not implement IUnknown
\n
"
);
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_IUnknown
,
(
void
**
)
&
iface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to query IUnknown interface, hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
iface
);
if
(
SUCCEEDED
(
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_IDXGIObject
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"IDXGIDevice does not implement IDXGIObject
\n
"
);
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_IDXGIObject
,
(
void
**
)
&
iface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to query IDXGIObject interface, hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
iface
);
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_IDXGIDevice
,
(
void
**
)
&
iface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to query IDXGIDevice interface, hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
iface
);
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_ID3D10Device
,
(
void
**
)
&
iface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to query ID3D10Device interface, hr %#x.
\n
"
,
hr
);
IUnknown_Release
(
iface
);
if
(
SUCCEEDED
(
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_IDXGIDevice
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"IDXGIDevice does not implement IDXGIDevice
\n
"
);
if
(
SUCCEEDED
(
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_ID3D10Device1
,
(
void
**
)
&
iface
)))
IUnknown_Release
(
iface
);
todo_wine
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
"Failed to query ID3D10Device1 interface, hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_ID3D10Device
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"IDXGIDevice does not implement ID3D10Device
\n
"
);
if
(
SUCCEEDED
(
hr
=
IDXGIDevice_QueryInterface
(
device
,
&
IID_ID3D11Device
,
(
void
**
)
&
iface
)))
IUnknown_Release
(
iface
);
todo_wine
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
"Failed to query ID3D11Device interface, hr %#x.
\n
"
,
hr
);
refcount
=
IDXGIDevice_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
...
...
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