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
88528a78
Commit
88528a78
authored
Jun 06, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Jun 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Add a test for setting / getting vertex shader constants.
parent
1027313e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
shader.c
dlls/d3d9/tests/shader.c
+38
-0
No files found.
dlls/d3d9/tests/shader.c
View file @
88528a78
...
...
@@ -104,6 +104,43 @@ static void test_get_set_vertex_shader(IDirect3DDevice9 *device_ptr)
"Expected hret 0x%lx, current_shader_ptr %p, refcount %d.
\n
"
,
hret
,
current_shader_ptr
,
shader_refcount
,
D3D_OK
,
shader_ptr
,
i
);
}
static
void
test_get_set_vertex_shader_constants
(
IDirect3DDevice9
*
device_ptr
)
{
HRESULT
hret
;
int
int_in
[
4
]
=
{
0xdead0000
,
0xdead0001
,
0xdead0002
,
0xdead0003
};
int
int_out
[
4
]
=
{
0
};
float
float_in
[
4
]
=
{
0
.
14
f
,
0
.
15
f
,
0
.
92
f
,
0
.
65
f
};
float
float_out
[
4
]
=
{
0
};
BOOL
bool_in
[
4
]
=
{
TRUE
,
FALSE
,
FALSE
,
TRUE
};
BOOL
bool_out
[
4
]
=
{
0
};
hret
=
IDirect3DDevice9_SetVertexShaderConstantI
(
device_ptr
,
0
,
int_in
,
1
);
ok
(
hret
==
D3D_OK
,
"SetVertexShaderConstantI returned %#lx.
\n
"
,
hret
);
hret
=
IDirect3DDevice9_SetVertexShaderConstantF
(
device_ptr
,
0
,
float_in
,
1
);
ok
(
hret
==
D3D_OK
,
"SetVertexShaderConstantF returned %#lx.
\n
"
,
hret
);
hret
=
IDirect3DDevice9_SetVertexShaderConstantB
(
device_ptr
,
0
,
bool_in
,
4
);
ok
(
hret
==
D3D_OK
,
"SetVertexShaderConstantB returned %#lx.
\n
"
,
hret
);
hret
=
IDirect3DDevice9_GetVertexShaderConstantI
(
device_ptr
,
0
,
int_out
,
1
);
ok
(
hret
==
D3D_OK
,
"GetVertexShaderConstantI returned %#lx.
\n
"
,
hret
);
hret
=
IDirect3DDevice9_GetVertexShaderConstantF
(
device_ptr
,
0
,
float_out
,
1
);
ok
(
hret
==
D3D_OK
,
"GetVertexShaderConstantF returned %#lx.
\n
"
,
hret
);
hret
=
IDirect3DDevice9_GetVertexShaderConstantB
(
device_ptr
,
0
,
bool_out
,
4
);
ok
(
hret
==
D3D_OK
,
"GetVertexShaderConstantB returned %#lx.
\n
"
,
hret
);
/* The constant arrays aren't shared between I/F/B, so they shouldn't
* overwrite eachother's values */
ok
(
!
memcmp
(
int_in
,
int_out
,
sizeof
(
int_in
)),
"Int constant data doesn't match (%#x, %#x, %#x, %#x).
\n
"
,
int_out
[
0
],
int_out
[
1
],
int_out
[
2
],
int_out
[
3
]);
ok
(
!
memcmp
(
float_in
,
float_out
,
sizeof
(
float_in
)),
"Float constant data doesn't match (%f, %f, %f, %f).
\n
"
,
float_out
[
0
],
float_out
[
1
],
float_out
[
2
],
float_out
[
3
]);
ok
(
!
memcmp
(
bool_in
,
bool_out
,
sizeof
(
bool_in
)),
"Bool constant data doesn't match (%#x, %#x, %#x, %#x).
\n
"
,
bool_out
[
0
],
bool_out
[
1
],
bool_out
[
2
],
bool_out
[
3
]);
}
static
void
test_get_set_pixel_shader
(
IDirect3DDevice9
*
device_ptr
)
{
static
DWORD
simple_ps
[]
=
{
0xFFFF0101
,
/* ps_1_1 */
...
...
@@ -161,6 +198,7 @@ START_TEST(shader)
if
(
caps
.
VertexShaderVersion
&
0xffff
)
{
test_get_set_vertex_shader
(
device_ptr
);
test_get_set_vertex_shader_constants
(
device_ptr
);
}
else
trace
(
"No vertex shader support, skipping test
\n
"
);
...
...
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