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
9085f1d2
Commit
9085f1d2
authored
Mar 04, 2013
by
Nozomi Kodama
Committed by
Alexandre Julliard
Mar 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement D3DXSHEvalConeLight.
parent
4d92d604
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
255 additions
and
20 deletions
+255
-20
d3dx9_24.spec
dlls/d3dx9_24/d3dx9_24.spec
+1
-1
d3dx9_25.spec
dlls/d3dx9_25/d3dx9_25.spec
+1
-1
d3dx9_26.spec
dlls/d3dx9_26/d3dx9_26.spec
+1
-1
d3dx9_27.spec
dlls/d3dx9_27/d3dx9_27.spec
+1
-1
d3dx9_28.spec
dlls/d3dx9_28/d3dx9_28.spec
+1
-1
d3dx9_29.spec
dlls/d3dx9_29/d3dx9_29.spec
+1
-1
d3dx9_30.spec
dlls/d3dx9_30/d3dx9_30.spec
+1
-1
d3dx9_31.spec
dlls/d3dx9_31/d3dx9_31.spec
+1
-1
d3dx9_32.spec
dlls/d3dx9_32/d3dx9_32.spec
+1
-1
d3dx9_33.spec
dlls/d3dx9_33/d3dx9_33.spec
+1
-1
d3dx9_34.spec
dlls/d3dx9_34/d3dx9_34.spec
+1
-1
d3dx9_35.spec
dlls/d3dx9_35/d3dx9_35.spec
+1
-1
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
math.c
dlls/d3dx9_36/math.c
+73
-0
math.c
dlls/d3dx9_36/tests/math.c
+161
-0
d3dx9_37.spec
dlls/d3dx9_37/d3dx9_37.spec
+1
-1
d3dx9_38.spec
dlls/d3dx9_38/d3dx9_38.spec
+1
-1
d3dx9_39.spec
dlls/d3dx9_39/d3dx9_39.spec
+1
-1
d3dx9_40.spec
dlls/d3dx9_40/d3dx9_40.spec
+1
-1
d3dx9_41.spec
dlls/d3dx9_41/d3dx9_41.spec
+1
-1
d3dx9_42.spec
dlls/d3dx9_42/d3dx9_42.spec
+1
-1
d3dx9_43.spec
dlls/d3dx9_43/d3dx9_43.spec
+1
-1
d3dx9math.h
include/d3dx9math.h
+1
-0
No files found.
dlls/d3dx9_24/d3dx9_24.spec
View file @
9085f1d2
...
...
@@ -266,7 +266,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_25/d3dx9_25.spec
View file @
9085f1d2
...
...
@@ -266,7 +266,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_26/d3dx9_26.spec
View file @
9085f1d2
...
...
@@ -270,7 +270,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_27/d3dx9_27.spec
View file @
9085f1d2
...
...
@@ -270,7 +270,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_28/d3dx9_28.spec
View file @
9085f1d2
...
...
@@ -275,7 +275,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_29/d3dx9_29.spec
View file @
9085f1d2
...
...
@@ -275,7 +275,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_30/d3dx9_30.spec
View file @
9085f1d2
...
...
@@ -275,7 +275,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_31/d3dx9_31.spec
View file @
9085f1d2
...
...
@@ -272,7 +272,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_32/d3dx9_32.spec
View file @
9085f1d2
...
...
@@ -272,7 +272,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_33/d3dx9_33.spec
View file @
9085f1d2
...
...
@@ -272,7 +272,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_34/d3dx9_34.spec
View file @
9085f1d2
...
...
@@ -272,7 +272,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long ptr ptr ptr)
d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float ptr ptr ptr)
d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_35/d3dx9_35.spec
View file @
9085f1d2
...
...
@@ -272,7 +272,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_36/d3dx9_36.spec
View file @
9085f1d2
...
...
@@ -274,7 +274,7 @@
@ stub D3DXSaveVolumeToFileW(ptr long ptr ptr ptr)
@ stdcall D3DXSHAdd(ptr long ptr ptr)
@ stdcall D3DXSHDot(long ptr ptr)
@ st
ub D3DXSHEvalConeLight(long ptr long long long long
ptr ptr ptr)
@ st
dcall D3DXSHEvalConeLight(long ptr float float float float
ptr ptr ptr)
@ stdcall D3DXSHEvalDirection(ptr long ptr)
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr)
@ stub D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr)
...
...
dlls/d3dx9_36/math.c
View file @
9085f1d2
...
...
@@ -2303,6 +2303,79 @@ FLOAT WINAPI D3DXSHDot(UINT order, const FLOAT *a, const FLOAT *b)
return
s
;
}
static
void
weightedcapintegrale
(
FLOAT
*
out
,
FLOAT
order
,
FLOAT
angle
)
{
FLOAT
coeff
[
3
];
coeff
[
0
]
=
cosf
(
angle
);
out
[
0
]
=
2
.
0
f
*
D3DX_PI
*
(
1
.
0
f
-
coeff
[
0
]);
out
[
1
]
=
D3DX_PI
*
sinf
(
angle
)
*
sinf
(
angle
);
if
(
order
<=
2
)
return
;
out
[
2
]
=
coeff
[
0
]
*
out
[
1
];
if
(
order
==
3
)
return
;
coeff
[
1
]
=
coeff
[
0
]
*
coeff
[
0
];
coeff
[
2
]
=
coeff
[
1
]
*
coeff
[
1
];
out
[
3
]
=
D3DX_PI
*
(
-
1
.
25
f
*
coeff
[
2
]
+
1
.
5
f
*
coeff
[
1
]
-
0
.
25
f
);
if
(
order
==
4
)
return
;
out
[
4
]
=
-
0
.
25
f
*
D3DX_PI
*
coeff
[
0
]
*
(
7
.
0
f
*
coeff
[
2
]
-
10
.
0
f
*
coeff
[
1
]
+
3
.
0
f
);
if
(
order
==
5
)
return
;
out
[
5
]
=
D3DX_PI
*
(
-
2
.
625
f
*
coeff
[
2
]
*
coeff
[
1
]
+
4
.
375
f
*
coeff
[
2
]
-
1
.
875
f
*
coeff
[
1
]
+
0
.
125
f
);
}
HRESULT
WINAPI
D3DXSHEvalConeLight
(
UINT
order
,
const
D3DXVECTOR3
*
dir
,
FLOAT
radius
,
FLOAT
Rintensity
,
FLOAT
Gintensity
,
FLOAT
Bintensity
,
FLOAT
*
rout
,
FLOAT
*
gout
,
FLOAT
*
bout
)
{
FLOAT
cap
[
6
],
clamped_angle
,
norm
,
scale
,
temp
;
UINT
i
,
index
,
j
;
TRACE
(
"order %u, dir %p, radius %f, red %f, green %f, blue %f, rout %p, gout %p, bout %p
\n
"
,
order
,
dir
,
radius
,
Rintensity
,
Gintensity
,
Bintensity
,
rout
,
gout
,
bout
);
if
(
radius
<=
0
.
0
f
)
return
D3DXSHEvalDirectionalLight
(
order
,
dir
,
Rintensity
,
Gintensity
,
Bintensity
,
rout
,
gout
,
bout
);
clamped_angle
=
(
radius
>
D3DX_PI
/
2
.
0
f
)
?
(
D3DX_PI
/
2
.
0
f
)
:
radius
;
norm
=
sinf
(
clamped_angle
)
*
sinf
(
clamped_angle
);
if
(
order
>
D3DXSH_MAXORDER
)
{
WARN
(
"Order clamped at D3DXSH_MAXORDER
\n
"
);
order
=
D3DXSH_MAXORDER
;
}
weightedcapintegrale
(
cap
,
order
,
radius
);
D3DXSHEvalDirection
(
rout
,
order
,
dir
);
for
(
i
=
0
;
i
<
order
;
i
++
)
{
scale
=
cap
[
i
]
/
norm
;
for
(
j
=
0
;
j
<
2
*
i
+
1
;
j
++
)
{
index
=
i
*
i
+
j
;
temp
=
rout
[
index
]
*
scale
;
rout
[
index
]
=
temp
*
Rintensity
;
if
(
gout
)
gout
[
index
]
=
temp
*
Gintensity
;
if
(
bout
)
bout
[
index
]
=
temp
*
Bintensity
;
}
}
return
D3D_OK
;
}
FLOAT
*
WINAPI
D3DXSHEvalDirection
(
FLOAT
*
out
,
UINT
order
,
const
D3DXVECTOR3
*
dir
)
{
...
...
dlls/d3dx9_36/tests/math.c
View file @
9085f1d2
...
...
@@ -2481,6 +2481,166 @@ static void test_D3DXSHDot(void)
return
;
}
static
void
test_D3DXSHEvalConeLight
(
void
)
{
D3DXVECTOR3
dir
;
FLOAT
bout
[
49
],
expected
,
gout
[
49
],
rout
[
49
];
const
FLOAT
table
[]
=
{
/* Red colour */
1
.
604815
f
,
-
3
.
131381
f
,
7
.
202175
f
,
-
2
.
870432
f
,
6
.
759296
f
,
-
16
.
959688
f
,
32
.
303082
f
,
-
15
.
546381
f
,
-
0
.
588878
f
,
-
5
.
902123
f
,
40
.
084042
f
,
-
77
.
423569
f
,
137
.
556320
f
,
-
70
.
971603
f
,
-
3
.
492171
f
,
7
.
683092
f
,
-
2
.
129311
f
,
-
35
.
971344
f
,
183
.
086548
f
,
-
312
.
414948
f
,
535
.
091064
f
,
-
286
.
380371
f
,
-
15
.
950727
f
,
46
.
825714
f
,
-
12
.
127637
f
,
11
.
289261
f
,
-
12
.
417809
f
,
-
155
.
03
9566
f
,
681
.
182556
f
,
-
1079
.
733643
f
,
1807
.
650513
f
,
-
989
.
755798
f
,
-
59
.
345467
f
,
201
.
822815
f
,
-
70
.
726486
f
,
7
.
206529
f
,
3
.
101155
f
,
-
3
.
128710
f
,
7
.
196033
f
,
-
2
.
867984
f
,
-
0
.
224708
f
,
0
.
563814
f
,
-
1
.
073
895
f
,
0
.
516829
f
,
0
.
01
9577
f
,
2
.
05
9788
f
,
-
13
.
988971
f
,
27
.
02012
8
f
,
-
48
.
005
917
f
,
24
.
768450
f
,
1
.
218736
f
,
-
2
.
681329
f
,
-
0
.
088639
f
,
-
1
.
497410
f
,
7
.
621501
f
,
-
13
.
005165
f
,
22
.
274696
f
,
-
11
.
921401
f
,
-
0
.
663995
f
,
1
.
949254
f
,
-
0
.
504848
f
,
4
.
168484
f
,
-
4
.
585193
f
,
-
57
.
247314
f
,
251
.
522095
f
,
-
398
.
684387
f
,
667
.
462891
f
,
-
365
.
460693
f
,
-
21
.
912912
f
,
74
.
521721
f
,
-
26
.
115280
f
,
2
.
660963
f
,
/* Green colour */
2
.
454422
f
,
-
4
.
789170
f
,
11
.
0150
91
f
,
-
4
.
390072
f
,
10
.
337747
f
,
-
25
.
938347
f
,
49
.
404713
f
,
-
23
.
776817
f
,
-
0
.
900637
f
,
-
9
.
026776
f
,
61
.
305000
f
,
-
118
.
412514
f
,
210
.
380249
f
,
-
108
.
544792
f
,
-
5
.
340967
f
,
11
.
750610
f
,
-
3
.
256593
f
,
-
55
.
014
996
f
,
280
.
01470
9
f
,
-
477
.
811066
f
,
818
.
374512
f
,
-
437
.
993469
f
,
-
24
.
395227
f
,
71
.
615799
f
,
-
18
.
548151
f
,
17
.
265928
f
,
-
18
.
991943
f
,
-
237
.
119324
f
,
1041
.
808594
f
,
-
1651
.
357300
f
,
2764
.
642090
f
,
-
1513
.
744141
f
,
-
90
.
763657
f
,
308
.
670197
f
,
-
108
.
169922
f
,
11
.
021750
f
,
4
.
742942
f
,
-
4
.
785086
f
,
11
.
0056
97
f
,
-
4
.
386329
f
,
-
0
.
343672
f
,
0
.
862303
f
,
-
1
.
642427
f
,
0
.
790444
f
,
0
.
02
9941
f
,
3
.
150264
f
,
-
21
.
394896
f
,
41
.
324898
f
,
-
73
.
420807
f
,
37
.
881153
f
,
1
.
863950
f
,
-
4
.
100857
f
,
-
0
.
135565
f
,
-
2
.
290156
f
,
11
.
656413
f
,
-
19
.
890251
f
,
34
.
0671
81
f
,
-
18
.
232729
f
,
-
1
.
015521
f
,
2
.
981212
f
,
-
0
.
772120
f
,
6
.
375328
f
,
-
7
.
01264
8
f
,
-
87
.
554710
f
,
384
.
680817
f
,
-
609
.
752563
f
,
1020
.
825500
f
,
-
558
.
939819
f
,
-
33
.
513863
f
,
113
.
974388
f
,
-
39
.
941013
f
,
4
.
06
9707
f
,
/* Blue colour */
3
.
304030
f
,
-
6
.
446959
f
,
14
.
828006
f
,
-
5
.
909713
f
,
13
.
916198
f
,
-
34
.
917004
f
,
66
.
506340
f
,
-
32
.
007256
f
,
-
1
.
212396
f
,
-
12
.
151429
f
,
82
.
525963
f
,
-
159
.
401459
f
,
283
.
204193
f
,
-
146
.
117996
f
,
-
7
.
189764
f
,
15
.
818130
f
,
-
4
.
383876
f
,
-
74
.
05
8655
f
,
376
.
942871
f
,
-
643
.
207214
f
,
1101
.
658081
f
,
-
589
.
606628
f
,
-
32
.
839729
f
,
96
.
405884
f
,
-
24
.
968664
f
,
23
.
242596
f
,
-
25
.
566080
f
,
-
319
.
199097
f
,
1402
.
434692
f
,
-
2222
.
980957
f
,
3721
.
633545
f
,
-
2037
.
732544
f
,
-
122
.
181847
f
,
415
.
517578
f
,
-
145
.
613358
f
,
14
.
836972
f
,
6
.
384730
f
,
-
6
.
441462
f
,
14
.
815362
f
,
-
5
.
904673
f
,
-
0
.
462635
f
,
1
.
160793
f
,
-
2
.
210959
f
,
1
.
064060
f
,
0
.
040305
f
,
4
.
240739
f
,
-
28
.
800821
f
,
55
.
629673
f
,
-
98
.
835709
f
,
50
.
993862
f
,
2
.
509163
f
,
-
5
.
520384
f
,
-
0
.
182491
f
,
-
3
.
082903
f
,
15
.
691326
f
,
-
26
.
775339
f
,
45
.
859665
f
,
-
24
.
544060
f
,
-
1
.
367048
f
,
4
.
013170
f
,
-
1
.
03
9392
f
,
8
.
582172
f
,
-
9
.
440103
f
,
-
117
.
862114
f
,
517
.
839600
f
,
-
820
.
820740
f
,
1374
.
188232
f
,
-
752
.
419067
f
,
-
45
.
114819
f
,
153
.
427063
f
,
-
53
.
766754
f
,
5
.
478452
f
,
};
struct
{
FLOAT
*
red_received
,
*
green_received
,
*
blue_received
;
const
FLOAT
*
red_expected
,
*
green_expected
,
*
blue_expected
;
FLOAT
radius
,
roffset
,
goffset
,
boffset
;
}
test
[]
=
{
{
rout
,
gout
,
bout
,
table
,
&
table
[
72
],
&
table
[
144
],
0
.
5
f
,
1
.
01
f
,
1
.
02
f
,
1
.
03
f
,
},
{
rout
,
gout
,
bout
,
&
table
[
36
],
&
table
[
108
],
&
table
[
180
],
1
.
6
f
,
1
.
01
f
,
1
.
02
f
,
1
.
03
f
,
},
{
rout
,
rout
,
rout
,
&
table
[
144
],
&
table
[
144
],
&
table
[
144
],
0
.
5
f
,
1
.
03
f
,
1
.
03
f
,
1
.
03
f
,
},
{
rout
,
rout
,
bout
,
&
table
[
72
],
&
table
[
72
],
&
table
[
144
],
0
.
5
,
1
.
02
f
,
1
.
02
f
,
1
.
03
f
,
},
{
rout
,
gout
,
gout
,
table
,
&
table
[
144
],
&
table
[
144
],
0
.
5
f
,
1
.
01
f
,
1
.
03
f
,
1
.
03
f
,
},
{
rout
,
gout
,
rout
,
&
table
[
144
],
&
table
[
72
],
&
table
[
144
],
0
.
5
f
,
1
.
03
f
,
1
.
02
f
,
1
.
03
f
,
},
/* D3DXSHEvalConeLight accepts NULL green or blue colour. */
{
rout
,
NULL
,
bout
,
table
,
NULL
,
&
table
[
144
],
0
.
5
f
,
1
.
01
f
,
0
.
0
f
,
1
.
03
f
,
},
{
rout
,
gout
,
NULL
,
table
,
&
table
[
72
],
NULL
,
0
.
5
f
,
1
.
01
f
,
1
.
02
f
,
0
.
0
f
,
},
{
rout
,
NULL
,
NULL
,
table
,
NULL
,
NULL
,
0
.
5
f
,
1
.
01
f
,
0
.
0
f
,
0
.
0
f
,
},
};
HRESULT
hr
;
unsigned
int
j
,
l
,
order
;
dir
.
x
=
1
.
1
f
;
dir
.
y
=
1
.
2
f
;
dir
.
z
=
2
.
76
f
;
for
(
l
=
0
;
l
<
sizeof
(
test
)
/
sizeof
(
test
[
0
]);
l
++
)
{
for
(
order
=
D3DXSH_MINORDER
;
order
<=
D3DXSH_MAXORDER
;
order
++
)
{
for
(
j
=
0
;
j
<
49
;
j
++
)
{
test
[
l
].
red_received
[
j
]
=
1
.
01
f
+
j
;
if
(
test
[
l
].
green_received
)
test
[
l
].
green_received
[
j
]
=
1
.
02
f
+
j
;
if
(
test
[
l
].
blue_received
)
test
[
l
].
blue_received
[
j
]
=
1
.
03
f
+
j
;
}
hr
=
D3DXSHEvalConeLight
(
order
,
&
dir
,
test
[
l
].
radius
,
1
.
7
f
,
2
.
6
f
,
3
.
5
f
,
test
[
l
].
red_received
,
test
[
l
].
green_received
,
test
[
l
].
blue_received
);
ok
(
hr
==
D3D_OK
,
"Expected %#x, got %#x
\n
"
,
D3D_OK
,
hr
);
for
(
j
=
0
;
j
<
49
;
j
++
)
{
if
(
j
>=
order
*
order
)
expected
=
j
+
test
[
l
].
roffset
;
else
expected
=
test
[
l
].
red_expected
[
j
];
ok
(
relative_error
(
expected
,
test
[
l
].
red_received
[
j
])
<
admitted_error
,
"Red: case %u, order %u: expected[%u] = %f, received %f
\n
"
,
l
,
order
,
j
,
expected
,
test
[
l
].
red_received
[
j
]);
if
(
test
[
l
].
green_received
)
{
if
(
j
>=
order
*
order
)
expected
=
j
+
test
[
l
].
goffset
;
else
expected
=
test
[
l
].
green_expected
[
j
];
ok
(
relative_error
(
expected
,
test
[
l
].
green_received
[
j
])
<
admitted_error
,
"Green: case %u, order %u: expected[%u] = %f, received %f
\n
"
,
l
,
order
,
j
,
expected
,
test
[
l
].
green_received
[
j
]);
}
if
(
test
[
l
].
blue_received
)
{
if
(
j
>=
order
*
order
)
expected
=
j
+
test
[
l
].
boffset
;
else
expected
=
test
[
l
].
blue_expected
[
j
];
ok
(
relative_error
(
expected
,
test
[
l
].
blue_received
[
j
])
<
admitted_error
,
"Blue: case %u, order %u: expected[%u] = %f, received %f
\n
"
,
l
,
order
,
j
,
expected
,
test
[
l
].
blue_received
[
j
]);
}
}
}
}
/* Cone light with radius <= 0.0f behaves as a directional light */
for
(
order
=
D3DXSH_MINORDER
;
order
<=
D3DXSH_MAXORDER
;
order
++
)
{
FLOAT
blue
[
49
],
green
[
49
],
red
[
49
];
for
(
j
=
0
;
j
<
49
;
j
++
)
{
rout
[
j
]
=
1
.
01
f
+
j
;
gout
[
j
]
=
1
.
02
f
+
j
;
bout
[
j
]
=
1
.
03
f
+
j
;
red
[
j
]
=
1
.
01
f
+
j
;
green
[
j
]
=
1
.
02
f
+
j
;
blue
[
j
]
=
1
.
03
f
+
j
;
}
hr
=
D3DXSHEvalConeLight
(
order
,
&
dir
,
-
0
.
1
f
,
1
.
7
f
,
2
.
6
f
,
3
.
5
f
,
rout
,
gout
,
bout
);
ok
(
hr
==
D3D_OK
,
"Expected %#x, got %#x
\n
"
,
D3D_OK
,
hr
);
D3DXSHEvalDirectionalLight
(
order
,
&
dir
,
1
.
7
f
,
2
.
6
f
,
3
.
5
f
,
red
,
green
,
blue
);
for
(
j
=
0
;
j
<
49
;
j
++
)
{
expected
=
red
[
j
];
ok
(
relative_error
(
expected
,
rout
[
j
])
<
admitted_error
,
"Red: case %u, order %u: expected[%u] = %f, received %f
\n
"
,
l
,
order
,
j
,
expected
,
rout
[
j
]);
expected
=
green
[
j
];
ok
(
relative_error
(
expected
,
gout
[
j
])
<
admitted_error
,
"Green: case %u, order %u: expected[%u] = %f, received %f
\n
"
,
l
,
order
,
j
,
expected
,
gout
[
j
]);
expected
=
blue
[
j
];
ok
(
relative_error
(
expected
,
bout
[
j
])
<
admitted_error
,
"Blue: case %u, order %u: expected[%u] = %f, received %f
\n
"
,
l
,
order
,
j
,
expected
,
bout
[
j
]);
}
}
/* D3DXSHEvalConeLight accepts order < D3DXSH_MINORDER or order > D3DXSH_MAXORDER. But tests in native windows show that the colour outputs are not set */
hr
=
D3DXSHEvalConeLight
(
7
,
&
dir
,
0
.
5
f
,
1
.
0
f
,
2
.
0
f
,
3
.
0
f
,
rout
,
gout
,
bout
);
ok
(
hr
==
D3D_OK
,
"Expected %#x, got %#x
\n
"
,
D3D_OK
,
hr
);
hr
=
D3DXSHEvalConeLight
(
0
,
&
dir
,
0
.
5
f
,
1
.
0
f
,
2
.
0
f
,
3
.
0
f
,
rout
,
gout
,
bout
);
ok
(
hr
==
D3D_OK
,
"Expected %#x, got %#x
\n
"
,
D3D_OK
,
hr
);
hr
=
D3DXSHEvalConeLight
(
1
,
&
dir
,
0
.
5
f
,
1
.
0
f
,
2
.
0
f
,
3
.
0
f
,
rout
,
gout
,
bout
);
ok
(
hr
==
D3D_OK
,
"Expected %#x, got %#x
\n
"
,
D3D_OK
,
hr
);
}
static
void
test_D3DXSHEvalDirection
(
void
)
{
unsigned
int
i
,
order
;
...
...
@@ -2997,6 +3157,7 @@ START_TEST(math)
test_D3DXFloat_Array
();
test_D3DXSHAdd
();
test_D3DXSHDot
();
test_D3DXSHEvalConeLight
();
test_D3DXSHEvalDirection
();
test_D3DXSHEvalDirectionalLight
();
test_D3DXSHMultiply2
();
...
...
dlls/d3dx9_37/d3dx9_37.spec
View file @
9085f1d2
...
...
@@ -274,7 +274,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_38/d3dx9_38.spec
View file @
9085f1d2
...
...
@@ -274,7 +274,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_39/d3dx9_39.spec
View file @
9085f1d2
...
...
@@ -274,7 +274,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_40/d3dx9_40.spec
View file @
9085f1d2
...
...
@@ -274,7 +274,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_41/d3dx9_41.spec
View file @
9085f1d2
...
...
@@ -274,7 +274,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_42/d3dx9_42.spec
View file @
9085f1d2
...
...
@@ -274,7 +274,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
dlls/d3dx9_43/d3dx9_43.spec
View file @
9085f1d2
...
...
@@ -267,7 +267,7 @@
@ stdcall D3DXSaveVolumeToFileW(ptr long ptr ptr ptr) d3dx9_36.D3DXSaveVolumeToFileW
@ stdcall D3DXSHAdd(ptr long ptr ptr) d3dx9_36.D3DXSHAdd
@ stdcall D3DXSHDot(long ptr ptr) d3dx9_36.D3DXSHDot
@ stdcall D3DXSHEvalConeLight(long ptr
long long long long
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalConeLight(long ptr
float float float float
ptr ptr ptr) d3dx9_36.D3DXSHEvalConeLight
@ stdcall D3DXSHEvalDirection(ptr long ptr) d3dx9_36.D3DXSHEvalDirection
@ stdcall D3DXSHEvalDirectionalLight(long ptr float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalDirectionalLight
@ stdcall D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
...
...
include/d3dx9math.h
View file @
9085f1d2
...
...
@@ -388,6 +388,7 @@ FLOAT *WINAPI D3DXFloat16To32Array(FLOAT *pout, const D3DXFLOAT16 *pin, UINT n);
FLOAT
*
WINAPI
D3DXSHAdd
(
FLOAT
*
out
,
UINT
order
,
const
FLOAT
*
a
,
const
FLOAT
*
b
);
FLOAT
WINAPI
D3DXSHDot
(
UINT
order
,
const
FLOAT
*
a
,
const
FLOAT
*
b
);
HRESULT
WINAPI
D3DXSHEvalConeLight
(
UINT
order
,
const
D3DXVECTOR3
*
dir
,
FLOAT
radius
,
FLOAT
Rintensity
,
FLOAT
Gintensity
,
FLOAT
Bintensity
,
FLOAT
*
rout
,
FLOAT
*
gout
,
FLOAT
*
bout
);
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
);
...
...
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