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
6d6603b4
Commit
6d6603b4
authored
Mar 31, 2013
by
Nozomi Kodama
Committed by
Alexandre Julliard
Apr 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implement D3DXSHEvalHemisphereLight.
parent
6247dae2
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
155 additions
and
20 deletions
+155
-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
+46
-0
math.c
dlls/d3dx9_36/tests/math.c
+88
-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 @
6d6603b4
...
...
@@ -269,7 +269,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap
@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC
...
...
dlls/d3dx9_25/d3dx9_25.spec
View file @
6d6603b4
...
...
@@ -269,7 +269,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap
@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC
...
...
dlls/d3dx9_26/d3dx9_26.spec
View file @
6d6603b4
...
...
@@ -273,7 +273,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap
@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC
...
...
dlls/d3dx9_27/d3dx9_27.spec
View file @
6d6603b4
...
...
@@ -273,7 +273,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap
@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC
...
...
dlls/d3dx9_28/d3dx9_28.spec
View file @
6d6603b4
...
...
@@ -278,7 +278,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap
@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC
...
...
dlls/d3dx9_29/d3dx9_29.spec
View file @
6d6603b4
...
...
@@ -278,7 +278,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap
@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC
...
...
dlls/d3dx9_30/d3dx9_30.spec
View file @
6d6603b4
...
...
@@ -278,7 +278,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap
@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC
...
...
dlls/d3dx9_31/d3dx9_31.spec
View file @
6d6603b4
...
...
@@ -275,7 +275,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHProjectCubeMap(long ptr ptr ptr ptr) d3dx9_36.D3DXSHProjectCubeMap
@ stdcall D3DXSHPRTCompSplitMeshSC(ptr long long ptr long ptr long long ptr ptr long ptr ptr ptr ptr ptr) d3dx9_36.D3DXSHPRTCompSplitMeshSC
...
...
dlls/d3dx9_32/d3dx9_32.spec
View file @
6d6603b4
...
...
@@ -275,7 +275,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_33/d3dx9_33.spec
View file @
6d6603b4
...
...
@@ -275,7 +275,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_34/d3dx9_34.spec
View file @
6d6603b4
...
...
@@ -275,7 +275,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_35/d3dx9_35.spec
View file @
6d6603b4
...
...
@@ -275,7 +275,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_36/d3dx9_36.spec
View file @
6d6603b4
...
...
@@ -277,7 +277,7 @@
@ stdcall 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)
@ st
ub D3DXSHEvalHemisphereLight(long ptr long long
ptr ptr ptr)
@ st
dcall D3DXSHEvalHemisphereLight(long ptr int128 int128
ptr ptr ptr)
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr)
@ stdcall D3DXSHMultiply2(ptr ptr ptr)
@ stdcall D3DXSHMultiply3(ptr ptr ptr)
...
...
dlls/d3dx9_36/math.c
View file @
6d6603b4
...
...
@@ -2475,6 +2475,52 @@ HRESULT WINAPI D3DXSHEvalDirectionalLight(UINT order, const D3DXVECTOR3 *dir, FL
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXSHEvalHemisphereLight
(
UINT
order
,
const
D3DXVECTOR3
*
dir
,
D3DXCOLOR
top
,
D3DXCOLOR
bottom
,
FLOAT
*
rout
,
FLOAT
*
gout
,
FLOAT
*
bout
)
{
FLOAT
a
[
2
],
temp
[
4
];
UINT
i
,
j
;
TRACE
(
"order %u, dir %p, rout %p, gout %p, bout %p
\n
"
,
order
,
dir
,
rout
,
gout
,
bout
);
D3DXSHEvalDirection
(
temp
,
2
,
dir
);
a
[
0
]
=
(
top
.
r
+
bottom
.
r
)
*
3
.
0
f
*
D3DX_PI
;
a
[
1
]
=
(
top
.
r
-
bottom
.
r
)
*
D3DX_PI
;
for
(
i
=
0
;
i
<
order
;
i
++
)
for
(
j
=
0
;
j
<
2
*
i
+
1
;
j
++
)
if
(
i
<
2
)
rout
[
i
*
i
+
j
]
=
temp
[
i
*
i
+
j
]
*
a
[
i
];
else
rout
[
i
*
i
+
j
]
=
0
.
0
f
;
if
(
gout
)
{
a
[
0
]
=
(
top
.
g
+
bottom
.
g
)
*
3
.
0
f
*
D3DX_PI
;
a
[
1
]
=
(
top
.
g
-
bottom
.
g
)
*
D3DX_PI
;
for
(
i
=
0
;
i
<
order
;
i
++
)
for
(
j
=
0
;
j
<
2
*
i
+
1
;
j
++
)
if
(
i
<
2
)
gout
[
i
*
i
+
j
]
=
temp
[
i
*
i
+
j
]
*
a
[
i
];
else
gout
[
i
*
i
+
j
]
=
0
.
0
f
;
}
if
(
bout
)
{
a
[
0
]
=
(
top
.
b
+
bottom
.
b
)
*
3
.
0
f
*
D3DX_PI
;
a
[
1
]
=
(
top
.
b
-
bottom
.
b
)
*
D3DX_PI
;
for
(
i
=
0
;
i
<
order
;
i
++
)
for
(
j
=
0
;
j
<
2
*
i
+
1
;
j
++
)
if
(
i
<
2
)
bout
[
i
*
i
+
j
]
=
temp
[
i
*
i
+
j
]
*
a
[
i
];
else
bout
[
i
*
i
+
j
]
=
0
.
0
f
;
}
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXSHEvalSphericalLight
(
UINT
order
,
const
D3DXVECTOR3
*
dir
,
FLOAT
radius
,
FLOAT
Rintensity
,
FLOAT
Gintensity
,
FLOAT
Bintensity
,
FLOAT
*
rout
,
FLOAT
*
gout
,
FLOAT
*
bout
)
{
...
...
dlls/d3dx9_36/tests/math.c
View file @
6d6603b4
...
...
@@ -2815,6 +2815,93 @@ static void test_D3DXSHEvalDirectionalLight(void)
ok
(
hr
==
D3D_OK
,
"Expected %#x, got %#x
\n
"
,
D3D_OK
,
hr
);
}
static
void
test_D3DXSHEvalHemisphereLight
(
void
)
{
D3DXCOLOR
bottom
,
top
;
D3DXVECTOR3
dir
;
FLOAT
bout
[
49
],
expected
,
gout
[
49
],
rout
[
49
];
const
FLOAT
table
[]
=
{
/* Red colour */
23
.
422981
f
,
15
.
859521
f
,
-
36
.
476898
f
,
14
.
537894
f
,
/* Green colour */
19
.
966694
f
,
6
.
096982
f
,
-
14
.
02305
8
f
,
5
.
588900
f
,
/* Blue colour */
24
.
566214
f
,
8
.
546826
f
,
-
19
.
657701
f
,
7
.
834591
f
,
};
struct
{
FLOAT
*
red_received
,
*
green_received
,
*
blue_received
;
const
FLOAT
*
red_expected
,
*
green_expected
,
*
blue_expected
;
const
FLOAT
roffset
,
goffset
,
boffset
;
}
test
[]
=
{
{
rout
,
gout
,
bout
,
table
,
&
table
[
4
],
&
table
[
8
],
1
.
01
f
,
1
.
02
f
,
1
.
03
f
,
},
{
rout
,
rout
,
rout
,
&
table
[
8
],
&
table
[
8
],
&
table
[
8
],
1
.
03
f
,
1
.
03
f
,
1
.
03
f
,
},
{
rout
,
rout
,
bout
,
&
table
[
4
],
&
table
[
4
],
&
table
[
8
],
1
.
02
f
,
1
.
02
f
,
1
.
03
f
,
},
{
rout
,
gout
,
gout
,
table
,
&
table
[
8
],
&
table
[
8
],
1
.
01
f
,
1
.
03
f
,
1
.
03
f
,
},
{
rout
,
gout
,
rout
,
&
table
[
8
],
&
table
[
4
],
&
table
[
8
],
1
.
03
f
,
1
.
02
f
,
1
.
03
f
,
},
/* D3DXSHEvalHemisphereLight accepts NULL green or blue colour. */
{
rout
,
NULL
,
bout
,
table
,
NULL
,
&
table
[
8
],
1
.
01
f
,
1
.
02
f
,
1
.
03
f
,
},
{
rout
,
gout
,
NULL
,
table
,
&
table
[
4
],
NULL
,
1
.
01
f
,
1
.
02
f
,
1
.
03
f
,
},
{
rout
,
NULL
,
NULL
,
table
,
NULL
,
NULL
,
1
.
01
f
,
1
.
02
f
,
1
.
03
f
,
},
};
HRESULT
hr
;
unsigned
int
j
,
l
,
order
;
dir
.
x
=
1
.
1
f
;
dir
.
y
=
1
.
2
f
;
dir
.
z
=
2
.
76
f
;
top
.
r
=
0
.
1
f
;
top
.
g
=
2
.
1
f
;
top
.
b
=
2
.
3
f
;
top
.
a
=
4
.
3
f
;
bottom
.
r
=
8
.
71
f
;
bottom
.
g
=
5
.
41
f
;
bottom
.
b
=
6
.
94
f
;
bottom
.
a
=
8
.
43
f
;
for
(
l
=
0
;
l
<
sizeof
(
test
)
/
sizeof
(
test
[
0
]);
l
++
)
for
(
order
=
D3DXSH_MINORDER
;
order
<=
D3DXSH_MAXORDER
+
1
;
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
=
D3DXSHEvalHemisphereLight
(
order
,
&
dir
,
top
,
bottom
,
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
<
4
)
expected
=
test
[
l
].
red_expected
[
j
];
else
if
(
j
<
order
*
order
)
expected
=
0
.
0
f
;
else
expected
=
test
[
l
].
roffset
+
j
;
ok
(
relative_error
(
test
[
l
].
red_received
[
j
],
expected
)
<
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
<
4
)
expected
=
test
[
l
].
green_expected
[
j
];
else
if
(
j
<
order
*
order
)
expected
=
0
.
0
f
;
else
expected
=
test
[
l
].
goffset
+
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
<
4
)
expected
=
test
[
l
].
blue_expected
[
j
];
else
if
(
j
<
order
*
order
)
expected
=
0
.
0
f
;
else
expected
=
test
[
l
].
boffset
+
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
]);
}
}
}
}
static
void
test_D3DXSHEvalSphericalLight
(
void
)
{
D3DXVECTOR3
dir
;
...
...
@@ -3307,6 +3394,7 @@ START_TEST(math)
test_D3DXSHEvalConeLight
();
test_D3DXSHEvalDirection
();
test_D3DXSHEvalDirectionalLight
();
test_D3DXSHEvalHemisphereLight
();
test_D3DXSHEvalSphericalLight
();
test_D3DXSHMultiply2
();
test_D3DXSHMultiply3
();
...
...
dlls/d3dx9_37/d3dx9_37.spec
View file @
6d6603b4
...
...
@@ -277,7 +277,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_38/d3dx9_38.spec
View file @
6d6603b4
...
...
@@ -277,7 +277,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_39/d3dx9_39.spec
View file @
6d6603b4
...
...
@@ -277,7 +277,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_40/d3dx9_40.spec
View file @
6d6603b4
...
...
@@ -277,7 +277,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_41/d3dx9_41.spec
View file @
6d6603b4
...
...
@@ -277,7 +277,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_42/d3dx9_42.spec
View file @
6d6603b4
...
...
@@ -277,7 +277,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
dlls/d3dx9_43/d3dx9_43.spec
View file @
6d6603b4
...
...
@@ -270,7 +270,7 @@
@ 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
@ stdcall D3DXSHEvalHemisphereLight(long ptr
int128 int128
ptr ptr ptr) d3dx9_36.D3DXSHEvalHemisphereLight
@ stdcall D3DXSHEvalSphericalLight(long ptr float float float float ptr ptr ptr) d3dx9_36.D3DXSHEvalSphericalLight
@ stdcall D3DXSHMultiply2(ptr ptr ptr) d3dx9_36.D3DXSHMultiply2
@ stdcall D3DXSHMultiply3(ptr ptr ptr) d3dx9_36.D3DXSHMultiply3
...
...
include/d3dx9math.h
View file @
6d6603b4
...
...
@@ -391,6 +391,7 @@ 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
);
HRESULT
WINAPI
D3DXSHEvalHemisphereLight
(
UINT
order
,
const
D3DXVECTOR3
*
dir
,
D3DXCOLOR
top
,
D3DXCOLOR
bottom
,
FLOAT
*
rout
,
FLOAT
*
gout
,
FLOAT
*
bout
);
HRESULT
WINAPI
D3DXSHEvalSphericalLight
(
UINT
order
,
const
D3DXVECTOR3
*
dir
,
FLOAT
radius
,
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
);
...
...
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