| commit | 41320521bd3f213947e118d0369c3d464b7aca7f | [log] [tgz] |
|---|---|---|
| author | Nicolas Capens <capn@google.com> | Wed Jun 06 13:47:19 2018 -0400 |
| committer | Nicolas Capens <nicolascapens@google.com> | Fri Jun 08 14:20:37 2018 +0000 |
| tree | 9f6cb2c863ac77fd97c6896bfe57109d85bc0ecf | |
| parent | 88482c3ca96642733b3a4cc3566b7e2d1b5f8025 [diff] [blame] |
Fix GLSL struct with single matrix. The parameters of the matrix constructor form an aggregate node that was passed directly to the constructor of the structure, instead of creating a one-element aggregate containing the matrix. https://github.com/mc-imperial/shader-compiler-bugs/issues/74 Bug swiftshader:56 Change-Id: Iff9a2d8dc60d79a0dde28f2aad76407028486ec8 Reviewed-on: https://swiftshader-review.googlesource.com/19308 Tested-by: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/OpenGL/compiler/ParseHelper.cpp b/src/OpenGL/compiler/ParseHelper.cpp index cf6aa95..b795c06 100644 --- a/src/OpenGL/compiler/ParseHelper.cpp +++ b/src/OpenGL/compiler/ParseHelper.cpp
@@ -3605,7 +3605,9 @@ // // Treat it like a built-in unary operator. // - callNode = createUnaryMath(op, paramNode->getAsTyped(), loc, &fnCandidate->getReturnType()); + TIntermNode *operand = paramNode->getAsAggregate()->getSequence()[0]; + callNode = createUnaryMath(op, operand->getAsTyped(), loc, &fnCandidate->getReturnType()); + if(callNode == nullptr) { std::stringstream extraInfoStream;