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
b8cfe423
Commit
b8cfe423
authored
Oct 02, 2012
by
Nozomi Kodama
Committed by
Alexandre Julliard
Oct 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Implement D3DXSHMultiply4.
parent
6643f07d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
340 additions
and
1 deletion
+340
-1
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
math.c
dlls/d3dx9_36/math.c
+288
-0
math.c
dlls/d3dx9_36/tests/math.c
+50
-0
d3dx9math.h
include/d3dx9math.h
+1
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
b8cfe423
...
...
@@ -281,7 +281,7 @@
@ stub D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr)
@ stdcall D3DXSHMultiply2(ptr ptr ptr)
@ stdcall D3DXSHMultiply3(ptr ptr ptr)
@ st
ub
D3DXSHMultiply4(ptr ptr ptr)
@ st
dcall
D3DXSHMultiply4(ptr ptr ptr)
@ stub D3DXSHMultiply5(ptr ptr ptr)
@ stub D3DXSHMultiply6(ptr ptr ptr)
@ stub D3DXSHProjectCubeMap(long ptr ptr ptr ptr)
...
...
dlls/d3dx9_36/math.c
View file @
b8cfe423
...
...
@@ -2429,6 +2429,294 @@ FLOAT * WINAPI D3DXSHMultiply3(FLOAT *out, const FLOAT *a, const FLOAT *b)
return
out
;
}
FLOAT
*
WINAPI
D3DXSHMultiply4
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
)
{
FLOAT
ta
,
tb
,
t
;
TRACE
(
"out %p, a %p, b %p
\n
"
,
out
,
a
,
b
);
out
[
0
]
=
0
.
28209479
f
*
a
[
0
]
*
b
[
0
];
ta
=
0
.
28209479
f
*
a
[
0
]
-
0
.
12615663
f
*
a
[
6
]
-
0
.
21850969
f
*
a
[
8
];
tb
=
0
.
28209479
f
*
b
[
0
]
-
0
.
12615663
f
*
b
[
6
]
-
0
.
21850969
f
*
b
[
8
];
out
[
1
]
=
ta
*
b
[
1
]
+
tb
*
a
[
1
];
t
=
a
[
1
]
*
b
[
1
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
6
]
=
-
0
.
12615663
f
*
t
;
out
[
8
]
=
-
0
.
21850969
f
*
t
;
ta
=
0
.
21850969
f
*
a
[
3
]
-
0
.
05
839917
f
*
a
[
13
]
-
0
.
22617901
f
*
a
[
15
];
tb
=
0
.
21850969
f
*
b
[
3
]
-
0
.
05
839917
f
*
b
[
13
]
-
0
.
22617901
f
*
b
[
15
];
out
[
1
]
+=
ta
*
b
[
4
]
+
tb
*
a
[
4
];
out
[
4
]
=
ta
*
b
[
1
]
+
tb
*
a
[
1
];
t
=
a
[
1
]
*
b
[
4
]
+
a
[
4
]
*
b
[
1
];
out
[
3
]
=
0
.
21850969
f
*
t
;
out
[
13
]
=
-
0
.
05
839917
f
*
t
;
out
[
15
]
=
-
0
.
22617901
f
*
t
;
ta
=
0
.
21850969
f
*
a
[
2
]
-
0
.
14304817
f
*
a
[
12
]
-
0
.
18467439
f
*
a
[
14
];
tb
=
0
.
21850969
f
*
b
[
2
]
-
0
.
14304817
f
*
b
[
12
]
-
0
.
18467439
f
*
b
[
14
];
out
[
1
]
+=
ta
*
b
[
5
]
+
tb
*
a
[
5
];
out
[
5
]
=
ta
*
b
[
1
]
+
tb
*
a
[
1
];
t
=
a
[
1
]
*
b
[
5
]
+
a
[
5
]
*
b
[
1
];
out
[
2
]
=
0
.
21850969
f
*
t
;
out
[
12
]
=
-
0
.
14304817
f
*
t
;
out
[
14
]
=
-
0
.
18467439
f
*
t
;
ta
=
0
.
20230066
f
*
a
[
11
];
tb
=
0
.
20230066
f
*
b
[
11
];
out
[
1
]
+=
ta
*
b
[
6
]
+
tb
*
a
[
6
];
out
[
6
]
+=
ta
*
b
[
1
]
+
tb
*
a
[
1
];
t
=
a
[
1
]
*
b
[
6
]
+
a
[
6
]
*
b
[
1
];
out
[
11
]
=
0
.
20230066
f
*
t
;
ta
=
0
.
22617901
f
*
a
[
9
]
+
0
.
05
839917
f
*
a
[
11
];
tb
=
0
.
22617901
f
*
b
[
9
]
+
0
.
05
839917
f
*
b
[
11
];
out
[
1
]
+=
ta
*
b
[
8
]
+
tb
*
a
[
8
];
out
[
8
]
+=
ta
*
b
[
1
]
+
tb
*
a
[
1
];
t
=
a
[
1
]
*
b
[
8
]
+
a
[
8
]
*
b
[
1
];
out
[
9
]
=
0
.
22617901
f
*
t
;
out
[
11
]
+=
0
.
05
839917
f
*
t
;
ta
=
0
.
28209480
f
*
a
[
0
]
+
0
.
25231326
f
*
a
[
6
];
tb
=
0
.
28209480
f
*
b
[
0
]
+
0
.
25231326
f
*
b
[
6
];
out
[
2
]
+=
ta
*
b
[
2
]
+
tb
*
a
[
2
];
t
=
a
[
2
]
*
b
[
2
];
out
[
0
]
+=
0
.
28209480
f
*
t
;
out
[
6
]
+=
0
.
25231326
f
*
t
;
ta
=
0
.
24776671
f
*
a
[
12
];
tb
=
0
.
24776671
f
*
b
[
12
];
out
[
2
]
+=
ta
*
b
[
6
]
+
tb
*
a
[
6
];
out
[
6
]
+=
ta
*
b
[
2
]
+
tb
*
a
[
2
];
t
=
a
[
2
]
*
b
[
6
]
+
a
[
6
]
*
b
[
2
];
out
[
12
]
+=
0
.
24776671
f
*
t
;
ta
=
0
.
28209480
f
*
a
[
0
]
-
0
.
12615663
f
*
a
[
6
]
+
0
.
21850969
f
*
a
[
8
];
tb
=
0
.
28209480
f
*
b
[
0
]
-
0
.
12615663
f
*
b
[
6
]
+
0
.
21850969
f
*
b
[
8
];
out
[
3
]
+=
ta
*
b
[
3
]
+
tb
*
a
[
3
];
t
=
a
[
3
]
*
b
[
3
];
out
[
0
]
+=
0
.
28209480
f
*
t
;
out
[
6
]
-=
0
.
12615663
f
*
t
;
out
[
8
]
+=
0
.
21850969
f
*
t
;
ta
=
0
.
20230066
f
*
a
[
13
];
tb
=
0
.
20230066
f
*
b
[
13
];
out
[
3
]
+=
ta
*
b
[
6
]
+
tb
*
a
[
6
];
out
[
6
]
+=
ta
*
b
[
3
]
+
tb
*
a
[
3
];
t
=
a
[
3
]
*
b
[
6
]
+
a
[
6
]
*
b
[
3
];
out
[
13
]
+=
0
.
20230066
f
*
t
;
ta
=
0
.
21850969
f
*
a
[
2
]
-
0
.
14304817
f
*
a
[
12
]
+
0
.
18467439
f
*
a
[
14
];
tb
=
0
.
21850969
f
*
b
[
2
]
-
0
.
14304817
f
*
b
[
12
]
+
0
.
18467439
f
*
b
[
14
];
out
[
3
]
+=
ta
*
b
[
7
]
+
tb
*
a
[
7
];
out
[
7
]
=
ta
*
b
[
3
]
+
tb
*
a
[
3
];
t
=
a
[
3
]
*
b
[
7
]
+
a
[
7
]
*
b
[
3
];
out
[
2
]
+=
0
.
21850969
f
*
t
;
out
[
12
]
-=
0
.
14304817
f
*
t
;
out
[
14
]
+=
0
.
18467439
f
*
t
;
ta
=
-
0
.
05
839917
f
*
a
[
13
]
+
0
.
22617901
f
*
a
[
15
];
tb
=
-
0
.
05
839917
f
*
b
[
13
]
+
0
.
22617901
f
*
b
[
15
];
out
[
3
]
+=
ta
*
b
[
8
]
+
tb
*
a
[
8
];
out
[
8
]
+=
ta
*
b
[
3
]
+
tb
*
a
[
3
];
t
=
a
[
3
]
*
b
[
8
]
+
a
[
8
]
*
b
[
3
];
out
[
13
]
-=
0
.
05
839917
f
*
t
;
out
[
15
]
+=
0
.
22617901
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
]
-
0
.
18022375
f
*
a
[
6
];
tb
=
0
.
28209479
f
*
b
[
0
]
-
0
.
18022375
f
*
b
[
6
];
out
[
4
]
+=
ta
*
b
[
4
]
+
tb
*
a
[
4
];
t
=
a
[
4
]
*
b
[
4
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
6
]
-=
0
.
18022375
f
*
t
;
ta
=
0
.
15607835
f
*
a
[
7
];
tb
=
0
.
15607835
f
*
b
[
7
];
out
[
4
]
+=
ta
*
b
[
5
]
+
tb
*
a
[
5
];
out
[
5
]
+=
ta
*
b
[
4
]
+
tb
*
a
[
4
];
t
=
a
[
4
]
*
b
[
5
]
+
a
[
5
]
*
b
[
4
];
out
[
7
]
+=
0
.
15607835
f
*
t
;
ta
=
0
.
22617901
f
*
a
[
3
]
-
0
.
09403160
f
*
a
[
13
];
tb
=
0
.
22617901
f
*
b
[
3
]
-
0
.
09403160
f
*
b
[
13
];
out
[
4
]
+=
ta
*
b
[
9
]
+
tb
*
a
[
9
];
out
[
9
]
+=
ta
*
b
[
4
]
+
tb
*
a
[
4
];
t
=
a
[
4
]
*
b
[
9
]
+
a
[
9
]
*
b
[
4
];
out
[
3
]
+=
0
.
22617901
f
*
t
;
out
[
13
]
-=
0
.
09403160
f
*
t
;
ta
=
0
.
18467439
f
*
a
[
2
]
-
0
.
18806319
f
*
a
[
12
];
tb
=
0
.
18467439
f
*
b
[
2
]
-
0
.
18806319
f
*
b
[
12
];
out
[
4
]
+=
ta
*
b
[
10
]
+
tb
*
a
[
10
];
out
[
10
]
=
ta
*
b
[
4
]
+
tb
*
a
[
4
];
t
=
a
[
4
]
*
b
[
10
]
+
a
[
10
]
*
b
[
4
];
out
[
2
]
+=
0
.
18467439
f
*
t
;
out
[
12
]
-=
0
.
18806319
f
*
t
;
ta
=
-
0
.
05
839917
f
*
a
[
3
]
+
0
.
14567312
f
*
a
[
13
]
+
0
.
09403160
f
*
a
[
15
];
tb
=
-
0
.
05
839917
f
*
b
[
3
]
+
0
.
14567312
f
*
b
[
13
]
+
0
.
09403160
f
*
b
[
15
];
out
[
4
]
+=
ta
*
b
[
11
]
+
tb
*
a
[
11
];
out
[
11
]
+=
ta
*
b
[
4
]
+
tb
*
a
[
4
];
t
=
a
[
4
]
*
b
[
11
]
+
a
[
11
]
*
b
[
4
];
out
[
3
]
-=
0
.
05
839917
f
*
t
;
out
[
13
]
+=
0
.
14567312
f
*
t
;
out
[
15
]
+=
0
.
09403160
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
]
+
0
.
09011186
f
*
a
[
6
]
-
0
.
15607835
f
*
a
[
8
];
tb
=
0
.
28209479
f
*
b
[
0
]
+
0
.
09011186
f
*
b
[
6
]
-
0
.
15607835
f
*
b
[
8
];
out
[
5
]
+=
ta
*
b
[
5
]
+
tb
*
a
[
5
];
t
=
a
[
5
]
*
b
[
5
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
6
]
+=
0
.
09011186
f
*
t
;
out
[
8
]
-=
0
.
15607835
f
*
t
;
ta
=
0
.
14867701
f
*
a
[
14
];
tb
=
0
.
14867701
f
*
b
[
14
];
out
[
5
]
+=
ta
*
b
[
9
]
+
tb
*
a
[
9
];
out
[
9
]
+=
ta
*
b
[
5
]
+
tb
*
a
[
5
];
t
=
a
[
5
]
*
b
[
9
]
+
a
[
9
]
*
b
[
5
];
out
[
14
]
+=
0
.
14867701
f
*
t
;
ta
=
0
.
18467439
f
*
a
[
3
]
+
0
.
11516472
f
*
a
[
13
]
-
0
.
14867701
f
*
a
[
15
];
tb
=
0
.
18467439
f
*
b
[
3
]
+
0
.
11516472
f
*
b
[
13
]
-
0
.
14867701
f
*
b
[
15
];
out
[
5
]
+=
ta
*
b
[
10
]
+
tb
*
a
[
10
];
out
[
10
]
+=
ta
*
b
[
5
]
+
tb
*
a
[
5
];
t
=
a
[
5
]
*
b
[
10
]
+
a
[
10
]
*
b
[
5
];
out
[
3
]
+=
0
.
18467439
f
*
t
;
out
[
13
]
+=
0
.
11516472
f
*
t
;
out
[
15
]
-=
0
.
14867701
f
*
t
;
ta
=
0
.
23359668
f
*
a
[
2
]
+
0
.
05
947080
f
*
a
[
12
]
-
0
.
11516472
f
*
a
[
14
];
tb
=
0
.
23359668
f
*
b
[
2
]
+
0
.
05
947080
f
*
b
[
12
]
-
0
.
11516472
f
*
b
[
14
];
out
[
5
]
+=
ta
*
b
[
11
]
+
tb
*
a
[
11
];
out
[
11
]
+=
ta
*
b
[
5
]
+
tb
*
a
[
5
];
t
=
a
[
5
]
*
b
[
11
]
+
a
[
11
]
*
b
[
5
];
out
[
2
]
+=
0
.
23359668
f
*
t
;
out
[
12
]
+=
0
.
05
947080
f
*
t
;
out
[
14
]
-=
0
.
11516472
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
];
tb
=
0
.
28209479
f
*
b
[
0
];
out
[
6
]
+=
ta
*
b
[
6
]
+
tb
*
a
[
6
];
t
=
a
[
6
]
*
b
[
6
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
6
]
+=
0
.
18022376
f
*
t
;
ta
=
0
.
09011186
f
*
a
[
6
]
+
0
.
28209479
f
*
a
[
0
]
+
0
.
15607835
f
*
a
[
8
];
tb
=
0
.
09011186
f
*
b
[
6
]
+
0
.
28209479
f
*
b
[
0
]
+
0
.
15607835
f
*
b
[
8
];
out
[
7
]
+=
ta
*
b
[
7
]
+
tb
*
a
[
7
];
t
=
a
[
7
]
*
b
[
7
];
out
[
6
]
+=
0
.
09011186
f
*
t
;
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
8
]
+=
0
.
15607835
f
*
t
;
ta
=
0
.
14867701
f
*
a
[
9
]
+
0
.
18467439
f
*
a
[
1
]
+
0
.
11516472
f
*
a
[
11
];
tb
=
0
.
14867701
f
*
b
[
9
]
+
0
.
18467439
f
*
b
[
1
]
+
0
.
11516472
f
*
b
[
11
];
out
[
7
]
+=
ta
*
b
[
10
]
+
tb
*
a
[
10
];
out
[
10
]
+=
ta
*
b
[
7
]
+
tb
*
a
[
7
];
t
=
a
[
7
]
*
b
[
10
]
+
a
[
10
]
*
b
[
7
];
out
[
9
]
+=
0
.
14867701
f
*
t
;
out
[
1
]
+=
0
.
18467439
f
*
t
;
out
[
11
]
+=
0
.
11516472
f
*
t
;
ta
=
0
.
05
947080
f
*
a
[
12
]
+
0
.
23359668
f
*
a
[
2
]
+
0
.
11516472
f
*
a
[
14
];
tb
=
0
.
05
947080
f
*
b
[
12
]
+
0
.
23359668
f
*
b
[
2
]
+
0
.
11516472
f
*
b
[
14
];
out
[
7
]
+=
ta
*
b
[
13
]
+
tb
*
a
[
13
];
out
[
13
]
+=
ta
*
b
[
7
]
+
tb
*
a
[
7
];
t
=
a
[
7
]
*
b
[
13
]
+
a
[
13
]
*
b
[
7
];
out
[
12
]
+=
0
.
05
947080
f
*
t
;
out
[
2
]
+=
0
.
23359668
f
*
t
;
out
[
14
]
+=
0
.
11516472
f
*
t
;
ta
=
0
.
14867701
f
*
a
[
15
];
tb
=
0
.
14867701
f
*
b
[
15
];
out
[
7
]
+=
ta
*
b
[
14
]
+
tb
*
a
[
14
];
out
[
14
]
+=
ta
*
b
[
7
]
+
tb
*
a
[
7
];
t
=
a
[
7
]
*
b
[
14
]
+
a
[
14
]
*
b
[
7
];
out
[
15
]
+=
0
.
14867701
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
]
-
0
.
18022375
f
*
a
[
6
];
tb
=
0
.
28209479
f
*
b
[
0
]
-
0
.
18022375
f
*
b
[
6
];
out
[
8
]
+=
ta
*
b
[
8
]
+
tb
*
a
[
8
];
t
=
a
[
8
]
*
b
[
8
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
6
]
-=
0
.
18022375
f
*
t
;
ta
=
-
0
.
09403160
f
*
a
[
11
];
tb
=
-
0
.
09403160
f
*
b
[
11
];
out
[
8
]
+=
ta
*
b
[
9
]
+
tb
*
a
[
9
];
out
[
9
]
+=
ta
*
b
[
8
]
+
tb
*
a
[
8
];
t
=
a
[
8
]
*
b
[
9
]
+
a
[
9
]
*
b
[
8
];
out
[
11
]
-=
0
.
09403160
f
*
t
;
ta
=
-
0
.
09403160
f
*
a
[
15
];
tb
=
-
0
.
09403160
f
*
b
[
15
];
out
[
8
]
+=
ta
*
b
[
13
]
+
tb
*
a
[
13
];
out
[
13
]
+=
ta
*
b
[
8
]
+
tb
*
a
[
8
];
t
=
a
[
8
]
*
b
[
13
]
+
a
[
13
]
*
b
[
8
];
out
[
15
]
-=
0
.
09403160
f
*
t
;
ta
=
0
.
18467439
f
*
a
[
2
]
-
0
.
18806319
f
*
a
[
12
];
tb
=
0
.
18467439
f
*
b
[
2
]
-
0
.
18806319
f
*
b
[
12
];
out
[
8
]
+=
ta
*
b
[
14
]
+
tb
*
a
[
14
];
out
[
14
]
+=
ta
*
b
[
8
]
+
tb
*
a
[
8
];
t
=
a
[
8
]
*
b
[
14
]
+
a
[
14
]
*
b
[
8
];
out
[
2
]
+=
0
.
18467439
f
*
t
;
out
[
12
]
-=
0
.
18806319
f
*
t
;
ta
=
-
0
.
21026104
f
*
a
[
6
]
+
0
.
28209479
f
*
a
[
0
];
tb
=
-
0
.
21026104
f
*
b
[
6
]
+
0
.
28209479
f
*
b
[
0
];
out
[
9
]
+=
ta
*
b
[
9
]
+
tb
*
a
[
9
];
t
=
a
[
9
]
*
b
[
9
];
out
[
6
]
-=
0
.
21026104
f
*
t
;
out
[
0
]
+=
0
.
28209479
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
];
tb
=
0
.
28209479
f
*
b
[
0
];
out
[
10
]
+=
ta
*
b
[
10
]
+
tb
*
a
[
10
];
t
=
a
[
10
]
*
b
[
10
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
]
+
0
.
12615663
f
*
a
[
6
]
-
0
.
14567312
f
*
a
[
8
];
tb
=
0
.
28209479
f
*
b
[
0
]
+
0
.
12615663
f
*
b
[
6
]
-
0
.
14567312
f
*
b
[
8
];
out
[
11
]
+=
ta
*
b
[
11
]
+
tb
*
a
[
11
];
t
=
a
[
11
]
*
b
[
11
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
6
]
+=
0
.
12615663
f
*
t
;
out
[
8
]
-=
0
.
14567312
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
]
+
0
.
16820885
f
*
a
[
6
];
tb
=
0
.
28209479
f
*
b
[
0
]
+
0
.
16820885
f
*
b
[
6
];
out
[
12
]
+=
ta
*
b
[
12
]
+
tb
*
a
[
12
];
t
=
a
[
12
]
*
b
[
12
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
6
]
+=
0
.
16820885
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
]
+
0
.
14567312
f
*
a
[
8
]
+
0
.
12615663
f
*
a
[
6
];
tb
=
0
.
28209479
f
*
b
[
0
]
+
0
.
14567312
f
*
b
[
8
]
+
0
.
12615663
f
*
b
[
6
];
out
[
13
]
+=
ta
*
b
[
13
]
+
tb
*
a
[
13
];
t
=
a
[
13
]
*
b
[
13
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
8
]
+=
0
.
14567312
f
*
t
;
out
[
6
]
+=
0
.
12615663
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
];
tb
=
0
.
28209479
f
*
b
[
0
];
out
[
14
]
+=
ta
*
b
[
14
]
+
tb
*
a
[
14
];
t
=
a
[
14
]
*
b
[
14
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
ta
=
0
.
28209479
f
*
a
[
0
]
-
0
.
21026104
f
*
a
[
6
];
tb
=
0
.
28209479
f
*
b
[
0
]
-
0
.
21026104
f
*
b
[
6
];
out
[
15
]
+=
ta
*
b
[
15
]
+
tb
*
a
[
15
];
t
=
a
[
15
]
*
b
[
15
];
out
[
0
]
+=
0
.
28209479
f
*
t
;
out
[
6
]
-=
0
.
21026104
f
*
t
;
return
out
;
}
static
void
rotate_X
(
FLOAT
*
out
,
UINT
order
,
FLOAT
a
,
FLOAT
*
in
)
{
out
[
0
]
=
in
[
0
];
...
...
dlls/d3dx9_36/tests/math.c
View file @
b8cfe423
...
...
@@ -2663,6 +2663,55 @@ static void test_D3DXSHMultiply3(void)
ok
(
relative_error
(
c
[
i
],
expected
[
i
])
<
admitted_error
,
"Expected[%d] = %f, received = %f
\n
"
,
i
,
expected
[
i
],
c
[
i
]);
}
static
void
test_D3DXSHMultiply4
(
void
)
{
unsigned
int
i
;
FLOAT
a
[
20
],
b
[
20
],
c
[
20
];
/* D3DXSHMultiply4 only modifies the first 16 elements of the array */
const
FLOAT
expected
[]
=
{
/* c, a, b */
14
.
182599
f
,
2
.
615703
f
,
12
.
828601
f
,
9
.
820596
f
,
3
.
03
9696
f
,
4
.
530442
f
,
5
.
820584
f
,
12
.
249846
f
,
2
.
194346
f
,
3
.
900152
f
,
5
.
416609
f
,
5
.
601813
f
,
0
.
959982
f
,
7
.
037550
f
,
3
.
625230
f
,
0
.
463601
f
,
16
.
0
f
,
17
.
0
f
,
18
.
0
f
,
19
.
0
f
,
/* c, c, b */
-
211441
.
265625
f
,
-
2529
.
157715
f
,
-
10023
.
393555
f
,
-
441
.
277191
f
,
-
163
.
994385
f
,
-
526
.
305115
f
,
29636
.
187500
f
,
-
3931
.
830811
f
,
-
13577
.
111328
f
,
-
3978
.
973877
f
,
-
10330
.
341797
f
,
-
13779
.
787109
f
,
-
16685
.
109375
f
,
-
44981
.
375000
f
,
-
73269
.
742188
f
,
-
95237
.
335938
f
,
16
.
0
f
,
17
.
0
f
,
18
.
0
f
,
19
.
0
f
,
/* c, c, c */
0
.
236682
f
,
-
0
.
717649
f
,
-
0
.
180500
f
,
-
0
.
077124
f
,
0
.
144831
f
,
0
.
573286
f
,
-
0
.
337959
f
,
0
.
0556
94
f
,
-
0
.
442100
f
,
0
.
147702
f
,
-
0
.
055157
f
,
0
.
084337
f
,
0
.
179877
f
,
0
.
00
9099
f
,
0
.
232200
f
,
0
.
074142
f
,
1
.
6
f
,
1
.
7
f
,
1
.
8
f
,
1
.
9
f
,
};
for
(
i
=
0
;
i
<
20
;
i
++
)
{
a
[
i
]
=
1
.
0
f
+
i
/
100
.
0
f
;
b
[
i
]
=
3
.
0
f
-
i
/
100
.
0
f
;
c
[
i
]
=
i
;
}
D3DXSHMultiply4
(
c
,
a
,
b
);
for
(
i
=
0
;
i
<
20
;
i
++
)
ok
(
relative_error
(
c
[
i
],
expected
[
i
])
<
admitted_error
,
"Expected[%d] = %f, received = %f
\n
"
,
i
,
expected
[
i
],
c
[
i
]);
for
(
i
=
0
;
i
<
20
;
i
++
)
{
b
[
i
]
=
3
.
0
f
-
i
/
100
.
0
f
;
c
[
i
]
=
i
;
}
D3DXSHMultiply4
(
c
,
c
,
b
);
for
(
i
=
0
;
i
<
20
;
i
++
)
ok
(
relative_error
(
c
[
i
],
expected
[
20
+
i
])
<
admitted_error
,
"Expected[%d] = %f, received = %f
\n
"
,
i
,
expected
[
20
+
i
],
c
[
i
]);
for
(
i
=
0
;
i
<
20
;
i
++
)
c
[
i
]
=
0
.
1
f
*
i
;
D3DXSHMultiply4
(
c
,
c
,
c
);
for
(
i
=
0
;
i
<
20
;
i
++
)
ok
(
relative_error
(
c
[
i
],
expected
[
40
+
i
])
<
admitted_error
,
"Expected[%d] = %f, received = %f
\n
"
,
i
,
expected
[
40
+
i
],
c
[
i
]);
}
static
void
test_D3DXSHRotate
(
void
)
{
D3DXMATRIX
m
[
4
];
...
...
@@ -2829,6 +2878,7 @@ START_TEST(math)
test_D3DXSHEvalDirectionalLight
();
test_D3DXSHMultiply2
();
test_D3DXSHMultiply3
();
test_D3DXSHMultiply4
();
test_D3DXSHRotate
();
test_D3DXSHRotateZ
();
test_D3DXSHScale
();
...
...
include/d3dx9math.h
View file @
b8cfe423
...
...
@@ -383,6 +383,7 @@ FLOAT* WINAPI D3DXSHEvalDirection(FLOAT *out, UINT order, CONST D3DXVECTOR3 *dir
HRESULT
WINAPI
D3DXSHEvalDirectionalLight
(
UINT
order
,
CONST
D3DXVECTOR3
*
dir
,
FLOAT
Rintensity
,
FLOAT
Gintensity
,
FLOAT
Bintensity
,
FLOAT
*
rout
,
FLOAT
*
gout
,
FLOAT
*
bout
);
FLOAT
*
WINAPI
D3DXSHMultiply2
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
*
WINAPI
D3DXSHMultiply3
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
*
WINAPI
D3DXSHMultiply4
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
*
WINAPI
D3DXSHRotate
(
FLOAT
*
out
,
UINT
order
,
CONST
D3DXMATRIX
*
matrix
,
CONST
FLOAT
*
in
);
FLOAT
*
WINAPI
D3DXSHRotateZ
(
FLOAT
*
out
,
UINT
order
,
FLOAT
angle
,
CONST
FLOAT
*
in
);
FLOAT
*
WINAPI
D3DXSHScale
(
FLOAT
*
out
,
UINT
order
,
CONST
FLOAT
*
a
,
CONST
FLOAT
scale
);
...
...
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