Fix an issue with instanced drawing in the D3D9 path.

TRAC #22447 Signed-off-by: Geoff Lang Signed-off-by: Nicolas Capens Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1787 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 3e773bb4
...@@ -56,21 +56,16 @@ GLenum VertexDeclarationCache::applyDeclaration(IDirect3DDevice9 *device, Transl ...@@ -56,21 +56,16 @@ GLenum VertexDeclarationCache::applyDeclaration(IDirect3DDevice9 *device, Transl
{ {
if (attributes[i].active) if (attributes[i].active)
{ {
if (indexedAttribute == gl::MAX_VERTEX_ATTRIBS) if (indexedAttribute == gl::MAX_VERTEX_ATTRIBS && attributes[i].divisor == 0)
{ {
if (attributes[i].divisor == 0) indexedAttribute = i;
{
indexedAttribute = i;
}
} }
else if (instancedAttribute == gl::MAX_VERTEX_ATTRIBS) else if (instancedAttribute == gl::MAX_VERTEX_ATTRIBS && attributes[i].divisor != 0)
{ {
if (attributes[i].divisor != 0) instancedAttribute = i;
{
instancedAttribute = i;
}
} }
else break; // Found both an indexed and instanced attribute if (indexedAttribute != gl::MAX_VERTEX_ATTRIBS && instancedAttribute != gl::MAX_VERTEX_ATTRIBS)
break; // Found both an indexed and instanced attribute
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment