Henri Verbeet : d3dx9_36/tests: Add some more FVF position handling tests.
Alexandre Julliard
julliard at winehq.org
Fri Aug 27 11:11:16 CDT 2010
Module: wine
Branch: master
Commit: 79e4f660904c32163d7b78928af5bfbdabaa562f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=79e4f660904c32163d7b78928af5bfbdabaa562f
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Aug 26 19:05:19 2010 +0200
d3dx9_36/tests: Add some more FVF position handling tests.
---
dlls/d3dx9_36/tests/mesh.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 1853545..882323b 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -679,6 +679,36 @@ static void test_fvf_decl_conversion(void)
};
test_decl_to_fvf(decl, D3DFVF_NORMAL, D3D_OK, __LINE__, 0);
}
+ /* D3DFVF_LASTBETA_UBYTE4 and D3DFVF_LASTBETA_D3DCOLOR are ignored if
+ * there are no blend matrices. */
+ {
+ const D3DVERTEXELEMENT9 decl[] =
+ {
+ {0, 0, D3DDECLTYPE_FLOAT3, 0, D3DDECLUSAGE_POSITION, 0},
+ D3DDECL_END(),
+ };
+ test_fvf_to_decl(D3DFVF_XYZ | D3DFVF_LASTBETA_UBYTE4, decl, D3D_OK, __LINE__, 0);
+ }
+ {
+ const D3DVERTEXELEMENT9 decl[] =
+ {
+ {0, 0, D3DDECLTYPE_FLOAT3, 0, D3DDECLUSAGE_POSITION, 0},
+ D3DDECL_END(),
+ };
+ test_fvf_to_decl(D3DFVF_XYZ | D3DFVF_LASTBETA_D3DCOLOR, decl, D3D_OK, __LINE__, 0);
+ }
+ /* D3DFVF_LASTBETA_UBYTE4 takes precedence over D3DFVF_LASTBETA_D3DCOLOR. */
+ {
+ const D3DVERTEXELEMENT9 decl[] =
+ {
+ {0, 0, D3DDECLTYPE_FLOAT3, 0, D3DDECLUSAGE_POSITION, 0},
+ {0, 12, D3DDECLTYPE_FLOAT4, 0, D3DDECLUSAGE_BLENDWEIGHT, 0},
+ {0, 28, D3DDECLTYPE_UBYTE4, 0, D3DDECLUSAGE_BLENDINDICES, 0},
+ D3DDECL_END(),
+ };
+ test_fvf_to_decl(D3DFVF_XYZB5 | D3DFVF_LASTBETA_D3DCOLOR | D3DFVF_LASTBETA_UBYTE4,
+ decl, D3D_OK, __LINE__, 0);
+ }
/* These are supposed to fail, both ways. */
{
const D3DVERTEXELEMENT9 decl[] =
@@ -692,6 +722,16 @@ static void test_fvf_decl_conversion(void)
{
const D3DVERTEXELEMENT9 decl[] =
{
+ {0, 0, D3DDECLTYPE_FLOAT4, 0, D3DDECLUSAGE_POSITION, 0},
+ {0, 16, D3DDECLTYPE_FLOAT3, 0, D3DDECLUSAGE_NORMAL, 0},
+ D3DDECL_END(),
+ };
+ test_decl_to_fvf(decl, D3DFVF_XYZW | D3DFVF_NORMAL, D3DERR_INVALIDCALL, __LINE__, 0);
+ test_fvf_to_decl(D3DFVF_XYZW | D3DFVF_NORMAL, decl, D3DERR_INVALIDCALL, __LINE__, 0);
+ }
+ {
+ const D3DVERTEXELEMENT9 decl[] =
+ {
{0, 0, D3DDECLTYPE_FLOAT3, 0, D3DDECLUSAGE_POSITION, 0},
{0, 12, D3DDECLTYPE_FLOAT4, 0, D3DDECLUSAGE_BLENDWEIGHT, 0},
{0, 28, D3DDECLTYPE_FLOAT1, 0, D3DDECLUSAGE_BLENDINDICES, 0},
More information about the wine-cvs
mailing list