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
3cd98e15
Commit
3cd98e15
authored
Dec 12, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Dec 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10core/tests: Add a small test for ID3D10Device_CreateBlendState().
parent
525e3da0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
0 deletions
+57
-0
device.c
dlls/d3d10core/tests/device.c
+57
-0
No files found.
dlls/d3d10core/tests/device.c
View file @
3cd98e15
...
...
@@ -616,6 +616,62 @@ static void test_create_sampler_state(void)
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
}
static
void
test_create_blend_state
(
void
)
{
ID3D10BlendState
*
blend_state1
,
*
blend_state2
;
D3D10_BLEND_DESC
blend_desc
;
ID3D10Device
*
device
;
ULONG
refcount
;
HRESULT
hr
;
if
(
!
(
device
=
create_device
()))
{
skip
(
"Failed to create device, skipping tests.
\n
"
);
return
;
}
hr
=
ID3D10Device_CreateBlendState
(
device
,
NULL
,
&
blend_state1
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
blend_desc
.
AlphaToCoverageEnable
=
FALSE
;
blend_desc
.
BlendEnable
[
0
]
=
FALSE
;
blend_desc
.
BlendEnable
[
1
]
=
FALSE
;
blend_desc
.
BlendEnable
[
2
]
=
FALSE
;
blend_desc
.
BlendEnable
[
3
]
=
FALSE
;
blend_desc
.
BlendEnable
[
4
]
=
FALSE
;
blend_desc
.
BlendEnable
[
5
]
=
FALSE
;
blend_desc
.
BlendEnable
[
6
]
=
FALSE
;
blend_desc
.
BlendEnable
[
7
]
=
FALSE
;
blend_desc
.
SrcBlend
=
D3D10_BLEND_ONE
;
blend_desc
.
DestBlend
=
D3D10_BLEND_ZERO
;
blend_desc
.
BlendOp
=
D3D10_BLEND_OP_ADD
;
blend_desc
.
SrcBlendAlpha
=
D3D10_BLEND_ONE
;
blend_desc
.
DestBlendAlpha
=
D3D10_BLEND_ZERO
;
blend_desc
.
BlendOpAlpha
=
D3D10_BLEND_OP_ADD
;
blend_desc
.
RenderTargetWriteMask
[
0
]
=
D3D10_COLOR_WRITE_ENABLE_ALL
;
blend_desc
.
RenderTargetWriteMask
[
1
]
=
D3D10_COLOR_WRITE_ENABLE_ALL
;
blend_desc
.
RenderTargetWriteMask
[
2
]
=
D3D10_COLOR_WRITE_ENABLE_ALL
;
blend_desc
.
RenderTargetWriteMask
[
3
]
=
D3D10_COLOR_WRITE_ENABLE_ALL
;
blend_desc
.
RenderTargetWriteMask
[
4
]
=
D3D10_COLOR_WRITE_ENABLE_ALL
;
blend_desc
.
RenderTargetWriteMask
[
5
]
=
D3D10_COLOR_WRITE_ENABLE_ALL
;
blend_desc
.
RenderTargetWriteMask
[
6
]
=
D3D10_COLOR_WRITE_ENABLE_ALL
;
blend_desc
.
RenderTargetWriteMask
[
7
]
=
D3D10_COLOR_WRITE_ENABLE_ALL
;
hr
=
ID3D10Device_CreateBlendState
(
device
,
&
blend_desc
,
&
blend_state1
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create blend state, hr %#x.
\n
"
,
hr
);
hr
=
ID3D10Device_CreateBlendState
(
device
,
&
blend_desc
,
&
blend_state2
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create blend state, hr %#x.
\n
"
,
hr
);
ok
(
blend_state1
==
blend_state2
,
"Got different blend state objects.
\n
"
);
refcount
=
ID3D10BlendState_Release
(
blend_state2
);
ok
(
refcount
==
1
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
refcount
=
ID3D10BlendState_Release
(
blend_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
();
...
...
@@ -626,4 +682,5 @@ START_TEST(device)
test_create_shader_resource_view
();
test_create_shader
();
test_create_sampler_state
();
test_create_blend_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