1 // Copyright 2016 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 // Rewrite "-float" to "0.0 - float" to work around unary minus operator on float issue on Intel Mac 6 // OSX 10.11. 7 8 #ifndef COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_REWRITEUNARYMINUSOPERATORFLOAT_H_ 9 #define COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_REWRITEUNARYMINUSOPERATORFLOAT_H_ 10 11 #include "common/angleutils.h" 12 #include "common/debug.h" 13 14 namespace sh 15 { 16 class TCompiler; 17 class TIntermNode; 18 19 #if ANGLE_ENABLE_GLSL && ANGLE_PLATFORM_APPLE 20 [[nodiscard]] bool RewriteUnaryMinusOperatorFloat(TCompiler *compiler, TIntermNode *root); 21 #else RewriteUnaryMinusOperatorFloat(TCompiler * compiler,TIntermNode * root)22[[nodiscard]] ANGLE_INLINE bool RewriteUnaryMinusOperatorFloat(TCompiler *compiler, 23 TIntermNode *root) 24 { 25 UNREACHABLE(); 26 return false; 27 } 28 #endif 29 30 } // namespace sh 31 32 #endif // COMPILER_TRANSLATOR_TREEOPS_GLSL_APPLE_REWRITEUNARYMINUSOPERATORFLOAT_H_ 33