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
c59efbed
Commit
c59efbed
authored
Oct 30, 2012
by
Nozomi Kodama
Committed by
Alexandre Julliard
Nov 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Add tests for D3DXSHRotateZ.
parent
ffa7ac73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
38 deletions
+100
-38
math.c
dlls/d3dx9_36/tests/math.c
+100
-38
No files found.
dlls/d3dx9_36/tests/math.c
View file @
c59efbed
...
...
@@ -2784,49 +2784,111 @@ static void test_D3DXSHRotate(void)
static
void
test_D3DXSHRotateZ
(
void
)
{
unsigned
int
i
,
j
,
order
,
square
;
FLOAT
angle
[]
=
{
D3DX_PI
/
3
.
0
f
,
-
D3DX_PI
/
3
.
0
f
,
4
.
0
f
*
D3DX_PI
/
3
.
0
f
,
},
expected
,
in
[
49
],
out
[
49
],
*
received_ptr
,
table
[]
=
{
/* Angle = D3DX_PI / 3.0f */
1
.
01
f
,
4
.
477762
f
,
3
.
010000
f
,
0
.
264289
f
,
5
.
297888
f
,
9
.
941864
f
,
7
.
010000
f
,
-
1
.
199813
f
,
-
8
.
843789
f
,
-
10
.
010002
f
,
7
.
494040
f
,
18
.
138016
f
,
13
.
010000
,
-
3
.
395966
f
,
-
17
.
03
9942
f
,
-
16
.
00
9998
f
,
-
30
.
164297
f
,
-
18
.
010004
f
,
10
.
422242
f
,
29
.
06621
9
f
,
21
.
010000
f
,
-
6
.
324171
f
,
-
27
.
968145
f
,
-
24
.
00
9998
f
,
2
.
226099
f
,
-
18
.
180565
,
-
43
.
824551
f
,
-
28
.
010004
f
,
14
.
082493
f
,
42
.
726471
f
,
31
.
010000
f
,
-
9
.
984426
f
,
-
41
.
628399
f
,
-
34
.
00
9995
f
,
5
.
886358
f
,
40
.
530331
f
,
/* Angle = D3DX_PI / 3.0f */
1
.
01
f
,
-
2
.
467762
f
,
3
.
010000
f
,
3
.
745711
f
,
-
10
.
307890
f
,
-
3
.
931864
f
,
7
.
010000
f
,
9
.
209813
f
,
-
0
.
166214
f
,
-
10
.
010002
f
,
-
18
.
504044
f
,
-
6
.
128017
f
,
13
.
010000
f
,
17
.
405966
f
,
2
.
02
9938
f
,
-
16
.
00
9998
f
,
13
.
154303
f
,
-
18
.
010004
f
,
-
29
.
432247
f
,
-
9
.
056221
f
,
21
.
010000
f
,
28
.
334169
f
,
4
.
958139
f
,
-
24
.
010002
f
,
-
27
.
236092
f
,
44
.
190582
f
,
16
.
814558
f
,
-
28
.
00
9996
f
,
-
43
.
092499
f
,
-
12
.
716474
f
,
31
.
010000
f
,
41
.
994423
f
,
8
.
618393
f
,
-
34
.
010002
f
,
-
40
.
896347
f
,
-
4
.
520310
f
,
/* Angle = 4.0f * D3DX_PI / 3.0f */
1
.
01
f
,
-
4
.
477762
f
,
3
.
010000
f
,
-
0
.
264289
f
,
5
.
297887
f
,
-
9
.
941864
f
,
7
.
010000
f
,
1
.
199814
f
,
-
8
.
843788
f
,
10
.
010004
f
,
7
.
494038
f
,
-
18
.
138016
f
,
13
.
010000
f
,
3
.
395967
f
,
-
17
.
03
9940
f
,
16
.
00
9996
f
,
-
30
.
164293
f
,
18
.
010006
f
,
10
.
422239
f
,
-
29
.
06621
9
f
,
21
.
010000
f
,
6
.
324172
f
,
-
27
.
968143
f
,
24
.
00
9993
f
,
2
.
226105
f
,
18
.
180552
f
,
-
43
.
824543
f
,
28
.
01000
8
f
,
14
.
082489
f
,
-
42
.
726471
f
,
31
.
010000
f
,
9
.
984427
f
,
-
41
.
628399
f
,
34
.
00
9987
f
,
5
.
886366
f
,
-
40
.
530327
,
};
unsigned
int
end
,
i
,
j
,
l
,
order
,
square
;
FLOAT
expected
,
in
[
49
],
out
[
49
],
*
out_temp
,
*
received_ptr
;
const
FLOAT
angle
[]
=
{
D3DX_PI
/
3
.
0
f
,
-
D3DX_PI
/
3
.
0
f
,
4
.
0
f
*
D3DX_PI
/
3
.
0
f
,
},
table
[]
=
{
/* Angle = D3DX_PI / 3.0f */
1
.
01
f
,
4
.
477762
f
,
3
.
010000
f
,
0
.
264289
f
,
5
.
297888
f
,
9
.
941864
f
,
7
.
010000
f
,
-
1
.
199813
f
,
-
8
.
843789
f
,
-
10
.
010002
f
,
7
.
494040
f
,
18
.
138016
f
,
13
.
010000
,
-
3
.
395966
f
,
-
17
.
03
9942
f
,
-
16
.
00
9998
f
,
-
30
.
164297
f
,
-
18
.
010004
f
,
10
.
422242
f
,
29
.
06621
9
f
,
21
.
010000
f
,
-
6
.
324171
f
,
-
27
.
968145
f
,
-
24
.
00
9998
f
,
2
.
226099
f
,
-
18
.
180565
,
-
43
.
824551
f
,
-
28
.
010004
f
,
14
.
082493
f
,
42
.
726471
f
,
31
.
010000
f
,
-
9
.
984426
f
,
-
41
.
628399
f
,
-
34
.
00
9995
f
,
5
.
886358
f
,
40
.
530331
f
,
1
.
01
f
,
4
.
477762
f
,
0
.
0
f
,
-
5
.
816784
f
,
5
.
297888
f
,
6
.
936864
f
,
0
.
0
f
,
-
9
.
011250
f
,
-
2
.
294052
f
,
-
10
.
010002
f
,
12
.
999042
f
,
12
.
133017
f
,
0
.
0
f
,
-
15
.
761250
f
,
-
5
.
628748
f
,
0
.
0
f
,
-
30
.
164297
f
,
0
.
0
f
,
19
.
927244
f
,
19
.
061220
f
,
0
.
0
f
,
-
24
.
761251
f
,
-
8
.
628748
f
,
0
.
0
f
,
-
13
.
061530
f
,
-
18
.
180565
f
,
-
30
.
319553
f
,
0
.
0
f
,
28
.
587496
f
,
27
.
721474
f
,
0
.
0
f
,
-
36
.
011253
f
,
-
12
.
378746
f
,
0
.
0
f
,
-
13
.
128758
f
,
-
23
.
617250
f
,
1
.
010000
f
,
3
.
977762
f
,
3
.
977762
f
,
1
.
114195
f
,
7
.
245791
f
,
10
.
559759
f
,
10
.
559759
f
,
-
0
.
995160
f
,
-
0
.
467341
f
,
0
.
467339
f
,
12
.
765371
f
,
18
.
515701
f
,
18
.
515701
f
,
-
1
.
797287
f
,
0
.
493916
f
,
-
0
.
493916
f
,
-
21
.
412342
f
,
21
.
412338
f
,
9
.
221072
f
,
23
.
671757
f
,
23
.
671757
f
,
3
.
850195
f
,
-
20
.
468727
f
,
20
.
468723
f
,
-
10
.
662103
f
,
-
36
.
516628
f
,
-
12
.
061245
f
,
12
.
061240
f
,
22
.
556875
f
,
38
.
999908
f
,
38
.
999908
f
,
-
0
.
034
875
f
,
-
10
.
427902
f
,
10
.
427900
f
,
-
36
.
838284
f
,
-
27
.
652803
f
,
/* Angle = -D3DX_PI / 3.0f */
1
.
01
f
,
-
2
.
467762
f
,
3
.
010000
f
,
3
.
745711
f
,
-
10
.
307890
f
,
-
3
.
931864
f
,
7
.
010000
f
,
9
.
209813
f
,
-
0
.
166214
f
,
-
10
.
010002
f
,
-
18
.
504044
f
,
-
6
.
128017
f
,
13
.
010000
f
,
17
.
405966
f
,
2
.
02
9938
f
,
-
16
.
00
9998
f
,
13
.
154303
f
,
-
18
.
010004
f
,
-
29
.
432247
f
,
-
9
.
056221
f
,
21
.
010000
f
,
28
.
334169
f
,
4
.
958139
f
,
-
24
.
010002
f
,
-
27
.
236092
f
,
44
.
190582
f
,
16
.
814558
f
,
-
28
.
00
9996
f
,
-
43
.
092499
f
,
-
12
.
716474
f
,
31
.
010000
f
,
41
.
994423
f
,
8
.
618393
f
,
-
34
.
010002
f
,
-
40
.
896347
f
,
-
4
.
520310
f
,
1
.
01
f
,
-
2
.
467762
f
,
0
.
0
f
,
-
3
.
205718
f
,
-
10
.
307890
f
,
-
6
.
936864
f
,
0
.
0
f
,
-
9
.
011250
f
,
-
4
.
463446
f
,
-
10
.
00
9998
f
,
-
12
.
999042
f
,
-
12
.
133017
f
,
0
.
0
f
,
-
15
.
761250
f
,
-
5
.
628748
f
,
0
.
0
f
,
13
.
154303
f
,
0
.
0
f
,
-
19
.
927244
f
,
-
19
.
061220
f
,
0
.
0
f
,
-
24
.
761251
f
,
-
8
.
628748
f
,
0
.
0
f
,
-
5
.
695983
f
,
44
.
190582
f
,
30
.
319553
f
,
0
.
0
f
,
-
28
.
587496
f
,
-
27
.
721474
f
,
0
.
0
f
,
-
36
.
011253
f
,
-
12
.
378746
f
,
0
.
0
f
,
-
13
.
128758
f
,
-
57
.
405258
f
,
1
.
010000
f
,
-
2
.
967762
f
,
-
2
.
967762
f
,
-
0
.
609195
f
,
-
7
.
498291
f
,
-
10
.
686009
f
,
-
10
.
686009
f
,
-
11
.
836716
f
,
5
.
390780
f
,
-
5
.
390779
f
,
-
10
.
303651
f
,
-
17
.
284842
f
,
-
17
.
284842
f
,
-
17
.
565643
f
,
4
.
114273
f
,
-
4
.
114273
f
,
23
.
716436
f
,
-
23
.
716433
f
,
-
8
.
06
9025
f
,
-
23
.
095732
f
,
-
23
.
095732
f
,
-
18
.
535847
f
,
-
11
.
271107
f
,
11
.
271104
f
,
-
2
.
0724
84
f
,
30
.
149330
f
,
15
.
244893
f
,
-
15
.
244888
f
,
-
20
.
965050
f
,
-
38
.
203999
f
,
-
38
.
203999
f
,
-
37
.
258266
f
,
5
.
426677
f
,
-
5
.
426679
f
,
-
23
.
396751
f
,
-
9
.
903559
f
,
/* Angle = 4.0f * D3DX_PI / 3.0f */
1
.
01
f
,
-
4
.
477762
f
,
3
.
010000
f
,
-
0
.
264289
f
,
5
.
297887
f
,
-
9
.
941864
f
,
7
.
010000
f
,
1
.
199814
f
,
-
8
.
843788
f
,
10
.
010004
f
,
7
.
494038
f
,
-
18
.
138016
f
,
13
.
010000
f
,
3
.
395967
f
,
-
17
.
03
9940
f
,
16
.
00
9996
f
,
-
30
.
164293
f
,
18
.
010006
f
,
10
.
422239
f
,
-
29
.
06621
9
f
,
21
.
010000
f
,
6
.
324172
f
,
-
27
.
968143
f
,
24
.
00
9993
f
,
2
.
226105
f
,
18
.
180552
f
,
-
43
.
824543
f
,
28
.
01000
8
f
,
14
.
082489
f
,
-
42
.
726471
f
,
31
.
010000
f
,
9
.
984427
f
,
-
41
.
628399
f
,
34
.
00
9987
f
,
5
.
886366
f
,
-
40
.
530327
f
,
1
.
01
f
,
-
4
.
477762
f
,
0
.
0
f
,
-
1
.
938928
f
,
5
.
297887
f
,
-
6
.
936864
f
,
0
.
0
f
,
-
3
.
003751
f
,
-
2
.
294051
f
,
10
.
010004
f
,
12
.
999040
f
,
-
12
.
133017
f
,
0
.
0
f
,
-
5
.
253751
f
,
-
5
.
628747
f
,
0
.
0
f
,
-
30
.
164293
f
,
0
.
0
f
,
19
.
927242
f
,
-
19
.
061220
f
,
0
.
0
f
,
-
8
.
253753
f
,
-
8
.
628746
f
,
0
.
0
f
,
-
13
.
061535
f
,
18
.
180552
f
,
-
30
.
319553
f
,
0
.
0
f
,
28
.
587492
f
,
-
27
.
721474
f
,
0
.
0
f
,
-
12
.
003753
f
,
-
12
.
378742
f
,
0
.
0
f
,
-
13
.
128765
f
,
-
7
.
872400
f
,
1
.
010000
f
,
-
3
.
977762
f
,
-
3
.
977762
f
,
2
.
863566
f
,
6
.
371104
f
,
-
10
.
122416
f
,
-
10
.
122416
f
,
10
.
578746
f
,
-
7
.
769295
f
,
-
7
.
769290
f
,
16
.
883686
f
,
-
20
.
574858
f
,
-
20
.
574858
f
,
24
.
909130
f
,
-
5
.
726166
f
,
-
5
.
726164
f
,
-
18
.
796221
f
,
-
18
.
796211
f
,
29
.
325350
f
,
-
33
.
723892
f
,
-
33
.
723892
f
,
42
.
258442
f
,
-
4
.
851232
f
,
-
4
.
851226
f
,
-
2
.
533393
f
,
32
.
452259
f
,
-
46
.
545670
f
,
-
46
.
545654
f
,
51
.
860325
f
,
-
53
.
651630
f
,
-
53
.
651630
f
,
71
.
738174
f
,
4
.
440616
f
,
4
.
440629
f
,
25
.
884174
f
,
-
10
.
748116
f
,
};
for
(
l
=
0
;
l
<
3
;
l
++
)
{
if
(
l
==
0
)
out_temp
=
out
;
else
out_temp
=
&
in
[
l
-
1
];
for
(
i
=
0
;
i
<
49
;
i
++
)
in
[
i
]
=
i
+
1
.
01
f
;
if
(
l
<
2
)
end
=
49
;
else
end
=
48
;
for
(
j
=
0
;
j
<
3
;
j
++
)
{
for
(
order
=
0
;
order
<=
D3DXSH_MAXORDER
+
1
;
order
++
)
for
(
j
=
0
;
j
<
3
;
j
++
)
{
for
(
i
=
0
;
i
<
49
;
i
++
)
out
[
i
]
=
(
i
+
1
.
0
f
)
*
(
i
+
1
.
0
f
);
for
(
order
=
0
;
order
<=
D3DXSH_MAXORDER
+
1
;
order
++
)
{
for
(
i
=
0
;
i
<
49
;
i
++
)
{
out
[
i
]
=
(
i
+
1
.
0
f
)
*
(
i
+
1
.
0
f
);
in
[
i
]
=
i
+
1
.
01
f
;
}
received_ptr
=
D3DXSHRotateZ
(
out
,
order
,
angle
[
j
],
in
);
ok
(
received_ptr
==
out
,
"angle %f, order %u, Expected %p, received %p
\n
"
,
angle
[
j
],
order
,
out
,
received_ptr
);
received_ptr
=
D3DXSHRotateZ
(
out_temp
,
order
,
angle
[
j
],
in
);
ok
(
received_ptr
==
out_temp
,
"angle %f, order %u, expected %p, received %p
\n
"
,
angle
[
j
],
order
,
out_temp
,
received_ptr
);
for
(
i
=
0
;
i
<
49
;
i
++
)
{
/* order = 0 or order = 1 behaves like order = D3DXSH_MINORDER */
square
=
(
order
<=
D3DXSH_MINORDER
)
?
D3DXSH_MINORDER
*
D3DXSH_MINORDER
:
order
*
order
;
if
(
i
>=
square
||
(
(
order
>=
D3DXSH_MAXORDER
)
&&
(
i
>=
D3DXSH_MAXORDER
*
D3DXSH_MAXORDER
)
)
)
expected
=
(
i
+
1
.
0
f
)
*
(
i
+
1
.
0
f
);
else
expected
=
table
[
36
*
j
+
i
];
ok
(
relative_error
(
out
[
i
],
expected
)
<
admitted_error
,
"angle %f, order %u index %u, Expected %f, received %f
\n
"
,
angle
[
j
],
order
,
i
,
expected
,
out
[
i
]);
for
(
i
=
0
;
i
<
end
;
i
++
)
{
/* order = 0 or order = 1 behaves like order = D3DXSH_MINORDER */
square
=
(
order
<=
D3DXSH_MINORDER
)
?
D3DXSH_MINORDER
*
D3DXSH_MINORDER
:
order
*
order
;
if
(
i
>=
square
||
((
order
>=
D3DXSH_MAXORDER
)
&&
(
i
>=
D3DXSH_MAXORDER
*
D3DXSH_MAXORDER
)))
if
(
l
>
0
)
expected
=
i
+
l
+
0
.
01
f
;
else
expected
=
(
i
+
1
.
0
f
)
*
(
i
+
1
.
0
f
);
else
expected
=
table
[
36
*
(
l
+
3
*
j
)
+
i
];
ok
(
relative_error
(
expected
,
out_temp
[
i
])
<
admitted_error
,
"angle %f, order %u index %u, expected %f, received %f
\n
"
,
angle
[
j
],
order
,
i
,
expected
,
out_temp
[
i
]);
}
}
}
}
...
...
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