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
66b2d96a
Commit
66b2d96a
authored
Aug 24, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Aug 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core/tests: Add test for device feature level.
parent
9af58dc1
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 @
66b2d96a
...
...
@@ -19,6 +19,7 @@
#define COBJMACROS
#include "initguid.h"
#include "d3d10.h"
#include "d3d11.h"
#include "wine/test.h"
#include <limits.h>
...
...
@@ -171,6 +172,37 @@ static IDXGISwapChain *create_swapchain(ID3D10Device *device, HWND window, BOOL
return
swapchain
;
}
static
void
test_feature_level
(
void
)
{
D3D_FEATURE_LEVEL
feature_level
;
ID3D11Device
*
device11
;
ID3D10Device
*
device10
;
HRESULT
hr
;
if
(
!
(
device10
=
create_device
()))
{
skip
(
"Failed to create device, skipping tests.
\n
"
);
return
;
}
hr
=
ID3D10Device_QueryInterface
(
device10
,
&
IID_ID3D11Device
,
(
void
**
)
&
device11
);
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
"Failed to query ID3D11Device interface, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
skip
(
"D3D11 is not available.
\n
"
);
ID3D10Device_Release
(
device10
);
return
;
}
/* Device was created by D3D10CreateDevice. */
feature_level
=
ID3D11Device_GetFeatureLevel
(
device11
);
ok
(
feature_level
==
D3D_FEATURE_LEVEL_10_0
,
"Got unexpected feature level %#x.
\n
"
,
feature_level
);
ID3D11Device_Release
(
device11
);
ID3D10Device_Release
(
device10
);
}
static
void
test_create_texture2d
(
void
)
{
ULONG
refcount
,
expected_refcount
;
...
...
@@ -3432,6 +3464,7 @@ static void test_update_subresource(void)
START_TEST
(
device
)
{
test_feature_level
();
test_create_texture2d
();
test_create_texture3d
();
test_create_depthstencil_view
();
...
...
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