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
2fb6dcb3
Commit
2fb6dcb3
authored
Jan 16, 2013
by
Rico Schüller
Committed by
Alexandre Julliard
Jan 17, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Use D3DXFloat16To32Array() instead of a custom function.
parent
33c3a756
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
22 deletions
+2
-22
texture.c
dlls/d3dx9_36/tests/texture.c
+2
-22
No files found.
dlls/d3dx9_36/tests/texture.c
View file @
2fb6dcb3
...
...
@@ -106,24 +106,6 @@ static inline void expect_vec4_(unsigned int line, const D3DXVECTOR4 *expected,
got
->
x
,
got
->
y
,
got
->
z
,
got
->
w
);
}
static
inline
float
float_16_to_32
(
unsigned
short
in
)
{
unsigned
short
s
=
(
in
&
0x8000
);
unsigned
short
e
=
(
in
&
0x7C00
)
>>
10
;
unsigned
short
m
=
in
&
0x3FF
;
float
sgn
=
(
s
?
-
1
.
0
f
:
1
.
0
f
);
if
(
e
==
0
)
{
if
(
m
==
0
)
return
sgn
*
0
.
0
f
;
/* +0.0 or -0.0 */
else
return
sgn
*
powf
(
2
,
-
14
.
0
f
)
*
(
m
/
1024
.
0
f
);
}
else
{
return
sgn
*
powf
(
2
,
e
-
15
.
0
f
)
*
(
1
.
0
f
+
(
m
/
1024
.
0
f
));
}
}
static
BOOL
is_autogenmipmap_supported
(
IDirect3DDevice9
*
device
,
D3DRESOURCETYPE
resource_type
)
{
HRESULT
hr
;
...
...
@@ -1071,10 +1053,8 @@ static void test_D3DXFillTexture(IDirect3DDevice9 *device)
{
D3DXVECTOR4
got
,
expected
;
got
.
x
=
float_16_to_32
(
*
ptr
++
);
got
.
y
=
float_16_to_32
(
*
ptr
++
);
got
.
z
=
float_16_to_32
(
*
ptr
++
);
got
.
w
=
float_16_to_32
(
*
ptr
++
);
D3DXFloat16To32Array
((
FLOAT
*
)
&
got
,
(
D3DXFLOAT16
*
)
ptr
,
4
);
ptr
+=
4
;
expected
.
x
=
(
x
+
0
.
5
f
)
/
4
.
0
f
;
expected
.
y
=
(
y
+
0
.
5
f
)
/
4
.
0
f
;
...
...
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