Implement EXT_shader_texture_lod
BUG=angle:551
Change-Id: I81d7574a15861f1b24ddf6147cf71adbf20e10f3
Reviewed-on: https://chromium-review.googlesource.com/194960
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 8fc2bce..75df471 100644
--- a/src/compiler/translator/OutputHLSL.cpp
+++ b/src/compiler/translator/OutputHLSL.cpp
@@ -2494,11 +2494,12 @@
textureFunction.method = TextureFunction::IMPLICIT;
textureFunction.proj = true;
}
- else if (name == "texture2DLod" || name == "textureCubeLod" || name == "textureLod")
+ else if (name == "texture2DLod" || name == "textureCubeLod" || name == "textureLod" ||
+ name == "texture2DLodEXT" || name == "textureCubeLodEXT")
{
textureFunction.method = TextureFunction::LOD;
}
- else if (name == "texture2DProjLod" || name == "textureProjLod")
+ else if (name == "texture2DProjLod" || name == "textureProjLod" || name == "texture2DProjLodEXT")
{
textureFunction.method = TextureFunction::LOD;
textureFunction.proj = true;
@@ -2523,11 +2524,6 @@
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;
@@ -2543,7 +2539,7 @@
textureFunction.method = TextureFunction::FETCH;
textureFunction.offset = true;
}
- else if (name == "textureGrad")
+ else if (name == "textureGrad" || name == "texture2DGradEXT")
{
textureFunction.method = TextureFunction::GRAD;
}
@@ -2552,7 +2548,7 @@
textureFunction.method = TextureFunction::GRAD;
textureFunction.offset = true;
}
- else if (name == "textureProjGrad")
+ else if (name == "textureProjGrad" || name == "texture2DProjGradEXT" || name == "textureCubeGradEXT")
{
textureFunction.method = TextureFunction::GRAD;
textureFunction.proj = true;