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/Shader.hpp b/src/Shader/Shader.hpp
index 18c723b..588f637 100644
--- a/src/Shader/Shader.hpp
+++ b/src/Shader/Shader.hpp
@@ -205,6 +205,12 @@
OPCODE_SMOOTH,
OPCODE_ISNAN,
OPCODE_ISINF,
+ OPCODE_TEXOFFSET,
+ OPCODE_TEXLDLOFFSET,
+ OPCODE_TEXELFETCH,
+ OPCODE_TEXELFETCHOFFSET,
+ OPCODE_TEXGRAD,
+ OPCODE_TEXGRADOFFSET,
OPCODE_FLOATBITSTOINT,
OPCODE_FLOATBITSTOUINT,
OPCODE_INTBITSTOFLOAT,
@@ -511,7 +517,7 @@
unsigned char usageIndex;
DestinationParameter dst;
- SourceParameter src[4];
+ SourceParameter src[5];
union
{