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
828b8278
Commit
828b8278
authored
Dec 22, 2011
by
Rico Schüller
Committed by
Alexandre Julliard
Dec 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add effect parameter value GetFloatArray() test.
parent
47ae7db1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
effect.c
dlls/d3dx9_36/tests/effect.c
+45
-0
No files found.
dlls/d3dx9_36/tests/effect.c
View file @
828b8278
...
...
@@ -757,6 +757,50 @@ static void test_effect_parameter_value_GetFloat(const struct test_effect_parame
}
}
static
void
test_effect_parameter_value_GetFloatArray
(
const
struct
test_effect_parameter_value_result
*
res
,
ID3DXEffect
*
effect
,
const
DWORD
*
res_value
,
D3DXHANDLE
parameter
,
UINT
i
)
{
const
D3DXPARAMETER_DESC
*
res_desc
=
&
res
->
desc
;
LPCSTR
res_full_name
=
res
->
full_name
;
FLOAT
favalue
[
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
];
HRESULT
hr
;
UINT
l
;
DWORD
cmp
=
0xabababab
;
memset
(
favalue
,
0xab
,
sizeof
(
favalue
));
hr
=
effect
->
lpVtbl
->
GetFloatArray
(
effect
,
parameter
,
favalue
,
res_desc
->
Bytes
/
sizeof
(
*
favalue
));
if
(
res_desc
->
Class
==
D3DXPC_SCALAR
||
res_desc
->
Class
==
D3DXPC_VECTOR
||
res_desc
->
Class
==
D3DXPC_MATRIX_ROWS
)
{
ok
(
hr
==
D3D_OK
,
"%u - %s: GetFloatArray failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
hr
,
D3D_OK
);
for
(
l
=
0
;
l
<
res_desc
->
Bytes
/
sizeof
(
*
favalue
);
++
l
)
{
ok
(
compare_float
(
favalue
[
l
],
get_float
(
res_desc
->
Type
,
&
res_value
[
l
]),
512
),
"%u - %s: GetFloatArray favalue[%u] failed, got %f, expected %f
\n
"
,
i
,
res_full_name
,
l
,
favalue
[
l
],
get_float
(
res_desc
->
Type
,
&
res_value
[
l
]));
}
for
(
l
=
res_desc
->
Bytes
/
sizeof
(
*
favalue
);
l
<
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
;
++
l
)
{
ok
(
favalue
[
l
]
==
*
(
FLOAT
*
)
&
cmp
,
"%u - %s: GetFloatArray favalue[%u] failed, got %f, expected %f
\n
"
,
i
,
res_full_name
,
l
,
favalue
[
l
],
*
(
FLOAT
*
)
&
cmp
);
}
}
else
{
ok
(
hr
==
D3DERR_INVALIDCALL
,
"%u - %s: GetFloatArray failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
hr
,
D3DERR_INVALIDCALL
);
for
(
l
=
0
;
l
<
EFFECT_PARAMETER_VALUE_ARRAY_SIZE
;
++
l
)
{
ok
(
favalue
[
l
]
==
*
(
FLOAT
*
)
&
cmp
,
"%u - %s: GetFloatArray favalue[%u] failed, got %f, expected %f
\n
"
,
i
,
res_full_name
,
l
,
favalue
[
l
],
*
(
FLOAT
*
)
&
cmp
);
}
}
}
static
void
test_effect_parameter_value
(
IDirect3DDevice9
*
device
)
{
UINT
i
;
...
...
@@ -832,6 +876,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
test_effect_parameter_value_GetInt
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
test_effect_parameter_value_GetIntArray
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
test_effect_parameter_value_GetFloat
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
test_effect_parameter_value_GetFloatArray
(
&
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