| 1 | // |
|---|---|
| 2 | // Copyright (c) 2011 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 | #ifndef COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORGLSL_H_ |
| 8 | #define COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORGLSL_H_ |
| 9 | |
| 10 | #include "GLSLANG/ShaderLang.h" |
| 11 | |
| 12 | namespace sh |
| 13 | { |
| 14 | class BuiltInFunctionEmulator; |
| 15 | |
| 16 | // |
| 17 | // This works around bug in Intel Mac drivers. |
| 18 | // |
| 19 | void InitBuiltInAbsFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu, |
| 20 | sh::GLenum shaderType); |
| 21 | |
| 22 | // |
| 23 | // This works around isnan() bug in Intel Mac drivers |
| 24 | // |
| 25 | void InitBuiltInIsnanFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu, |
| 26 | int targetGLSLVersion); |
| 27 | // |
| 28 | // This works around atan(y, x) bug in NVIDIA drivers. |
| 29 | // |
| 30 | void InitBuiltInAtanFunctionEmulatorForGLSLWorkarounds(BuiltInFunctionEmulator *emu); |
| 31 | |
| 32 | // |
| 33 | // This function is emulating built-in functions missing from GLSL 1.30 and higher. |
| 34 | // |
| 35 | void InitBuiltInFunctionEmulatorForGLSLMissingFunctions(BuiltInFunctionEmulator *emu, |
| 36 | sh::GLenum shaderType, |
| 37 | int targetGLSLVersion); |
| 38 | } // namespace sh |
| 39 | |
| 40 | #endif // COMPILER_TRANSLATOR_BUILTINFUNCTIONEMULATORGLSL_H_ |
| 41 |