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
b67290b9
Commit
b67290b9
authored
Mar 21, 2008
by
Philip Nilsson
Committed by
Alexandre Julliard
Mar 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Test the D3DXVec*Array functions.
parent
0457333f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
205 additions
and
0 deletions
+205
-0
.gitignore
.gitignore
+4
-0
Makefile.in
Makefile.in
+2
-0
configure
configure
+3
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/Makefile.in
+1
-0
Makefile.in
dlls/d3dx9_36/tests/Makefile.in
+13
-0
math.c
dlls/d3dx9_36/tests/math.c
+177
-0
Makefile.in
programs/winetest/Makefile.in
+3
-0
winetest.rc
programs/winetest/winetest.rc
+1
-0
No files found.
.gitignore
View file @
b67290b9
...
...
@@ -93,6 +93,9 @@ dlls/d3dx8/tests/*.ok
dlls/d3dx8/tests/d3dx8_crosstest.exe
dlls/d3dx8/tests/testlist.c
dlls/d3dx9_36/libd3dx9.def
dlls/d3dx9_36/tests/*.ok
dlls/d3dx9_36/tests/d3dx9_36_crosstest.exe
dlls/d3dx9_36/tests/testlist.c
dlls/d3dxof/libd3dxof.def
dlls/dbghelp/libdbghelp.def
dlls/dciman32/libdciman32.def
...
...
@@ -611,6 +614,7 @@ programs/winetest/d3d8_test.exe
programs/winetest/d3d9_test.exe
programs/winetest/d3drm_test.exe
programs/winetest/d3dx8_test.exe
programs/winetest/d3dx9_36_test.exe
programs/winetest/ddraw_test.exe
programs/winetest/dinput_test.exe
programs/winetest/dnsapi_test.exe
...
...
Makefile.in
View file @
b67290b9
...
...
@@ -226,6 +226,7 @@ ALL_MAKEFILES = \
dlls/d3dx9_34/Makefile
\
dlls/d3dx9_35/Makefile
\
dlls/d3dx9_36/Makefile
\
dlls/d3dx9_36/tests/Makefile
\
dlls/d3dxof/Makefile
\
dlls/dbghelp/Makefile
\
dlls/dciman32/Makefile
\
...
...
@@ -646,6 +647,7 @@ dlls/d3dx9_33/Makefile: dlls/d3dx9_33/Makefile.in dlls/Makedll.rules
dlls/d3dx9_34/Makefile
:
dlls/d3dx9_34/Makefile.in dlls/Makedll.rules
dlls/d3dx9_35/Makefile
:
dlls/d3dx9_35/Makefile.in dlls/Makedll.rules
dlls/d3dx9_36/Makefile
:
dlls/d3dx9_36/Makefile.in dlls/Makedll.rules
dlls/d3dx9_36/tests/Makefile
:
dlls/d3dx9_36/tests/Makefile.in dlls/Maketest.rules
dlls/d3dxof/Makefile
:
dlls/d3dxof/Makefile.in dlls/Makedll.rules
dlls/dbghelp/Makefile
:
dlls/dbghelp/Makefile.in dlls/Makedll.rules
dlls/dciman32/Makefile
:
dlls/dciman32/Makefile.in dlls/Makedll.rules
...
...
configure
View file @
b67290b9
...
...
@@ -21403,6 +21403,8 @@ ac_config_files="$ac_config_files dlls/d3dx9_35/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/d3dx9_36/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/d3dx9_36/tests/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/d3dxof/Makefile"
ac_config_files
=
"
$ac_config_files
dlls/dbghelp/Makefile"
...
...
@@ -22719,6 +22721,7 @@ do
"dlls/d3dx9_34/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/d3dx9_34/Makefile" ;;
"dlls/d3dx9_35/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/d3dx9_35/Makefile" ;;
"dlls/d3dx9_36/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/d3dx9_36/Makefile" ;;
"dlls/d3dx9_36/tests/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/d3dx9_36/tests/Makefile" ;;
"dlls/d3dxof/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/d3dxof/Makefile" ;;
"dlls/dbghelp/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dbghelp/Makefile" ;;
"dlls/dciman32/Makefile") CONFIG_FILES="
$CONFIG_FILES
dlls/dciman32/Makefile" ;;
...
...
configure.ac
View file @
b67290b9
...
...
@@ -1732,6 +1732,7 @@ AC_CONFIG_FILES([dlls/d3dx9_33/Makefile])
AC_CONFIG_FILES([dlls/d3dx9_34/Makefile])
AC_CONFIG_FILES([dlls/d3dx9_35/Makefile])
AC_CONFIG_FILES([dlls/d3dx9_36/Makefile])
AC_CONFIG_FILES([dlls/d3dx9_36/tests/Makefile])
AC_CONFIG_FILES([dlls/d3dxof/Makefile])
AC_CONFIG_FILES([dlls/dbghelp/Makefile])
AC_CONFIG_FILES([dlls/dciman32/Makefile])
...
...
dlls/Makefile.in
View file @
b67290b9
...
...
@@ -296,6 +296,7 @@ TESTSUBDIRS = \
d3d9/tests
\
d3drm/tests
\
d3dx8/tests
\
d3dx9_36/tests
\
ddraw/tests
\
dinput/tests
\
dnsapi/tests
\
...
...
dlls/d3dx9_36/tests/Makefile.in
0 → 100644
View file @
b67290b9
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
d3dx9_36.dll
IMPORTS
=
d3dx9 kernel32
CTESTS
=
\
math.c
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
dlls/d3dx9_36/tests/math.c
0 → 100644
View file @
b67290b9
/*
* Copyright 2008 Philip Nilsson
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/test.h"
#include "d3dx9math.h"
#define ARRAY_SIZE 5
#define admitted_error 0.01f
#define relative_error(exp, out) ((exp == out) ? 0.0f : (fabs(out - exp) / fabs(exp)))
#define compare_vectors(exp, out) \
for (i = 0; i < ARRAY_SIZE + 2; ++i) { \
ok(relative_error(exp[i].x, out[i].x) < admitted_error && \
relative_error(exp[i].y, out[i].y) < admitted_error && \
relative_error(exp[i].z, out[i].z) < admitted_error && \
relative_error(exp[i].w, out[i].w) < admitted_error, \
"Got (%f, %f, %f, %f), expected (%f, %f, %f, %f) for index %d.\n", \
out[i].x, out[i].y, out[i].z, out[i].w, \
exp[i].x, exp[i].y, exp[i].z, exp[i].w, \
i); \
}
/* The mathematical properties are checked in the d3dx8 testsuite.
*
* These tests check:
* That the functions work.
* That the stride functionality works.
* That nothing is written where it should not be.
*
* These tests should check:
* That inp_vec is not modified.
* That the input and output arrays can be the same (MSDN
* says they can, and some testing with a native DLL
* says so too).
*/
static
void
test_D3DXVec_Array
(
void
)
{
unsigned
int
i
;
D3DVIEWPORT9
viewport
;
D3DXMATRIX
mat
,
projection
,
view
,
world
;
D3DXVECTOR4
inp_vec
[
ARRAY_SIZE
];
D3DXVECTOR4
out_vec
[
ARRAY_SIZE
+
2
];
D3DXVECTOR4
exp_vec
[
ARRAY_SIZE
+
2
];
viewport
.
Width
=
800
;
viewport
.
MinZ
=
0
.
2
f
;
viewport
.
X
=
10
;
viewport
.
Height
=
680
;
viewport
.
MaxZ
=
0
.
9
f
;
viewport
.
Y
=
5
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
+
2
;
++
i
)
{
out_vec
[
i
].
x
=
out_vec
[
i
].
y
=
out_vec
[
i
].
z
=
out_vec
[
i
].
w
=
0
.
0
f
;
exp_vec
[
i
].
x
=
exp_vec
[
i
].
y
=
exp_vec
[
i
].
z
=
exp_vec
[
i
].
w
=
0
.
0
f
;
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
;
++
i
)
{
inp_vec
[
i
].
x
=
inp_vec
[
i
].
z
=
i
;
inp_vec
[
i
].
y
=
inp_vec
[
i
].
w
=
ARRAY_SIZE
-
i
;
}
U
(
mat
).
m
[
0
][
0
]
=
1
.
0
f
;
U
(
mat
).
m
[
0
][
1
]
=
2
.
0
f
;
U
(
mat
).
m
[
0
][
2
]
=
3
.
0
f
;
U
(
mat
).
m
[
0
][
3
]
=
4
.
0
f
;
U
(
mat
).
m
[
1
][
0
]
=
5
.
0
f
;
U
(
mat
).
m
[
1
][
1
]
=
6
.
0
f
;
U
(
mat
).
m
[
1
][
2
]
=
7
.
0
f
;
U
(
mat
).
m
[
1
][
3
]
=
8
.
0
f
;
U
(
mat
).
m
[
2
][
0
]
=
9
.
0
f
;
U
(
mat
).
m
[
2
][
1
]
=
10
.
0
f
;
U
(
mat
).
m
[
2
][
2
]
=
11
.
0
f
;
U
(
mat
).
m
[
2
][
3
]
=
12
.
0
f
;
U
(
mat
).
m
[
3
][
0
]
=
13
.
0
f
;
U
(
mat
).
m
[
3
][
1
]
=
14
.
0
f
;
U
(
mat
).
m
[
3
][
2
]
=
15
.
0
f
;
U
(
mat
).
m
[
3
][
3
]
=
16
.
0
f
;
D3DXMatrixPerspectiveFovLH
(
&
projection
,
D3DX_PI
/
4
.
0
f
,
20
.
0
f
/
17
.
0
f
,
1
.
0
f
,
1000
.
0
f
);
U
(
view
).
m
[
0
][
1
]
=
5
.
0
f
;
U
(
view
).
m
[
0
][
2
]
=
7
.
0
f
;
U
(
view
).
m
[
0
][
3
]
=
8
.
0
f
;
U
(
view
).
m
[
1
][
0
]
=
11
.
0
f
;
U
(
view
).
m
[
1
][
2
]
=
16
.
0
f
;
U
(
view
).
m
[
1
][
3
]
=
33
.
0
f
;
U
(
view
).
m
[
2
][
0
]
=
19
.
0
f
;
U
(
view
).
m
[
2
][
1
]
=
-
21
.
0
f
;
U
(
view
).
m
[
2
][
3
]
=
43
.
0
f
;
U
(
view
).
m
[
3
][
0
]
=
2
.
0
f
;
U
(
view
).
m
[
3
][
1
]
=
3
.
0
f
;
U
(
view
).
m
[
3
][
2
]
=
-
4
.
0
f
;
U
(
view
).
m
[
0
][
0
]
=
10
.
0
f
;
U
(
view
).
m
[
1
][
1
]
=
20
.
0
f
;
U
(
view
).
m
[
2
][
2
]
=
30
.
0
f
;
U
(
view
).
m
[
3
][
3
]
=
-
40
.
0
f
;
U
(
world
).
m
[
0
][
0
]
=
21
.
0
f
;
U
(
world
).
m
[
0
][
1
]
=
2
.
0
f
;
U
(
world
).
m
[
0
][
2
]
=
3
.
0
f
;
U
(
world
).
m
[
0
][
3
]
=
4
.
0
;
U
(
world
).
m
[
1
][
0
]
=
5
.
0
f
;
U
(
world
).
m
[
1
][
1
]
=
23
.
0
f
;
U
(
world
).
m
[
1
][
2
]
=
7
.
0
f
;
U
(
world
).
m
[
1
][
3
]
=
8
.
0
f
;
U
(
world
).
m
[
2
][
0
]
=
-
8
.
0
f
;
U
(
world
).
m
[
2
][
1
]
=
-
7
.
0
f
;
U
(
world
).
m
[
2
][
2
]
=
25
.
0
f
;
U
(
world
).
m
[
2
][
3
]
=
-
5
.
0
f
;
U
(
world
).
m
[
3
][
0
]
=
-
4
.
0
f
;
U
(
world
).
m
[
3
][
1
]
=
-
3
.
0
f
;
U
(
world
).
m
[
3
][
2
]
=
-
2
.
0
f
;
U
(
world
).
m
[
3
][
3
]
=
27
.
0
f
;
/* D3DXVec2TransformCoordArray */
exp_vec
[
1
].
x
=
0
.
678571
f
;
exp_vec
[
1
].
y
=
0
.
785714
f
;
exp_vec
[
2
].
x
=
0
.
653846
f
;
exp_vec
[
2
].
y
=
0
.
769231
f
;
exp_vec
[
3
].
x
=
0
.
625
f
;
exp_vec
[
3
].
y
=
0
.
75
f
;
exp_vec
[
4
].
x
=
0
.
590909
f
;
exp_vec
[
4
].
y
=
8
.
0
f
/
11
.
0
f
;
exp_vec
[
5
].
x
=
0
.
55
f
;
exp_vec
[
5
].
y
=
0
.
7
f
;
D3DXVec2TransformCoordArray
((
D3DXVECTOR2
*
)(
out_vec
+
1
),
sizeof
(
D3DXVECTOR4
),
(
D3DXVECTOR2
*
)
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
mat
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
/* D3DXVec2TransformNormalArray */
exp_vec
[
1
].
x
=
25
.
0
f
;
exp_vec
[
1
].
y
=
30
.
0
f
;
exp_vec
[
2
].
x
=
21
.
0
f
;
exp_vec
[
2
].
y
=
26
.
0
f
;
exp_vec
[
3
].
x
=
17
.
0
f
;
exp_vec
[
3
].
y
=
22
.
0
f
;
exp_vec
[
4
].
x
=
13
.
0
f
;
exp_vec
[
4
].
y
=
18
.
0
f
;
exp_vec
[
5
].
x
=
9
.
0
f
;
exp_vec
[
5
].
y
=
14
.
0
f
;
D3DXVec2TransformNormalArray
((
D3DXVECTOR2
*
)(
out_vec
+
1
),
sizeof
(
D3DXVECTOR4
),
(
D3DXVECTOR2
*
)
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
mat
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
/* D3DXVec3TransformCoordArray */
exp_vec
[
1
].
x
=
0
.
678571
f
;
exp_vec
[
1
].
y
=
0
.
785714
f
;
exp_vec
[
1
].
z
=
0
.
892857
f
;
exp_vec
[
2
].
x
=
0
.
671875
f
;
exp_vec
[
2
].
y
=
0
.
78125
f
;
exp_vec
[
2
].
z
=
0
.
890625
f
;
exp_vec
[
3
].
x
=
6
.
0
f
/
9
.
0
f
;
exp_vec
[
3
].
y
=
7
.
0
f
/
9
.
0
f
;
exp_vec
[
3
].
z
=
8
.
0
f
/
9
.
0
f
;
exp_vec
[
4
].
x
=
0
.
6625
f
;
exp_vec
[
4
].
y
=
0
.
775
f
;
exp_vec
[
4
].
z
=
0
.
8875
f
;
exp_vec
[
5
].
x
=
0
.
659091
f
;
exp_vec
[
5
].
y
=
0
.
772727
f
;
exp_vec
[
5
].
z
=
0
.
886364
f
;
D3DXVec3TransformCoordArray
((
D3DXVECTOR3
*
)(
out_vec
+
1
),
sizeof
(
D3DXVECTOR4
),
(
D3DXVECTOR3
*
)
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
mat
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
/* D3DXVec3TransformNormalArray */
exp_vec
[
1
].
x
=
25
.
0
f
;
exp_vec
[
1
].
y
=
30
.
0
f
;
exp_vec
[
1
].
z
=
35
.
0
f
;
exp_vec
[
2
].
x
=
30
.
0
f
;
exp_vec
[
2
].
y
=
36
.
0
f
;
exp_vec
[
2
].
z
=
42
.
0
f
;
exp_vec
[
3
].
x
=
35
.
0
f
;
exp_vec
[
3
].
y
=
42
.
0
f
;
exp_vec
[
3
].
z
=
49
.
0
f
;
exp_vec
[
4
].
x
=
40
.
0
f
;
exp_vec
[
4
].
y
=
48
.
0
f
;
exp_vec
[
4
].
z
=
56
.
0
f
;
exp_vec
[
5
].
x
=
45
.
0
f
;
exp_vec
[
5
].
y
=
54
.
0
f
;
exp_vec
[
5
].
z
=
63
.
0
f
;
D3DXVec3TransformNormalArray
((
D3DXVECTOR3
*
)(
out_vec
+
1
),
sizeof
(
D3DXVECTOR4
),
(
D3DXVECTOR3
*
)
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
mat
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
/* D3DXVec3ProjectArray */
exp_vec
[
1
].
x
=
1089
.
554199
f
;
exp_vec
[
1
].
y
=
-
226
.
590622
f
;
exp_vec
[
1
].
z
=
0
.
215273
f
;
exp_vec
[
2
].
x
=
1068
.
903320
f
;
exp_vec
[
2
].
y
=
103
.
085129
f
;
exp_vec
[
2
].
z
=
0
.
183050
f
;
exp_vec
[
3
].
x
=
1051
.
778931
f
;
exp_vec
[
3
].
y
=
376
.
462250
f
;
exp_vec
[
3
].
z
=
0
.
156329
f
;
exp_vec
[
4
].
x
=
1037
.
348877
f
;
exp_vec
[
4
].
y
=
606
.
827393
f
;
exp_vec
[
4
].
z
=
0
.
133813
f
;
exp_vec
[
5
].
x
=
1025
.
023560
f
;
exp_vec
[
5
].
y
=
803
.
591248
f
;
exp_vec
[
5
].
z
=
0
.
114581
f
;
D3DXVec3ProjectArray
((
D3DXVECTOR3
*
)(
out_vec
+
1
),
sizeof
(
D3DXVECTOR4
),
(
CONST
D3DXVECTOR3
*
)
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
viewport
,
&
projection
,
&
view
,
&
world
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
/* D3DXVec3UnprojectArray */
exp_vec
[
1
].
x
=
-
6
.
124031
f
;
exp_vec
[
1
].
y
=
3
.
225360
f
;
exp_vec
[
1
].
z
=
0
.
620571
f
;
exp_vec
[
2
].
x
=
-
3
.
807109
f
;
exp_vec
[
2
].
y
=
2
.
04657
9
f
;
exp_vec
[
2
].
z
=
0
.
446894
f
;
exp_vec
[
3
].
x
=
-
2
.
922839
f
;
exp_vec
[
3
].
y
=
1
.
596689
f
;
exp_vec
[
3
].
z
=
0
.
380609
f
;
exp_vec
[
4
].
x
=
-
2
.
456225
f
;
exp_vec
[
4
].
y
=
1
.
359290
f
;
exp_vec
[
4
].
z
=
0
.
345632
f
;
exp_vec
[
5
].
x
=
-
2
.
167897
f
;
exp_vec
[
5
].
y
=
1
.
212597
f
;
exp_vec
[
5
].
z
=
0
.
324019
f
;
D3DXVec3UnprojectArray
((
D3DXVECTOR3
*
)(
out_vec
+
1
),
sizeof
(
D3DXVECTOR4
),
(
CONST
D3DXVECTOR3
*
)
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
viewport
,
&
projection
,
&
view
,
&
world
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
/* D3DXVec2TransformArray */
exp_vec
[
1
].
x
=
38
.
0
f
;
exp_vec
[
1
].
y
=
44
.
0
f
;
exp_vec
[
1
].
z
=
50
.
0
f
;
exp_vec
[
1
].
w
=
56
.
0
f
;
exp_vec
[
2
].
x
=
34
.
0
f
;
exp_vec
[
2
].
y
=
40
.
0
f
;
exp_vec
[
2
].
z
=
46
.
0
f
;
exp_vec
[
2
].
w
=
52
.
0
f
;
exp_vec
[
3
].
x
=
30
.
0
f
;
exp_vec
[
3
].
y
=
36
.
0
f
;
exp_vec
[
3
].
z
=
42
.
0
f
;
exp_vec
[
3
].
w
=
48
.
0
f
;
exp_vec
[
4
].
x
=
26
.
0
f
;
exp_vec
[
4
].
y
=
32
.
0
f
;
exp_vec
[
4
].
z
=
38
.
0
f
;
exp_vec
[
4
].
w
=
44
.
0
f
;
exp_vec
[
5
].
x
=
22
.
0
f
;
exp_vec
[
5
].
y
=
28
.
0
f
;
exp_vec
[
5
].
z
=
34
.
0
f
;
exp_vec
[
5
].
w
=
40
.
0
f
;
D3DXVec2TransformArray
(
out_vec
+
1
,
sizeof
(
D3DXVECTOR4
),
(
D3DXVECTOR2
*
)
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
mat
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
/* D3DXVec3TransformArray */
exp_vec
[
1
].
x
=
38
.
0
f
;
exp_vec
[
1
].
y
=
44
.
0
f
;
exp_vec
[
1
].
z
=
50
.
0
f
;
exp_vec
[
1
].
w
=
56
.
0
f
;
exp_vec
[
2
].
x
=
43
.
0
f
;
exp_vec
[
2
].
y
=
50
.
0
f
;
exp_vec
[
2
].
z
=
57
.
0
f
;
exp_vec
[
2
].
w
=
64
.
0
f
;
exp_vec
[
3
].
x
=
48
.
0
f
;
exp_vec
[
3
].
y
=
56
.
0
f
;
exp_vec
[
3
].
z
=
64
.
0
f
;
exp_vec
[
3
].
w
=
72
.
0
f
;
exp_vec
[
4
].
x
=
53
.
0
f
;
exp_vec
[
4
].
y
=
62
.
0
f
;
exp_vec
[
4
].
z
=
71
.
0
f
;
exp_vec
[
4
].
w
=
80
.
0
f
;
exp_vec
[
5
].
x
=
58
.
0
f
;
exp_vec
[
5
].
y
=
68
.
0
f
;
exp_vec
[
5
].
z
=
78
.
0
f
;
exp_vec
[
5
].
w
=
88
.
0
f
;
D3DXVec3TransformArray
(
out_vec
+
1
,
sizeof
(
D3DXVECTOR4
),
(
D3DXVECTOR3
*
)
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
mat
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
/* D3DXVec4TransformArray */
exp_vec
[
1
].
x
=
90
.
0
f
;
exp_vec
[
1
].
y
=
100
.
0
f
;
exp_vec
[
1
].
z
=
110
.
0
f
;
exp_vec
[
1
].
w
=
120
.
0
f
;
exp_vec
[
2
].
x
=
82
.
0
f
;
exp_vec
[
2
].
y
=
92
.
0
f
;
exp_vec
[
2
].
z
=
102
.
0
f
;
exp_vec
[
2
].
w
=
112
.
0
f
;
exp_vec
[
3
].
x
=
74
.
0
f
;
exp_vec
[
3
].
y
=
84
.
0
f
;
exp_vec
[
3
].
z
=
94
.
0
f
;
exp_vec
[
3
].
w
=
104
.
0
f
;
exp_vec
[
4
].
x
=
66
.
0
f
;
exp_vec
[
4
].
y
=
76
.
0
f
;
exp_vec
[
4
].
z
=
86
.
0
f
;
exp_vec
[
4
].
w
=
96
.
0
f
;
exp_vec
[
5
].
x
=
58
.
0
f
;
exp_vec
[
5
].
y
=
68
.
0
f
;
exp_vec
[
5
].
z
=
78
.
0
f
;
exp_vec
[
5
].
w
=
88
.
0
f
;
D3DXVec4TransformArray
(
out_vec
+
1
,
sizeof
(
D3DXVECTOR4
),
inp_vec
,
sizeof
(
D3DXVECTOR4
),
&
mat
,
ARRAY_SIZE
);
compare_vectors
(
exp_vec
,
out_vec
);
}
START_TEST
(
math
)
{
test_D3DXVec_Array
();
}
programs/winetest/Makefile.in
View file @
b67290b9
...
...
@@ -34,6 +34,7 @@ TESTBINS = \
d3d9_test.exe
\
d3drm_test.exe
\
d3dx8_test.exe
\
d3dx9_36_test.exe
\
ddraw_test.exe
\
dinput_test.exe
\
dnsapi_test.exe
\
...
...
@@ -126,6 +127,8 @@ d3drm_test.exe: $(DLLDIR)/d3drm/tests/d3drm_test.exe$(DLLEXT)
cp
$(DLLDIR)
/d3drm/tests/d3drm_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
d3dx8_test.exe
:
$(DLLDIR)/d3dx8/tests/d3dx8_test.exe$(DLLEXT)
cp
$(DLLDIR)
/d3dx8/tests/d3dx8_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
d3dx9_36_test.exe
:
$(DLLDIR)/d3dx9_36/tests/d3dx9_36_test.exe$(DLLEXT)
cp
$(DLLDIR)
/d3dx9_36/tests/d3dx9_36_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
ddraw_test.exe
:
$(DLLDIR)/ddraw/tests/ddraw_test.exe$(DLLEXT)
cp
$(DLLDIR)
/ddraw/tests/ddraw_test.exe
$(DLLEXT)
$@
&&
$(STRIP)
$@
dinput_test.exe
:
$(DLLDIR)/dinput/tests/dinput_test.exe$(DLLEXT)
...
...
programs/winetest/winetest.rc
View file @
b67290b9
...
...
@@ -92,6 +92,7 @@ d3d8_test.exe TESTRES "d3d8_test.exe"
d3d9_test.exe TESTRES "d3d9_test.exe"
d3drm_test.exe TESTRES "d3drm_test.exe"
d3dx8_test.exe TESTRES "d3dx8_test.exe"
d3dx9_36_test.exe TESTRES "d3dx9_36_test.exe"
ddraw_test.exe TESTRES "ddraw_test.exe"
dinput_test.exe TESTRES "dinput_test.exe"
dnsapi_test.exe TESTRES "dnsapi_test.exe"
...
...
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