1 //
2 // Copyright 2002 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 // Scalarize vector and matrix constructor args, so that vectors built from components don't have
7 // matrix arguments, and matrices built from components don't have vector arguments. This avoids
8 // driver bugs around vector and matrix constructors.
9 //
10 
11 #ifndef COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
12 #define COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
13 
14 #include "GLSLANG/ShaderLang.h"
15 #include "common/angleutils.h"
16 
17 namespace sh
18 {
19 class TCompiler;
20 class TIntermBlock;
21 class TSymbolTable;
22 
23 ANGLE_NO_DISCARD bool ScalarizeVecAndMatConstructorArgs(TCompiler *compiler,
24                                                         TIntermBlock *root,
25                                                         sh::GLenum shaderType,
26                                                         bool fragmentPrecisionHigh,
27                                                         TSymbolTable *symbolTable);
28 }  // namespace sh
29 
30 #endif  // COMPILER_TRANSLATOR_TREEOPS_SCALARIZEVECANDMATCONSTRUCTORARGS_H_
31