• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright 2019 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 // This mutating tree traversal flips the output of dFdy() to account for framebuffer flipping.
7 //
8 // From: dFdy(p)
9 // To:   (dFdy(p) * viewportYScale)
10 //
11 // See http://anglebug.com/3487
12 
13 #ifndef COMPILER_TRANSLATOR_TREEOPS_FLIP_DFDY_H_
14 #define COMPILER_TRANSLATOR_TREEOPS_FLIP_DFDY_H_
15 
16 #include "common/angleutils.h"
17 
18 namespace sh
19 {
20 
21 class TCompiler;
22 class TIntermNode;
23 class TIntermBinary;
24 class TSymbolTable;
25 
26 ANGLE_NO_DISCARD bool RewriteDfdy(TCompiler *compiler,
27                                   TIntermNode *root,
28                                   const TSymbolTable &symbolTable,
29                                   int shaderVersion,
30                                   TIntermBinary *viewportYScale);
31 
32 }  // namespace sh
33 
34 #endif  // COMPILER_TRANSLATOR_TREEOPS_FLIP_DFDY_H_
35