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
7825fa83
Commit
7825fa83
authored
Jan 12, 2012
by
Rico Schüller
Committed by
Alexandre Julliard
Jan 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Reset effect parameter value data after each try.
parent
5f01e930
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
effect.c
dlls/d3dx9_36/tests/effect.c
+35
-0
No files found.
dlls/d3dx9_36/tests/effect.c
View file @
7825fa83
...
...
@@ -1570,6 +1570,38 @@ static void test_effect_parameter_value_GetTestGroup(const struct test_effect_pa
test_effect_parameter_value_GetMatrixTransposeArray
(
res
,
effect
,
res_value
,
parameter
,
i
);
}
static
void
test_effect_parameter_value_ResetValue
(
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
;
HRESULT
hr
;
if
(
res_desc
->
Class
==
D3DXPC_SCALAR
||
res_desc
->
Class
==
D3DXPC_VECTOR
||
res_desc
->
Class
==
D3DXPC_MATRIX_ROWS
)
{
hr
=
effect
->
lpVtbl
->
SetValue
(
effect
,
parameter
,
res_value
,
res_desc
->
Bytes
);
ok
(
hr
==
D3D_OK
,
"%u - %s: SetValue failed, got %#x, expected %#x
\n
"
,
i
,
res_full_name
,
hr
,
D3D_OK
);
}
else
{
/* nothing to do */
switch
(
res_desc
->
Type
)
{
case
D3DXPT_PIXELSHADER
:
case
D3DXPT_VERTEXSHADER
:
case
D3DXPT_TEXTURE2D
:
case
D3DXPT_STRING
:
break
;
default:
ok
(
0
,
"Type is %u, this should not happen!
\n
"
,
res_desc
->
Type
);
break
;
}
}
}
static
void
test_effect_parameter_value
(
IDirect3DDevice9
*
device
)
{
UINT
i
;
...
...
@@ -1642,6 +1674,8 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
"%u - %s: Warning: Array size to small
\n
"
,
i
,
res_full_name
);
test_effect_parameter_value_GetTestGroup
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
test_effect_parameter_value_ResetValue
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
test_effect_parameter_value_GetTestGroup
(
&
res
[
k
],
effect
,
&
blob
[
res_value_offset
],
parameter
,
i
);
/* SetBool */
bvalue
=
1
;
...
...
@@ -1658,6 +1692,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device)
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