Commit 0523d839 by Jamie Madill

Fix sorting uninitialized attribute semantics to the end.

A missing condition would produce a sort order where sometimes -1 was shifted to the front of the semantic array, instead of the end. BUG=angle:527 Change-Id: I69b2e5ccc03f6523771601cd59293d6cd325be2f Reviewed-on: https://chromium-review.googlesource.com/180660Reviewed-by: 's avatarNicolas Capens <nicolascapens@chromium.org> Commit-Queue: Nicolas Capens <nicolascapens@chromium.org> Tested-by: 's avatarNicolas Capens <nicolascapens@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 783a624e
......@@ -2592,7 +2592,9 @@ struct AttributeSorter
bool operator()(int a, int b)
{
return originalIndices[a] == -1 ? false : originalIndices[a] < originalIndices[b];
if (originalIndices[a] == -1) return false;
if (originalIndices[b] == -1) return true;
return (originalIndices[a] < originalIndices[b]);
}
const int (&originalIndices)[MAX_VERTEX_ATTRIBS];
......
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