1 // 2 // Copyright 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 7 // RewriteDoWhile.h: rewrite do-while loops as while loops to work around 8 // driver bugs 9 10 #ifndef COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_REWRITEDOWHILE_H_ 11 #define COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_REWRITEDOWHILE_H_ 12 13 #include "common/angleutils.h" 14 #include "common/debug.h" 15 16 namespace sh 17 { 18 19 class TCompiler; 20 class TIntermNode; 21 class TSymbolTable; 22 23 #if ANGLE_ENABLE_GLSL && ANGLE_PLATFORM_APPLE 24 [[nodiscard]] bool RewriteDoWhile(TCompiler *compiler, 25 TIntermNode *root, 26 TSymbolTable *symbolTable); 27 #else RewriteDoWhile(TCompiler * compiler,TIntermNode * root,TSymbolTable * symbolTable)28[[nodiscard]] ANGLE_INLINE bool RewriteDoWhile(TCompiler *compiler, 29 TIntermNode *root, 30 TSymbolTable *symbolTable) 31 { 32 UNREACHABLE(); 33 return false; 34 } 35 #endif 36 37 } // namespace sh 38 39 #endif // COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_REWRITEDOWHILE_H_ 40