Commit 04296f85 by Nicolas Capens

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/194602Tested-by: 's avatarNicolas Capens <nicolascapens@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org>
parent 84cfa124
...@@ -84,9 +84,19 @@ const char *RegisterPrefix(const TType &type) ...@@ -84,9 +84,19 @@ const char *RegisterPrefix(const TType &type)
bool OutputHLSL::TextureFunction::operator<(const TextureFunction &rhs) const bool OutputHLSL::TextureFunction::operator<(const TextureFunction &rhs) const
{ {
if (sampler < rhs.sampler) return true; if (sampler < rhs.sampler) return true;
if (sampler > rhs.sampler) return false;
if (coords < rhs.coords) return true; if (coords < rhs.coords) return true;
if (coords > rhs.coords) return false;
if (!proj && rhs.proj) return true; 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 true;
if (method > rhs.method) return false;
return false; return false;
} }
......
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