Hash :
2795866c
Author :
Date :
2021-09-10T02:08:40
Fix ConvertUnsupportedConstructorsToFunctionCalls
The code was not hanlding nested expressions. For example:
mat4(vec4(mat2x2), ...)
Switched to using TIntermRebuild
Bug: angleproject:5505
Change-Id: I845d94326324ac48d7489225d42d0c6e38622492
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3152168
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
#ifndef COMPILER_TRANSLATOR_TREE_OPS_CONVERTUNSUPPORTEDCONSTRUCTORSTOFUNCTIONCALLS_H_
#define COMPILER_TRANSLATOR_TREE_OPS_CONVERTUNSUPPORTEDCONSTRUCTORSTOFUNCTIONCALLS_H_
#include "compiler/translator/Compiler.h"
namespace sh
{
class TCompiler;
class TInterBlock;
class SymbolEnv;
// Adds explicit type casts into the AST where casting is done implicitly.
ANGLE_NO_DISCARD bool ConvertUnsupportedConstructorsToFunctionCalls(TCompiler &compiler,
TIntermBlock &root);
} // namespace sh
#endif // COMPILER_TRANSLATOR_TREE_OPS_CONVERTUNSUPPORTEDCONSTRUCTORSTOFUNCTIONCALLS_H_