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
8e9f0af2
Commit
8e9f0af2
authored
Jan 02, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core/tests: Add a small test for ID3D10Device_CreateRasterizerState().
parent
5d386622
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
device.c
dlls/d3d10core/tests/device.c
+44
-0
No files found.
dlls/d3d10core/tests/device.c
View file @
8e9f0af2
...
...
@@ -719,6 +719,49 @@ static void test_create_depthstencil_state(void)
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
}
static
void
test_create_rasterizer_state
(
void
)
{
ID3D10RasterizerState
*
rast_state1
,
*
rast_state2
;
D3D10_RASTERIZER_DESC
rast_desc
;
ID3D10Device
*
device
;
ULONG
refcount
;
HRESULT
hr
;
if
(
!
(
device
=
create_device
()))
{
skip
(
"Failed to create device, skipping tests.
\n
"
);
return
;
}
hr
=
ID3D10Device_CreateRasterizerState
(
device
,
NULL
,
&
rast_state1
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
rast_desc
.
FillMode
=
D3D10_FILL_SOLID
;
rast_desc
.
CullMode
=
D3D10_CULL_BACK
;
rast_desc
.
FrontCounterClockwise
=
FALSE
;
rast_desc
.
DepthBias
=
0
;
rast_desc
.
DepthBiasClamp
=
0
.
0
f
;
rast_desc
.
SlopeScaledDepthBias
=
0
.
0
f
;
rast_desc
.
DepthClipEnable
=
TRUE
;
rast_desc
.
ScissorEnable
=
FALSE
;
rast_desc
.
MultisampleEnable
=
FALSE
;
rast_desc
.
AntialiasedLineEnable
=
FALSE
;
hr
=
ID3D10Device_CreateRasterizerState
(
device
,
&
rast_desc
,
&
rast_state1
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create rasterizer state, hr %#x.
\n
"
,
hr
);
hr
=
ID3D10Device_CreateRasterizerState
(
device
,
&
rast_desc
,
&
rast_state2
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create rasterizer state, hr %#x.
\n
"
,
hr
);
ok
(
rast_state1
==
rast_state2
,
"Got different rasterizer state objects.
\n
"
);
refcount
=
ID3D10RasterizerState_Release
(
rast_state2
);
ok
(
refcount
==
1
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
refcount
=
ID3D10RasterizerState_Release
(
rast_state1
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
refcount
=
ID3D10Device_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
}
START_TEST
(
device
)
{
test_device_interfaces
();
...
...
@@ -731,4 +774,5 @@ START_TEST(device)
test_create_sampler_state
();
test_create_blend_state
();
test_create_depthstencil_state
();
test_create_rasterizer_state
();
}
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