diff options
-rw-r--r-- | src/compiler/translator/tree_ops/ConvertUnsupportedConstructorsToFunctionCalls.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/translator/tree_ops/ConvertUnsupportedConstructorsToFunctionCalls.cpp b/src/compiler/translator/tree_ops/ConvertUnsupportedConstructorsToFunctionCalls.cpp index d0a3f89958..8f0233ce6d 100644 --- a/src/compiler/translator/tree_ops/ConvertUnsupportedConstructorsToFunctionCalls.cpp +++ b/src/compiler/translator/tree_ops/ConvertUnsupportedConstructorsToFunctionCalls.cpp @@ -194,6 +194,16 @@ class Traverser : public TIntermTraverser const TType &type = node->getType(); const TType &arg0Type = arguments[0]->getAsTyped()->getType(); + if (!type.isScalar() && !type.isVector() && !type.isMatrix()) + { + return true; + } + + if (type.isArray()) + { + return true; + } + // check for type_ctor(sameType) // scalar(scalar) -> passthrough // vecN(vecN) -> passthrough |