summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/vertexdeclaration9.c
diff options
context:
space:
mode:
authorPatrick Rudolph <[email protected]>2015-01-15 09:43:33 +0100
committerAxel Davy <[email protected]>2015-02-06 00:07:19 +0100
commit33617ef296efac88cd7b8b760ff3a8c47669e424 (patch)
tree358db8729c3fb55ee68329aa71211fd31e78e230 /src/gallium/state_trackers/nine/vertexdeclaration9.c
parentfaf94f6eeaccf093025ad6f1e2bd9df6eafbe969 (diff)
st/nine: Return E_FAIL for unused vertexdeclaration type
Add returncode E_FAIL. Return E_FAIL for any vertexdeclaration element with type unused. 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.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/vertexdeclaration9.c b/src/gallium/state_trackers/nine/vertexdeclaration9.c
index 08b95e22fc4..49e5937a52e 100644
--- a/src/gallium/state_trackers/nine/vertexdeclaration9.c
+++ b/src/gallium/state_trackers/nine/vertexdeclaration9.c
@@ -181,10 +181,11 @@ NineVertexDeclaration9_ctor( struct NineVertexDeclaration9 *This,
HRESULT hr = NineUnknown_ctor(&This->base, pParams);
if (FAILED(hr)) { return hr; }
+ /* wine */
for (This->nelems = 0;
- pElements[This->nelems].Type != D3DDECLTYPE_UNUSED &&
- pElements[This->nelems].Stream != 0xFF; /* wine */
- ++This->nelems);
+ pElements[This->nelems].Stream != 0xFF;
+ ++This->nelems)
+ user_assert(pElements[This->nelems].Type != D3DDECLTYPE_UNUSED, E_FAIL);
caps = NineDevice9_GetCaps(This->base.device);
user_assert(This->nelems <= caps->MaxStreams, D3DERR_INVALIDCALL);