zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
localintermediate.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2002-2010 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 _LOCAL_INTERMEDIATE_INCLUDED_
8 #define _LOCAL_INTERMEDIATE_INCLUDED_
9 
10 #include "GLSLANG/ShaderLang.h"
11 #include "compiler/intermediate.h"
12 #include "compiler/SymbolTable.h"
13 
14 struct TVectorFields {
15  int offsets[4];
16  int num;
17 };
18 
19 //
20 // Set of helper functions to help parse and build the tree.
21 //
22 class TInfoSink;
24 public:
26  TIntermediate(TInfoSink& i) : infoSink(i) { }
27 
28  TIntermSymbol* addSymbol(int Id, const TString&, const TType&, const TSourceLoc&);
38  TIntermTyped* addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc&);
42  bool parseConstTree(const TSourceLoc&, TIntermNode*, ConstantUnion*, TOperator, TSymbolTable&, TType, bool singleConstantParam = false);
47  bool postProcess(TIntermNode*);
48  void remove(TIntermNode*);
49  void outputTree(TIntermNode*);
50 
51 private:
52  void operator=(TIntermediate&); // prevent assignments
53 
54  TInfoSink& infoSink;
55 };
56 
57 #endif // _LOCAL_INTERMEDIATE_INCLUDED_
TOperator
Definition: intermediate.h:29
TIntermTyped * addIndex(TOperator op, TIntermTyped *base, TIntermTyped *index, const TSourceLoc &)
GLint left
Definition: glew.h:7291
TIntermTyped * addBinaryMath(TOperator op, TIntermTyped *left, TIntermTyped *right, const TSourceLoc &, TSymbolTable &)
TIntermConstantUnion * addConstantUnion(ConstantUnion *, const TType &, const TSourceLoc &)
TIntermAggregate * setAggregateOperator(TIntermNode *, TOperator, const TSourceLoc &)
GLuint GLsizei const GLuint const GLintptr * offsets
Definition: glew.h:4750
TIntermNode * addSelection(TIntermTyped *cond, TIntermNodePair code, const TSourceLoc &)
TIntermTyped * addComma(TIntermTyped *left, TIntermTyped *right, const TSourceLoc &)
Definition: Types.h:93
TIntermTyped * promoteConstantUnion(TBasicType, TIntermConstantUnion *)
TIntermTyped * addConversion(TOperator, const TType &, TIntermTyped *)
TIntermediate(TInfoSink &i)
TIntermTyped * addAssign(TOperator op, TIntermTyped *left, TIntermTyped *right, const TSourceLoc &)
TIntermSymbol * addSymbol(int Id, const TString &, const TType &, const TSourceLoc &)
GLuint index
Definition: glew.h:1800
bool parseConstTree(const TSourceLoc &, TIntermNode *, ConstantUnion *, TOperator, TSymbolTable &, TType, bool singleConstantParam=false)
Definition: parseConst.cpp:233
TIntermAggregate * growAggregate(TIntermNode *left, TIntermNode *right, const TSourceLoc &)
TIntermAggregate * makeAggregate(TIntermNode *node, const TSourceLoc &)
TBasicType
Definition: BaseTypes.h:36
std::basic_string< char, std::char_traits< char >, TStringAllocator > TString
Definition: Common.h:41
Definition: inftrees.h:24
POOL_ALLOCATOR_NEW_DELETE()
void outputTree(TIntermNode *)
Definition: intermOut.cpp:416
TIntermBranch * addBranch(TOperator, const TSourceLoc &)
TIntermNode * addLoop(TLoopType, TIntermNode *, TIntermTyped *, TIntermTyped *, TIntermNode *, const TSourceLoc &)
TIntermTyped * addUnaryMath(TOperator op, TIntermNode *child, const TSourceLoc &, TSymbolTable &)
TLoopType
Definition: intermediate.h:278
int i
Definition: pngrutil.c:1377
GLfloat right
Definition: glew.h:13816
TIntermTyped * addSwizzle(TVectorFields &, const TSourceLoc &)
bool postProcess(TIntermNode *)