1 // Copyright 2017 The ANGLE Project Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 // 5 // VectorizeVectorScalarArithmetic.h: Turn some arithmetic operations that operate on a float 6 // vector-scalar pair into vector-vector operations. This is done recursively. Some scalar binary 7 // operations inside vector constructors are also turned into vector operations. 8 // 9 // This is targeted to work around a bug in NVIDIA OpenGL drivers that was reproducible on NVIDIA 10 // driver version 387.92. It works around the most common occurrences of the bug. 11 12 #ifndef COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_ 13 #define COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_ 14 15 #include "common/angleutils.h" 16 17 namespace sh 18 { 19 20 class TCompiler; 21 class TIntermBlock; 22 class TSymbolTable; 23 24 ANGLE_NO_DISCARD bool VectorizeVectorScalarArithmetic(TCompiler *compiler, 25 TIntermBlock *root, 26 TSymbolTable *symbolTable); 27 28 } // namespace sh 29 30 #endif // COMPILER_TRANSLATOR_TREEOPS_VECTORIZEVECTORSCALARARITHMETIC_H_ 31