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
68f20f15
Commit
68f20f15
authored
Jun 19, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9_36: Add a test for D3DXGetDeclVertexSize().
parent
56c8a82a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
0 deletions
+98
-0
Makefile.in
dlls/d3dx9_36/tests/Makefile.in
+1
-0
mesh.c
dlls/d3dx9_36/tests/mesh.c
+97
-0
No files found.
dlls/d3dx9_36/tests/Makefile.in
View file @
68f20f15
...
...
@@ -8,6 +8,7 @@ IMPORTS = d3dx9 d3d9 user32 kernel32
CTESTS
=
\
core.c
\
math.c
\
mesh.c
\
shader.c
\
texture.c
...
...
dlls/d3dx9_36/tests/mesh.c
0 → 100644
View file @
68f20f15
/*
* Copyright 2009 Henri Verbeet for CodeWeavers
*
* 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
void
test_get_decl_vertex_size
(
void
)
{
static
const
D3DVERTEXELEMENT9
declaration1
[]
=
{
{
0
,
0
,
D3DDECLTYPE_FLOAT1
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
1
,
0
,
D3DDECLTYPE_FLOAT2
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
2
,
0
,
D3DDECLTYPE_FLOAT3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
3
,
0
,
D3DDECLTYPE_FLOAT4
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
4
,
0
,
D3DDECLTYPE_D3DCOLOR
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
5
,
0
,
D3DDECLTYPE_UBYTE4
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
6
,
0
,
D3DDECLTYPE_SHORT2
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
7
,
0
,
D3DDECLTYPE_SHORT4
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
8
,
0
,
D3DDECLTYPE_UBYTE4N
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
9
,
0
,
D3DDECLTYPE_SHORT2N
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
10
,
0
,
D3DDECLTYPE_SHORT4N
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
11
,
0
,
D3DDECLTYPE_UDEC3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
12
,
0
,
D3DDECLTYPE_DEC3N
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
13
,
0
,
D3DDECLTYPE_FLOAT16_2
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
14
,
0
,
D3DDECLTYPE_FLOAT16_4
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
D3DDECL_END
(),
};
static
const
D3DVERTEXELEMENT9
declaration2
[]
=
{
{
0
,
8
,
D3DDECLTYPE_FLOAT1
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
1
,
8
,
D3DDECLTYPE_FLOAT2
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
2
,
8
,
D3DDECLTYPE_FLOAT3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
3
,
8
,
D3DDECLTYPE_FLOAT4
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
4
,
8
,
D3DDECLTYPE_D3DCOLOR
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
5
,
8
,
D3DDECLTYPE_UBYTE4
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
6
,
8
,
D3DDECLTYPE_SHORT2
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
7
,
8
,
D3DDECLTYPE_SHORT4
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
0
,
8
,
D3DDECLTYPE_UBYTE4N
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
1
,
8
,
D3DDECLTYPE_SHORT2N
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
2
,
8
,
D3DDECLTYPE_SHORT4N
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
3
,
8
,
D3DDECLTYPE_UDEC3
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
4
,
8
,
D3DDECLTYPE_DEC3N
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
5
,
8
,
D3DDECLTYPE_FLOAT16_2
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
6
,
8
,
D3DDECLTYPE_FLOAT16_4
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
{
7
,
8
,
D3DDECLTYPE_FLOAT1
,
D3DDECLMETHOD_DEFAULT
,
D3DDECLUSAGE_POSITION
,
0
},
D3DDECL_END
(),
};
static
const
UINT
sizes1
[]
=
{
4
,
8
,
12
,
16
,
4
,
4
,
4
,
8
,
4
,
4
,
8
,
4
,
4
,
4
,
8
,
0
,
};
static
const
UINT
sizes2
[]
=
{
12
,
16
,
20
,
24
,
12
,
12
,
16
,
16
,
};
unsigned
int
i
;
UINT
size
;
size
=
D3DXGetDeclVertexSize
(
NULL
,
0
);
ok
(
size
==
0
,
"Got size %#x, expected 0.
\n
"
,
size
);
for
(
i
=
0
;
i
<
16
;
++
i
)
{
size
=
D3DXGetDeclVertexSize
(
declaration1
,
i
);
ok
(
size
==
sizes1
[
i
],
"Got size %u for stream %u, expected %u.
\n
"
,
size
,
i
,
sizes1
[
i
]);
}
for
(
i
=
0
;
i
<
8
;
++
i
)
{
size
=
D3DXGetDeclVertexSize
(
declaration2
,
i
);
ok
(
size
==
sizes2
[
i
],
"Got size %u for stream %u, expected %u.
\n
"
,
size
,
i
,
sizes2
[
i
]);
}
}
START_TEST
(
mesh
)
{
test_get_decl_vertex_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