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
43bbdac1
Commit
43bbdac1
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
d3d11/tests: Check that shaders implement d3d10 interfaces.
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
parent
9ea00834
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
d3d11.c
dlls/d3d11/tests/d3d11.c
+26
-2
No files found.
dlls/d3d11/tests/d3d11.c
View file @
43bbdac1
...
...
@@ -1448,6 +1448,7 @@ static void test_create_shader(void)
ID3D11GeometryShader
*
gs
;
ID3D11VertexShader
*
vs
;
ID3D11PixelShader
*
ps
;
IUnknown
*
iface
;
unsigned
int
i
;
HRESULT
hr
;
...
...
@@ -1481,6 +1482,7 @@ static void test_create_shader(void)
expected_refcount
=
get_refcount
((
IUnknown
*
)
device
)
+
1
;
hr
=
ID3D11Device_CreateVertexShader
(
device
,
vs_4_0
,
sizeof
(
vs_4_0
),
NULL
,
&
vs
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create SM4 vertex shader, hr %#x, feature level %#x.
\n
"
,
hr
,
feature_level
);
refcount
=
get_refcount
((
IUnknown
*
)
device
);
ok
(
refcount
>=
expected_refcount
,
"Got unexpected refcount %u, expected >= %u.
\n
"
,
refcount
,
expected_refcount
);
...
...
@@ -1492,12 +1494,20 @@ static void test_create_shader(void)
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
ID3D11Device_Release
(
tmp
);
ID3D11VertexShader_Release
(
vs
);
hr
=
ID3D11VertexShader_QueryInterface
(
vs
,
&
IID_ID3D10VertexShader
,
(
void
**
)
&
iface
);
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
"Vertex shader should implement ID3D10VertexShader.
\n
"
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
iface
);
refcount
=
ID3D11VertexShader_Release
(
vs
);
ok
(
!
refcount
,
"Vertex shader has %u references left.
\n
"
,
refcount
);
/* pixel shader */
expected_refcount
=
get_refcount
((
IUnknown
*
)
device
)
+
1
;
hr
=
ID3D11Device_CreatePixelShader
(
device
,
ps_4_0
,
sizeof
(
ps_4_0
),
NULL
,
&
ps
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create SM4 vertex shader, hr %#x, feature level %#x.
\n
"
,
hr
,
feature_level
);
refcount
=
get_refcount
((
IUnknown
*
)
device
);
ok
(
refcount
>=
expected_refcount
,
"Got unexpected refcount %u, expected >= %u.
\n
"
,
refcount
,
expected_refcount
);
...
...
@@ -1509,12 +1519,20 @@ static void test_create_shader(void)
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
ID3D11Device_Release
(
tmp
);
ID3D11PixelShader_Release
(
ps
);
hr
=
ID3D11PixelShader_QueryInterface
(
ps
,
&
IID_ID3D10PixelShader
,
(
void
**
)
&
iface
);
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
"Pixel shader should implement ID3D10PixelShader.
\n
"
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
iface
);
refcount
=
ID3D11PixelShader_Release
(
ps
);
ok
(
!
refcount
,
"Pixel shader has %u references left.
\n
"
,
refcount
);
/* geometry shader */
expected_refcount
=
get_refcount
((
IUnknown
*
)
device
)
+
1
;
hr
=
ID3D11Device_CreateGeometryShader
(
device
,
gs_4_0
,
sizeof
(
gs_4_0
),
NULL
,
&
gs
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create SM4 geometry shader, hr %#x.
\n
"
,
hr
);
refcount
=
get_refcount
((
IUnknown
*
)
device
);
ok
(
refcount
>=
expected_refcount
,
"Got unexpected refcount %u, expected >= %u.
\n
"
,
refcount
,
expected_refcount
);
...
...
@@ -1526,6 +1544,12 @@ static void test_create_shader(void)
ok
(
refcount
==
expected_refcount
,
"Got unexpected refcount %u, expected %u.
\n
"
,
refcount
,
expected_refcount
);
ID3D11Device_Release
(
tmp
);
hr
=
ID3D11GeometryShader_QueryInterface
(
gs
,
&
IID_ID3D10GeometryShader
,
(
void
**
)
&
iface
);
ok
(
SUCCEEDED
(
hr
)
||
broken
(
hr
==
E_NOINTERFACE
)
/* Not available on all Windows versions. */
,
"Geometry shader should implement ID3D10GeometryShader.
\n
"
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
iface
);
refcount
=
ID3D11GeometryShader_Release
(
gs
);
ok
(
!
refcount
,
"Geometry shader 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