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
9e2b0489
Commit
9e2b0489
authored
Jul 14, 2008
by
Luis Busquets
Committed by
Alexandre Julliard
Jul 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Add a test for D3DXGetShaderSize().
parent
9a93a491
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
1 deletion
+62
-1
Makefile.in
dlls/d3dx9_36/tests/Makefile.in
+2
-1
shader.c
dlls/d3dx9_36/tests/shader.c
+60
-0
No files found.
dlls/d3dx9_36/tests/Makefile.in
View file @
9e2b0489
...
...
@@ -6,7 +6,8 @@ TESTDLL = d3dx9_36.dll
IMPORTS
=
d3dx9 kernel32
CTESTS
=
\
math.c
math.c
\
shader.c
@MAKE_TEST_RULES@
...
...
dlls/d3dx9_36/tests/shader.c
0 → 100644
View file @
9e2b0489
/*
* Copyright 2008 Luis Busquets
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "wine/test.h"
#include "d3dx9.h"
static
const
DWORD
simple_vs
[]
=
{
0xfffe0101
,
/* vs_1_1 */
0x0000001f
,
0x80000000
,
0x900f0000
,
/* dcl_position0 v0 */
0x00000009
,
0xc0010000
,
0x90e40000
,
0xa0e40000
,
/* dp4 oPos.x, v0, c0 */
0x00000009
,
0xc0020000
,
0x90e40000
,
0xa0e40001
,
/* dp4 oPos.y, v0, c1 */
0x00000009
,
0xc0040000
,
0x90e40000
,
0xa0e40002
,
/* dp4 oPos.z, v0, c2 */
0x00000009
,
0xc0080000
,
0x90e40000
,
0xa0e40003
,
/* dp4 oPos.w, v0, c3 */
0x0000ffff
};
/* END */
static
const
DWORD
simple_ps
[]
=
{
0xffff0101
,
/* ps_1_1 */
0x00000051
,
0xa00f0001
,
0x3f800000
,
0x00000000
,
0x00000000
,
0x00000000
,
/* def c1 = 1.0, 0.0, 0.0, 0.0 */
0x00000042
,
0xb00f0000
,
/* tex t0 */
0x00000008
,
0x800f0000
,
0xa0e40001
,
0xa0e40000
,
/* dp3 r0, c1, c0 */
0x00000005
,
0x800f0000
,
0x90e40000
,
0x80e40000
,
/* mul r0, v0, r0 */
0x00000005
,
0x800f0000
,
0xb0e40000
,
0x80e40000
,
/* mul r0, t0, r0 */
0x0000ffff
};
/* END */
static
void
test_get_shader_size
(
void
)
{
UINT
shader_size
,
expected
;
shader_size
=
D3DXGetShaderSize
(
simple_vs
);
expected
=
sizeof
(
simple_vs
);
ok
(
shader_size
==
expected
,
"Got shader size %u, expected %u
\n
"
,
shader_size
,
expected
);
shader_size
=
D3DXGetShaderSize
(
simple_ps
);
expected
=
sizeof
(
simple_ps
);
ok
(
shader_size
==
expected
,
"Got shader size %u, expected %u
\n
"
,
shader_size
,
expected
);
shader_size
=
D3DXGetShaderSize
(
NULL
);
ok
(
shader_size
==
0
,
"Got shader size %u, expected 0
\n
"
,
shader_size
);
}
START_TEST
(
shader
)
{
test_get_shader_size
();
}
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