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
f757f3fb
Commit
f757f3fb
authored
Jul 13, 2012
by
Nozomi Kodama
Committed by
Alexandre Julliard
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Implementation of D3DXSHMultiply2.
parent
1ceec8c7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
1 deletion
+42
-1
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+1
-1
math.c
dlls/d3dx9_36/math.c
+17
-0
math.c
dlls/d3dx9_36/tests/math.c
+23
-0
d3dx9math.h
include/d3dx9math.h
+1
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
f757f3fb
...
@@ -279,7 +279,7 @@
...
@@ -279,7 +279,7 @@
@ stub D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr)
@ stub D3DXSHEvalDirectionalLight(long ptr long long long long ptr ptr ptr)
@ stub D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr)
@ stub D3DXSHEvalHemisphereLight(long ptr long long ptr ptr ptr)
@ stub D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr)
@ stub D3DXSHEvalSphericalLight(long ptr long long long long ptr ptr ptr)
@ st
ub
D3DXSHMultiply2(ptr ptr ptr)
@ st
dcall
D3DXSHMultiply2(ptr ptr ptr)
@ stdcall D3DXSHMultiply3(ptr ptr ptr)
@ stdcall D3DXSHMultiply3(ptr ptr ptr)
@ stub D3DXSHMultiply4(ptr ptr ptr)
@ stub D3DXSHMultiply4(ptr ptr ptr)
@ stub D3DXSHMultiply5(ptr ptr ptr)
@ stub D3DXSHMultiply5(ptr ptr ptr)
...
...
dlls/d3dx9_36/math.c
View file @
f757f3fb
...
@@ -1995,6 +1995,23 @@ FLOAT WINAPI D3DXSHDot(UINT order, CONST FLOAT *a, CONST FLOAT *b)
...
@@ -1995,6 +1995,23 @@ FLOAT WINAPI D3DXSHDot(UINT order, CONST FLOAT *a, CONST FLOAT *b)
return
s
;
return
s
;
}
}
FLOAT
*
WINAPI
D3DXSHMultiply2
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
)
{
FLOAT
ta
,
tb
;
TRACE
(
"(%p, %p, %p)
\n
"
,
out
,
a
,
b
);
ta
=
0
.
28209479
f
*
a
[
0
];
tb
=
0
.
28209479
f
*
b
[
0
];
out
[
0
]
=
0
.
28209479
f
*
D3DXSHDot
(
2
,
a
,
b
);
out
[
1
]
=
ta
*
b
[
1
]
+
tb
*
a
[
1
];
out
[
2
]
=
ta
*
b
[
2
]
+
tb
*
a
[
2
];
out
[
3
]
=
ta
*
b
[
3
]
+
tb
*
a
[
3
];
return
out
;
}
FLOAT
*
WINAPI
D3DXSHMultiply3
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
)
FLOAT
*
WINAPI
D3DXSHMultiply3
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
)
{
{
FLOAT
t
,
ta
,
tb
;
FLOAT
t
,
ta
,
tb
;
...
...
dlls/d3dx9_36/tests/math.c
View file @
f757f3fb
...
@@ -2422,6 +2422,28 @@ static void test_D3DXSHDot(void)
...
@@ -2422,6 +2422,28 @@ static void test_D3DXSHDot(void)
return
;
return
;
}
}
static
void
test_D3DXSHMultiply2
(
void
)
{
unsigned
int
i
;
FLOAT
a
[
20
],
b
[
20
],
c
[
20
];
/* D3DXSHMultiply2 only modifies the first 4 elements of the array */
const
FLOAT
expected
[
20
]
=
{
3
.
418594
f
,
1
.
698211
f
,
1
.
703853
f
,
1
.
709494
f
,
4
.
0
f
,
5
.
0
f
,
6
.
0
f
,
7
.
0
f
,
8
.
0
f
,
9
.
0
f
,
10
.
0
f
,
11
.
0
f
,
12
.
0
f
,
13
.
0
f
,
14
.
0
f
,
15
.
0
f
,
16
.
0
f
,
17
.
0
f
,
18
.
0
f
,
19
.
0
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
;
}
D3DXSHMultiply2
(
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
]);
}
static
void
test_D3DXSHMultiply3
(
void
)
static
void
test_D3DXSHMultiply3
(
void
)
{
{
unsigned
int
i
;
unsigned
int
i
;
...
@@ -2490,6 +2512,7 @@ START_TEST(math)
...
@@ -2490,6 +2512,7 @@ START_TEST(math)
test_D3DXFloat_Array
();
test_D3DXFloat_Array
();
test_D3DXSHAdd
();
test_D3DXSHAdd
();
test_D3DXSHDot
();
test_D3DXSHDot
();
test_D3DXSHMultiply2
();
test_D3DXSHMultiply3
();
test_D3DXSHMultiply3
();
test_D3DXSHScale
();
test_D3DXSHScale
();
}
}
include/d3dx9math.h
View file @
f757f3fb
...
@@ -379,6 +379,7 @@ FLOAT *WINAPI D3DXFloat16To32Array(FLOAT *pout, CONST D3DXFLOAT16 *pin, UINT n);
...
@@ -379,6 +379,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
D3DXSHAdd
(
FLOAT
*
out
,
UINT
order
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
WINAPI
D3DXSHDot
(
UINT
order
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
WINAPI
D3DXSHDot
(
UINT
order
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
*
WINAPI
D3DXSHMultiply2
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
*
WINAPI
D3DXSHMultiply3
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
*
WINAPI
D3DXSHMultiply3
(
FLOAT
*
out
,
CONST
FLOAT
*
a
,
CONST
FLOAT
*
b
);
FLOAT
*
WINAPI
D3DXSHScale
(
FLOAT
*
out
,
UINT
order
,
CONST
FLOAT
*
a
,
CONST
FLOAT
scale
);
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