Detect all texture sampling shader instructions.

Change-Id: If557db7db89659e6c2b043b21e5712fb34eafd8d
Reviewed-on: https://swiftshader-review.googlesource.com/4561
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Shader/VertexShader.cpp b/src/Shader/VertexShader.cpp
index fab6b17..dc8bd06 100644
--- a/src/Shader/VertexShader.cpp
+++ b/src/Shader/VertexShader.cpp
@@ -141,9 +141,9 @@
 		return instructionCount;
 	}
 
-	bool VertexShader::containsTexldl() const
+	bool VertexShader::containsTextureSampling() const
 	{
-		return texldl;
+		return textureSampling;
 	}
 
 	void VertexShader::analyze()
@@ -151,7 +151,7 @@
 		analyzeInput();
 		analyzeOutput();
 		analyzeDirtyConstants();
-		analyzeTexldl();
+		analyzeTextureSampling();
 		analyzeDynamicBranching();
 		analyzeSamplers();
 		analyzeCallSites();
@@ -262,17 +262,15 @@
 		}
 	}
 
-	void VertexShader::analyzeTexldl()
+	void VertexShader::analyzeTextureSampling()
 	{
-		texldl = false;
+		textureSampling = false;
 
-		for(unsigned int i = 0; i < instruction.size(); i++)
+		for(unsigned int i = 0; i < instruction.size() && !textureSampling; i++)
 		{
-			if(instruction[i]->opcode == Shader::OPCODE_TEXLDL)
+			if(instruction[i]->src[1].type == PARAMETER_SAMPLER)
 			{
-				texldl = true;
-
-				break;
+				textureSampling = true;
 			}
 		}
 	}