• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2016 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 // Rewrite condition in for and while loops to work around driver bug on Intel Mac.
8 
9 #ifndef COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_ADDANDTRUETOLOOPCONDITION_H_
10 #define COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_ADDANDTRUETOLOOPCONDITION_H_
11 
12 #include "common/angleutils.h"
13 #include "common/debug.h"
14 
15 namespace sh
16 {
17 class TCompiler;
18 class TIntermNode;
19 
20 #if ANGLE_ENABLE_GLSL && ANGLE_PLATFORM_APPLE
21 [[nodiscard]] bool AddAndTrueToLoopCondition(TCompiler *compiler, TIntermNode *root);
22 #else
AddAndTrueToLoopCondition(TCompiler * compiler,TIntermNode * root)23 [[nodiscard]] ANGLE_INLINE bool AddAndTrueToLoopCondition(TCompiler *compiler, TIntermNode *root)
24 {
25     UNREACHABLE();
26     return false;
27 }
28 #endif
29 
30 }  // namespace sh
31 
32 #endif  // COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_ADDANDTRUETOLOOPCONDITION_H_
33