Commit 03181abc 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/180651Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 13a2f85b
...@@ -3240,7 +3240,9 @@ struct AttributeSorter ...@@ -3240,7 +3240,9 @@ struct AttributeSorter
bool operator()(int a, int b) 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]; 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