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
b9b6b058
Commit
b9b6b058
authored
Aug 01, 2013
by
Rico Schüller
Committed by
Alexandre Julliard
Aug 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Test all registers set by the constant table.
parent
fab44cbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
shader.c
dlls/d3dx9_36/tests/shader.c
+21
-2
No files found.
dlls/d3dx9_36/tests/shader.c
View file @
b9b6b058
...
...
@@ -5912,6 +5912,25 @@ static UINT registerset_compare(IDirect3DDevice9 *device, BOOL is_vs, D3DXREGIST
return
err
;
}
static
UINT
registerset_compare_all
(
IDirect3DDevice9
*
device
,
BOOL
is_vs
,
D3DXREGISTER_SET
regset
,
UINT
start
,
UINT
in_count
,
const
DWORD
*
expected
)
{
D3DXREGISTER_SET
regsets
[]
=
{
D3DXRS_BOOL
,
D3DXRS_INT4
,
D3DXRS_FLOAT4
};
UINT
err
=
0
,
i
;
for
(
i
=
0
;
i
<
sizeof
(
regsets
)
/
sizeof
(
*
regsets
);
i
++
)
{
if
(
regset
==
regsets
[
i
])
err
+=
registerset_compare
(
device
,
is_vs
,
regset
,
start
,
in_count
,
expected
);
else
err
+=
registerset_compare
(
device
,
is_vs
,
regsets
[
i
],
0
,
0
,
NULL
);
err
+=
registerset_compare
(
device
,
!
is_vs
,
regsets
[
i
],
0
,
0
,
NULL
);
}
return
err
;
}
static
HRESULT
registerset_apply
(
ID3DXConstantTable
*
ctable
,
IDirect3DDevice9
*
device
,
D3DXHANDLE
constant
,
UINT
index
,
DWORD
count
,
enum
Type
type
)
{
...
...
@@ -6095,7 +6114,7 @@ static void test_registerset(void)
ok
(
hr
==
D3D_OK
,
"Set*
\"
%s
\"
index %u, count %u failed, got %x, expected %x
\n
"
,
tablename
,
i
,
test
->
in_count_min
,
hr
,
D3D_OK
);
ret
=
registerset_compare
(
device
,
is_vs
,
registerset_data
[
k
].
regset
,
ret
=
registerset_compare
_all
(
device
,
is_vs
,
registerset_data
[
k
].
regset
,
registerset_data
[
k
].
start
,
test
->
out_count
,
test
->
out
);
ok
(
ret
==
0
,
"Get*ShaderConstant
\"
%s
\"
index %u, count %u failed
\n
"
,
tablename
,
i
,
test
->
in_count_min
);
...
...
@@ -6107,7 +6126,7 @@ static void test_registerset(void)
ok
(
hr
==
D3D_OK
,
"Set*
\"
%s
\"
index %u, count %u failed, got %x, expected %x
\n
"
,
tablename
,
i
,
test
->
in_count_max
,
hr
,
D3D_OK
);
ret
=
registerset_compare
(
device
,
is_vs
,
registerset_data
[
k
].
regset
,
ret
=
registerset_compare
_all
(
device
,
is_vs
,
registerset_data
[
k
].
regset
,
registerset_data
[
k
].
start
,
test
->
out_count
,
test
->
out
);
ok
(
ret
==
0
,
"Get*ShaderConstant
\"
%s
\"
index %u, count %u failed
\n
"
,
tablename
,
i
,
test
->
in_count_max
);
}
...
...
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