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
b74fc45b
Commit
b74fc45b
authored
Feb 18, 2014
by
Matteo Bruni
Committed by
Alexandre Julliard
Feb 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add a test for constant tables in FX20 shaders.
parent
fa8a0dc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
shader.c
dlls/d3dx9_36/tests/shader.c
+31
-0
No files found.
dlls/d3dx9_36/tests/shader.c
View file @
b74fc45b
...
...
@@ -279,6 +279,25 @@ static const D3DXCONSTANT_DESC ctab_samplers_expected[] = {
{
"sampler2"
,
D3DXRS_SAMPLER
,
3
,
1
,
D3DXPC_OBJECT
,
D3DXPT_SAMPLER3D
,
1
,
1
,
1
,
0
,
4
,
NULL
},
{
"notsampler"
,
D3DXRS_FLOAT4
,
2
,
1
,
D3DXPC_VECTOR
,
D3DXPT_FLOAT
,
1
,
4
,
1
,
0
,
16
,
NULL
}};
static
const
DWORD
fx_shader_with_ctab
[]
=
{
0x46580200
,
/* FX20 */
0x002efffe
,
FCC_CTAB
,
/* CTAB comment */
0x0000001c
,
0x000000a4
,
0xfffe0300
,
0x00000003
,
0x0000001c
,
0x20008100
,
/* Header */
0x0000009c
,
0x00000058
,
0x00070002
,
0x00000001
,
0x00000064
,
0x00000000
,
/* Constant 1 desc */
0x00000074
,
0x00000002
,
0x00000004
,
0x00000080
,
0x00000000
,
/* Constant 2 desc */
0x00000090
,
0x00040002
,
0x00000003
,
0x00000080
,
0x00000000
,
/* Constant 3 desc */
0x736e6f43
,
0x746e6174
,
0xabab0031
,
/* Constant 1 name string */
0x00030001
,
0x00040001
,
0x00000001
,
0x00000000
,
/* Constant 1 type desc */
0x736e6f43
,
0x746e6174
,
0xabab0032
,
/* Constant 2 name string */
0x00030003
,
0x00040004
,
0x00000001
,
0x00000000
,
/* Constant 2 & 3 type desc */
0x736e6f43
,
0x746e6174
,
0xabab0033
,
/* Constant 3 name string */
0x335f7376
,
0xab00305f
,
/* Target name string */
0x656e6957
,
0x6f727020
,
0x7463656a
,
0xababab00
,
/* Creator name string */
0x0000ffff
/* END */
};
static
void
test_get_shader_size
(
void
)
{
UINT
shader_size
,
expected
;
...
...
@@ -421,6 +440,14 @@ static void test_get_shader_constant_table_ex(void)
"Got result %x, expected %x (D3DXERR_INVALIDDATA)
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
if
(
constant_table
)
ID3DXConstantTable_Release
(
constant_table
);
hr
=
D3DXGetShaderConstantTableEx
(
simple_fx
,
0
,
&
constant_table
);
ok
(
hr
==
D3D_OK
,
"Got result %x, expected 0 (D3D_OK).
\n
"
,
hr
);
ok
(
!
constant_table
,
"D3DXGetShaderConstantTableEx() returned a non-NULL constant table.
\n
"
);
hr
=
D3DXGetShaderConstantTableEx
(
simple_tx
,
0
,
&
constant_table
);
ok
(
hr
==
D3D_OK
,
"Got result %x, expected 0 (D3D_OK).
\n
"
,
hr
);
ok
(
!
constant_table
,
"D3DXGetShaderConstantTableEx() returned a non-NULL constant table.
\n
"
);
hr
=
D3DXGetShaderConstantTableEx
(
shader_with_ctab
,
0
,
&
constant_table
);
ok
(
hr
==
D3D_OK
,
"Got result %x, expected 0 (D3D_OK)
\n
"
,
hr
);
ok
(
constant_table
!=
NULL
,
"D3DXGetShaderConstantTableEx() failed, got NULL
\n
"
);
...
...
@@ -534,6 +561,10 @@ static void test_get_shader_constant_table_ex(void)
ID3DXConstantTable_Release
(
constant_table
);
}
hr
=
D3DXGetShaderConstantTableEx
(
fx_shader_with_ctab
,
0
,
&
constant_table
);
ok
(
hr
==
D3D_OK
,
"Got result %x, expected 0 (D3D_OK).
\n
"
,
hr
);
ok
(
!
constant_table
,
"D3DXGetShaderConstantTableEx() returned a non-NULL constant table.
\n
"
);
}
static
void
test_constant_table
(
const
char
*
test_name
,
const
DWORD
*
ctable_fn
,
...
...
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