OSDN Git Service

Support for new texture function names
authorAlexis Hetu <sugoi@google.com>
Wed, 22 Jul 2015 20:59:10 +0000 (16:59 -0400)
committerAlexis Hétu <sugoi@google.com>
Thu, 23 Jul 2015 16:56:45 +0000 (16:56 +0000)
There are explicit checks for texture function names in OutputASM,
which fail in ES3 because new function names are available, so some
of the new function names have been added to the checks.

Change-Id: I7ec8302a31c02500514ede4e36610dca1dafd235
Reviewed-on: https://swiftshader-review.googlesource.com/3752
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/compiler/OutputASM.cpp

index da58281..da90024 100644 (file)
@@ -825,7 +825,7 @@ namespace glsl
                                                }\r
                                                else UNREACHABLE(argumentCount);\r
                                        }\r
-                                       else if(name == "texture2DProj")\r
+                                       else if(name == "texture2DProj" || name == "textureProj")\r
                                        {\r
                                                TIntermTyped *t = arg[1]->getAsTyped();\r
 \r
@@ -866,7 +866,7 @@ namespace glsl
                                                }\r
                                                else UNREACHABLE(argumentCount);\r
                                        }\r
-                                       else if(name == "texture2DLod" || name == "textureCubeLod")\r
+                                       else if(name == "texture2DLod" || name == "textureCubeLod" || name == "textureLod")\r
                                        {\r
                                                Temporary uvwb(this);\r
                                                emit(sw::Shader::OPCODE_MOV, &uvwb, arg[1]);\r
@@ -875,7 +875,7 @@ namespace glsl
 \r
                                                emit(sw::Shader::OPCODE_TEXLDL, result, &uvwb, arg[0]);\r
                                        }\r
-                                       else if(name == "texture2DProjLod")\r
+                                       else if(name == "texture2DProjLod" || name == "textureProjLod")\r
                                        {\r
                                                TIntermTyped *t = arg[1]->getAsTyped();\r
                                                Temporary proj(this);\r