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
4acb858f
Commit
4acb858f
authored
Dec 09, 2022
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Use test contexts in test_effect_preshader_ops().
parent
e39e9043
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
effect.c
dlls/d3dx9_36/tests/effect.c
+13
-9
No files found.
dlls/d3dx9_36/tests/effect.c
View file @
4acb858f
...
...
@@ -5030,40 +5030,44 @@ static void test_effect_preshader_ops(IDirect3DDevice9 *device)
hr
=
D3DXCreateEffect
(
device
,
test_effect_preshader_ops_blob
,
sizeof
(
test_effect_preshader_ops_blob
),
NULL
,
NULL
,
0
,
NULL
,
&
effect
,
NULL
);
ok
(
hr
==
D3D_OK
,
"
Got result
%#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected hr
%#lx.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
Begin
(
effect
,
&
passes_count
,
0
);
ok
(
hr
==
D3D_OK
,
"
Got result
%#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected hr
%#lx.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
BeginPass
(
effect
,
0
);
ok
(
hr
==
D3D_OK
,
"
Got result
%#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected hr
%#lx.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
op_tests
);
++
i
)
{
const
float
*
result
=
op_tests
[
i
].
result
;
const
float
*
expected_float
=
(
float
*
)
op_tests
[
i
].
expected_result
;
winetest_push_context
(
"Test %u"
,
i
);
hr
=
effect
->
lpVtbl
->
SetVector
(
effect
,
"opvect1"
,
&
op_tests
[
i
].
opvect1
);
ok
(
hr
==
D3D_OK
,
"
SetVector failed,
hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected
hr %#lx.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
SetVector
(
effect
,
"opvect2"
,
&
op_tests
[
i
].
opvect2
);
ok
(
hr
==
D3D_OK
,
"
SetVector failed,
hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected
hr %#lx.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
SetVector
(
effect
,
"opvect3"
,
&
op_tests
[
i
].
opvect3
);
ok
(
hr
==
D3D_OK
,
"
SetVector failed,
hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected
hr %#lx.
\n
"
,
hr
);
hr
=
effect
->
lpVtbl
->
CommitChanges
(
effect
);
ok
(
hr
==
D3D_OK
,
"
Got result
%#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected hr
%#lx.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_GetLight
(
device
,
op_tests
[
i
].
result_index
,
&
light
);
ok
(
hr
==
D3D_OK
,
"
Got result
%#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected hr
%#lx.
\n
"
,
hr
);
for
(
j
=
0
;
j
<
4
;
++
j
)
{
winetest_push_context
(
"Light %u"
,
j
);
todo_wine_if
(
op_tests
[
i
].
todo
[
j
])
ok
(
compare_float
(
result
[
j
],
expected_float
[
j
],
op_tests
[
i
].
ulps
),
"Operation %s, component %u, expected %#x (%.8e), got %#x (%.8e).
\n
"
,
op_tests
[
i
].
mnem
,
j
,
op_tests
[
i
].
expected_result
[
j
],
expected_float
[
j
],
((
unsigned
int
*
)
result
)[
j
],
result
[
j
]);
winetest_pop_context
();
}
winetest_pop_context
();
}
hr
=
effect
->
lpVtbl
->
End
(
effect
);
ok
(
hr
==
D3D_OK
,
"
Got result
%#lx.
\n
"
,
hr
);
ok
(
hr
==
D3D_OK
,
"
Unexpected hr
%#lx.
\n
"
,
hr
);
effect
->
lpVtbl
->
Release
(
effect
);
}
...
...
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