Fix comparing TextureFunction structures.

Test each field for smaller or larger than, and when they're equal test the
next field.

BUG=angle:605

Change-Id: I2c5a90d95c7ff73b83f3067381c14b74a213ef05
Reviewed-on: https://chromium-review.googlesource.com/194602
Tested-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
diff --git a/src/compiler/translator/OutputHLSL.cpp b/src/compiler/translator/OutputHLSL.cpp
index b05e6b6..8fc2bce 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -84,9 +84,19 @@
 bool OutputHLSL::TextureFunction::operator<(const TextureFunction &rhs) const
 {
     if (sampler < rhs.sampler) return true;
+    if (sampler > rhs.sampler) return false;
+
     if (coords < rhs.coords)   return true;
+    if (coords > rhs.coords)   return false;
+
     if (!proj && rhs.proj)     return true;
+    if (proj && !rhs.proj)     return false;
+
+    if (!offset && rhs.offset) return true;
+    if (offset && !rhs.offset) return false;
+
     if (method < rhs.method)   return true;
+    if (method > rhs.method)   return false;
 
     return false;
 }