zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DetectDiscontinuity.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2012 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 // Contains analysis utilities for dealing with HLSL's lack of support for
7 // the use of intrinsic functions which (implicitly or explicitly) compute
8 // gradients of functions with discontinuities.
9 //
10 
11 #ifndef COMPILER_DETECTDISCONTINUITY_H_
12 #define COMPILER_DETECTDISCONTINUITY_H_
13 
14 #include "compiler/intermediate.h"
15 
16 namespace sh
17 {
18 // Checks whether a loop can run for a variable number of iterations
20 {
21  public:
22  bool traverse(TIntermNode *node);
23 
24  protected:
25  bool visitBranch(Visit visit, TIntermBranch *node);
26  bool visitLoop(Visit visit, TIntermLoop *loop);
27  bool visitAggregate(Visit visit, TIntermAggregate *node);
28 
31 };
32 
34 
35 // Checks for intrinsic functions which compute gradients
37 {
38  public:
39  bool traverse(TIntermNode *node);
40 
41  protected:
42  bool visitUnary(Visit visit, TIntermUnary *node);
43  bool visitAggregate(Visit visit, TIntermAggregate *node);
44 
46 };
47 
49 
50 }
51 
52 #endif // COMPILER_DETECTDISCONTINUITY_H_
bool traverse(TIntermNode *node)
Visit
Definition: intermediate.h:524
bool visitAggregate(Visit visit, TIntermAggregate *node)
bool visitLoop(Visit visit, TIntermLoop *loop)
bool visitAggregate(Visit visit, TIntermAggregate *node)
bool visitBranch(Visit visit, TIntermBranch *node)
bool containsGradientOperation(TIntermNode *node)
bool containsLoopDiscontinuity(TIntermNode *node)
bool visitUnary(Visit visit, TIntermUnary *node)
bool traverse(TIntermNode *node)