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
9c63b113
Commit
9c63b113
authored
Jan 26, 2012
by
Rico Schüller
Committed by
Alexandre Julliard
Jan 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add effect parameter value SetVector() test.
parent
db156752
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
effect.c
dlls/d3dx9_36/tests/effect.c
+38
-0
No files found.
dlls/d3dx9_36/tests/effect.c
View file @
9c63b113
...
...
@@ -1827,6 +1827,44 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
}
test_effect_parameter_value_GetTestGroup
(
&
res
[
k
],
effect
,
expected_value
,
parameter
,
i
);
test_effect_parameter_value_ResetValue
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
/* SetVector */
fvalue
=
-
1
.
33
;
for
(
l
=
0
;
l
<
4
;
++
l
)
{
*
(
input_value
+
l
)
=
*
(
DWORD
*
)
&
fvalue
;
fvalue
+=
1
.
12
;
}
memcpy
(
expected_value
,
&
blob
[
res_value_offset
],
res_desc
->
Bytes
);
hr
=
effect
->
lpVtbl
->
SetVector
(
effect
,
parameter
,
(
D3DXVECTOR4
*
)
input_value
);
if
(
!
res_desc
->
Elements
&&
(
res_desc
->
Class
==
D3DXPC_SCALAR
||
res_desc
->
Class
==
D3DXPC_VECTOR
))
{
/* only values between 0 and INT_FLOAT_MULTI are valid */
if
(
res_desc
->
Type
==
D3DXPT_INT
&&
res_desc
->
Bytes
==
4
)
{
*
expected_value
=
(
DWORD
)(
max
(
min
(
*
(
FLOAT
*
)(
input_value
+
2
),
1
.
0
f
),
0
.
0
f
)
*
INT_FLOAT_MULTI
);
*
expected_value
+=
((
DWORD
)(
max
(
min
(
*
(
FLOAT
*
)(
input_value
+
1
),
1
.
0
f
),
0
.
0
f
)
*
INT_FLOAT_MULTI
))
<<
8
;
*
expected_value
+=
((
DWORD
)(
max
(
min
(
*
(
FLOAT
*
)
input_value
,
1
.
0
f
),
0
.
0
f
)
*
INT_FLOAT_MULTI
))
<<
16
;
*
expected_value
+=
((
DWORD
)(
max
(
min
(
*
(
FLOAT
*
)(
input_value
+
3
),
1
.
0
f
),
0
.
0
f
)
*
INT_FLOAT_MULTI
))
<<
24
;
}
else
{
for
(
l
=
0
;
l
<
4
;
++
l
)
{
set_number
(
expected_value
+
l
,
res_desc
->
Type
,
input_value
+
l
,
D3DXPT_FLOAT
);
}
}
ok
(
hr
==
D3D_OK
,
"%u - %s: SetVector failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
hr
,
D3D_OK
);
}
else
{
ok
(
hr
==
D3DERR_INVALIDCALL
,
"%u - %s: SetVector failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
hr
,
D3DERR_INVALIDCALL
);
}
test_effect_parameter_value_GetTestGroup
(
&
res
[
k
],
effect
,
expected_value
,
parameter
,
i
);
test_effect_parameter_value_ResetValue
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
}
count
=
effect
->
lpVtbl
->
Release
(
effect
);
...
...
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