• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2017 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 // ClampFragDepth.h: Limit the value that is written to gl_FragDepth to the range [0.0, 1.0].
7 // The clamping is run at the very end of shader execution, and is only performed if the shader
8 // statically accesses gl_FragDepth.
9 //
10 
11 #ifndef COMPILER_TRANSLATOR_TREEOPS_GL_CLAMPFRAGDEPTH_H_
12 #define COMPILER_TRANSLATOR_TREEOPS_GL_CLAMPFRAGDEPTH_H_
13 
14 #include "common/angleutils.h"
15 
16 namespace sh
17 {
18 
19 class TCompiler;
20 class TIntermBlock;
21 class TSymbolTable;
22 
23 #ifdef ANGLE_ENABLE_GLSL
24 ANGLE_NO_DISCARD bool ClampFragDepth(TCompiler *compiler,
25                                      TIntermBlock *root,
26                                      TSymbolTable *symbolTable);
27 #else
ClampFragDepth(TCompiler * compiler,TIntermBlock * root,TSymbolTable * symbolTable)28 ANGLE_NO_DISCARD ANGLE_INLINE bool ClampFragDepth(TCompiler *compiler,
29                                                   TIntermBlock *root,
30                                                   TSymbolTable *symbolTable)
31 {
32     UNREACHABLE();
33     return false;
34 }
35 #endif
36 
37 }  // namespace sh
38 
39 #endif  // COMPILER_TRANSLATOR_TREEOPS_GL_CLAMPFRAGDEPTH_H_
40