zenilib: zenilib/jni/external/angle/src/compiler/DetectDiscontinuity.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
19 class DetectLoopDiscontinuity : public TIntermTraverser
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
29 int mLoopDepth;
30 bool mLoopDiscontinuity;
31 };
32
33 bool containsLoopDiscontinuity(TIntermNode *node);
34
35 // Checks for intrinsic functions which compute gradients
36 class DetectGradientOperation : public TIntermTraverser
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
45 bool mGradientOperation;
46 };
47
48 bool containsGradientOperation(TIntermNode *node);
49
50 }
51
52 #endif // COMPILER_DETECTDISCONTINUITY_H_
sh::DetectLoopDiscontinuity::traverse
bool traverse(TIntermNode *node)
Definition: DetectDiscontinuity.cpp:17
sh::DetectLoopDiscontinuity::mLoopDepth
int mLoopDepth
Definition: DetectDiscontinuity.h:29
Visit
Visit
Definition: intermediate.h:524
intermediate.h
sh::DetectLoopDiscontinuity::mLoopDiscontinuity
bool mLoopDiscontinuity
Definition: DetectDiscontinuity.h:30
sh::DetectLoopDiscontinuity::visitAggregate
bool visitAggregate(Visit visit, TIntermAggregate *node)
Definition: DetectDiscontinuity.cpp:66
sh::DetectGradientOperation::mGradientOperation
bool mGradientOperation
Definition: DetectDiscontinuity.h:45
TIntermAggregate
Definition: intermediate.h:460
sh::DetectLoopDiscontinuity::visitLoop
bool visitLoop(Visit visit, TIntermLoop *loop)
Definition: DetectDiscontinuity.cpp:25
TIntermBranch
Definition: intermediate.h:321
sh::DetectGradientOperation::visitAggregate
bool visitAggregate(Visit visit, TIntermAggregate *node)
Definition: DetectDiscontinuity.cpp:103
TIntermTraverser
Definition: intermediate.h:539
sh::DetectGradientOperation
Definition: DetectDiscontinuity.h:36
TIntermLoop
Definition: intermediate.h:284
sh::DetectLoopDiscontinuity::visitBranch
bool visitBranch(Visit visit, TIntermBranch *node)
Definition: DetectDiscontinuity.cpp:39
TIntermUnary
Definition: intermediate.h:431
sh::containsGradientOperation
bool containsGradientOperation(TIntermNode *node)
Definition: DetectDiscontinuity.cpp:134
TIntermNode
Definition: intermediate.h:206
sh::containsLoopDiscontinuity
bool containsLoopDiscontinuity(TIntermNode *node)
Definition: DetectDiscontinuity.cpp:71
sh::DetectLoopDiscontinuity
Definition: DetectDiscontinuity.h:19
sh::DetectGradientOperation::visitUnary
bool visitUnary(Visit visit, TIntermUnary *node)
Definition: DetectDiscontinuity.cpp:84
sh::DetectGradientOperation::traverse
bool traverse(TIntermNode *node)
Definition: DetectDiscontinuity.cpp:77