summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/vertexdeclaration9.c
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2015-01-16 08:17:07 +0100
committerAxel Davy <[email protected]>2015-02-06 00:07:19 +0100
commit792af626d4e82dae728801ee6ca8c4c0f3d37f68 (patch)
treedb75f20ae4741b8c0e8dac294d77d5a42a0a4d21 /src/gallium/state_trackers/nine/vertexdeclaration9.c
parent63221c6f0944bf82eee07a54c42a473890ee655c (diff)
st/nine: Check for aligned offset in each vertex element
Fixes wine test test_vertex_declaration_alignment() Reviewed-by: Axel Davy <[email protected]> Signed-off-by: Patrick Rudolph <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/vertexdeclaration9.c')
-rw-r--r--src/gallium/state_trackers/nine/vertexdeclaration9.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/vertexdeclaration9.c b/src/gallium/state_trackers/nine/vertexdeclaration9.c
index 49e5937a52e..9e4cb55bc67 100644
--- a/src/gallium/state_trackers/nine/vertexdeclaration9.c
+++ b/src/gallium/state_trackers/nine/vertexdeclaration9.c
@@ -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);