DO NOT MERGE: Apply fix for tessellation fractional even test verification.

- Fix to tessellation fractional even tessellation mode verification
  calculating additional segments' length wrong if tessellation generated
  4 segments, and the additional segments were generated as first and last
  segments.

Bug: 19543594
Change-Id: I69e9a03dfcd451fc4e995eae4b5149c67dc50399
diff --git a/modules/gles31/functional/es31fTessellationTests.cpp b/modules/gles31/functional/es31fTessellationTests.cpp
index 5743788..3dfef3b 100644
--- a/modules/gles31/functional/es31fTessellationTests.cpp
+++ b/modules/gles31/functional/es31fTessellationTests.cpp
@@ -1322,6 +1322,12 @@
 					return false;
 				}
 			}
+			else
+			{
+				// We have 2 segmentsA and 2 segmentsB, ensure segmentsB has the shorter lengths
+				if (segmentsB[0].length > segmentsA[0].length)
+					std::swap(segmentsA, segmentsB);
+			}
 
 			// Check that the additional segments are placed symmetrically.
 			if (segmentsB[0].index + segmentsB[1].index + 1 != (int)segments.size())
@@ -1338,8 +1344,8 @@
 				additionalSegmentLocationDst = de::min(segmentsB[0].index, segmentsB[1].index);
 			else
 				additionalSegmentLocationDst = segmentsB[0].length < segmentsA[0].length - 0.001f ? de::min(segmentsB[0].index, segmentsB[1].index)
-											 : segmentsA[0].length < segmentsB[0].length - 0.001f ? de::min(segmentsA[0].index, segmentsA[1].index)
 											 : -1; // \note -1 when can't reliably decide which ones are the additional segments, a or b.
+
 			return true;
 		}
 	}