d3dx9: Do not weld self.

This commit is contained in:
Michael Mc Donnell 2012-03-21 23:27:35 +01:00 committed by Alexandre Julliard
parent 9f0119a0c0
commit f144626e81
1 changed files with 7 additions and 0 deletions

View File

@ -6640,6 +6640,13 @@ HRESULT WINAPI D3DXWeldVertices(LPD3DXMESH mesh,
BYTE *from = &vertices[vertex_size*point_reps[index] + decl_ptr->Offset];
FLOAT epsilon = get_component_epsilon(decl_ptr, epsilons);
/* Don't weld self */
if (index == point_reps[index])
{
matches++;
continue;
}
if (weld_component(to, from, decl_ptr->Type, epsilon))
matches++;
}