Texture function refactoring

To make it easier to branch on the different texture
fetching options, a new TextureFunction class is
introduced here, which performs the string comparisons
and identifies the different options.

I also had to add a 5th argument for textureGradOffset
and textureProjGradOffset.

I added function stubs (with the UNIMPLEMENTED markers)
for all new texture functions.

Change-Id: I58cde91a2bacb0012bdc34ec85b0befa19a85326
Reviewed-on: https://swiftshader-review.googlesource.com/4116
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Shader/PixelShader.cpp b/src/Shader/PixelShader.cpp
index 9e4cff5..0cd6f1c 100644
--- a/src/Shader/PixelShader.cpp
+++ b/src/Shader/PixelShader.cpp
@@ -299,6 +299,12 @@
 						case Shader::OPCODE_TEX:
 						case Shader::OPCODE_TEXLDD:
 						case Shader::OPCODE_TEXLDL:
+						case Shader::OPCODE_TEXOFFSET:
+						case Shader::OPCODE_TEXLDLOFFSET:
+						case Shader::OPCODE_TEXELFETCH:
+						case Shader::OPCODE_TEXELFETCHOFFSET:
+						case Shader::OPCODE_TEXGRAD:
+						case Shader::OPCODE_TEXGRADOFFSET:
 							{
 								int sampler = instruction[i]->src[1].index;