Implement textureProjLod and textureProjLodOffset.

BUG=angle:564

Change-Id: I547c69908d0aa1809f844a50230bc019e6dd5893
Reviewed-on: https://chromium-review.googlesource.com/186685
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 6fdefc7..503d10d 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -1161,6 +1161,10 @@
                                     out << "    lod += bias;\n";
                                 }
                             }
+                            else if (textureFunction->method == TextureFunction::LOD)
+                            {
+                                out << "    x.GetDimensions(0, width, height, levels);\n";
+                            }
 
                             out << "    uint mip = uint(min(max(round(lod), 0), levels - 1));\n";
                         }
@@ -2354,6 +2358,17 @@
                     textureFunction.method = TextureFunction::LOD;
                     textureFunction.offset = true;
                 }
+                else if (name == "textureProjLod")
+                {
+                    textureFunction.method = TextureFunction::LOD;
+                    textureFunction.proj = true;
+                }
+                else if (name == "textureProjLodOffset")
+                {
+                    textureFunction.method = TextureFunction::LOD;
+                    textureFunction.proj = true;
+                    textureFunction.offset = true;
+                }
                 else UNREACHABLE();
 
                 if (textureFunction.method == TextureFunction::IMPLICIT)   // Could require lod 0 or have a bias argument
@@ -3929,7 +3944,6 @@
       default: UNREACHABLE();
     }
 
-
     return GL_NONE;
 }