st/nine: Check for aligned offset in each vertex element

Fixes wine test test_vertex_declaration_alignment()

Reviewed-by: Axel Davy <axel.davy@ens.fr>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Patrick Rudolph 2015-01-16 08:17:07 +01:00 committed by Axel Davy
parent 63221c6f09
commit 792af626d4

View file

@ -184,8 +184,10 @@ NineVertexDeclaration9_ctor( struct NineVertexDeclaration9 *This,
/* wine */
for (This->nelems = 0;
pElements[This->nelems].Stream != 0xFF;
++This->nelems)
++This->nelems) {
user_assert(pElements[This->nelems].Type != D3DDECLTYPE_UNUSED, E_FAIL);
user_assert(!(pElements[This->nelems].Offset & 3), E_FAIL);
}
caps = NineDevice9_GetCaps(This->base.device);
user_assert(This->nelems <= caps->MaxStreams, D3DERR_INVALIDCALL);