OSDN Git Service

Fix performing dynamic component writes on vectors only.
authorNicolas Capens <capn@google.com>
Fri, 1 Apr 2016 19:01:36 +0000 (15:01 -0400)
committerNicolas Capens <capn@google.com>
Mon, 4 Apr 2016 15:16:58 +0000 (15:16 +0000)
Change-Id: Ia204b708239ae51022f163053e4d054e617695b9
Reviewed-on: https://swiftshader-review.googlesource.com/5031
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/compiler/OutputASM.cpp

index f9fa84d..a8199e0 100644 (file)
@@ -2161,7 +2161,7 @@ namespace glsl
 \r
                TIntermBinary *binary = dst->getAsBinaryNode();\r
 \r
-               if(binary && binary->getOp() == EOpIndexIndirect && dst->isScalar())\r
+               if(binary && binary->getOp() == EOpIndexIndirect && binary->getLeft()->isVector() && dst->isScalar())\r
                {\r
                        Instruction *insert = new Instruction(sw::Shader::OPCODE_INSERT);\r
 \r