1 // 2 // Copyright (c) 2002-2015 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 // During parsing, all constant expressions are folded to constant union nodes. The expressions that 7 // have been folded may have had precision qualifiers, which should affect the precision of the 8 // consuming operation. If the folded constant union nodes are written to output as such they won't 9 // have any precision qualifiers, and their effect on the precision of the consuming operation is 10 // lost. 11 // 12 // RecordConstantPrecision is an AST traverser that inspects the precision qualifiers of constants 13 // and hoists the constants outside the containing expression as precision qualified named variables 14 // in case that is required for correct precision propagation. 15 // 16 17 #ifndef COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ 18 #define COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ 19 20 namespace sh 21 { 22 class TIntermNode; 23 class TSymbolTable; 24 25 void RecordConstantPrecision(TIntermNode *root, TSymbolTable *symbolTable); 26 } // namespace sh 27 28 #endif // COMPILER_TRANSLATOR_RECORDCONSTANTPRECISION_H_ 29