zenilib: zenilib/jni/external/angle/src/compiler/VariableInfo.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
VariableInfo.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2002-2011 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 COMPILER_VARIABLE_INFO_H_
8 #define COMPILER_VARIABLE_INFO_H_
9
10 #include "GLSLANG/ShaderLang.h"
11 #include "compiler/intermediate.h"
12
13 // Provides information about a variable.
14 // It is currently being used to store info about active attribs and uniforms.
15 struct TVariableInfo {
16 TVariableInfo(ShDataType type, int size);
17 TVariableInfo();
18
19 TPersistString name;
20 TPersistString mappedName;
21 ShDataType type;
22 int size;
23 };
24 typedef std::vector<TVariableInfo> TVariableInfoList;
25
26 // Traverses intermediate tree to collect all attributes and uniforms.
27 class CollectAttribsUniforms : public TIntermTraverser {
28 public:
29 CollectAttribsUniforms(TVariableInfoList& attribs,
30 TVariableInfoList& uniforms,
31 ShHashFunction64 hashFunction);
32
33 virtual void visitSymbol(TIntermSymbol*);
34 virtual void visitConstantUnion(TIntermConstantUnion*);
35 virtual bool visitBinary(Visit, TIntermBinary*);
36 virtual bool visitUnary(Visit, TIntermUnary*);
37 virtual bool visitSelection(Visit, TIntermSelection*);
38 virtual bool visitAggregate(Visit, TIntermAggregate*);
39 virtual bool visitLoop(Visit, TIntermLoop*);
40 virtual bool visitBranch(Visit, TIntermBranch*);
41
42 private:
43 TVariableInfoList& mAttribs;
44 TVariableInfoList& mUniforms;
45
46 ShHashFunction64 mHashFunction;
47 };
48
49 #endif // COMPILER_VARIABLE_INFO_H_
Visit
Visit
Definition: intermediate.h:524
TVariableInfo::TVariableInfo
TVariableInfo()
Definition: VariableInfo.cpp:146
type
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
Definition: gl2ext.h:845
TPersistString
#define TPersistString
Definition: Common.h:53
ShHashFunction64
khronos_uint64_t(* ShHashFunction64)(const char *, size_t)
Definition: ShaderLang.h:197
ShaderLang.h
ShDataType
ShDataType
Definition: ShaderLang.h:88
CollectAttribsUniforms::visitBinary
virtual bool visitBinary(Visit, TIntermBinary *)
Definition: VariableInfo.cpp:174
intermediate.h
TVariableInfo::size
int size
Definition: VariableInfo.h:22
attribs
const GLint * attribs
Definition: glew.h:13064
TIntermAggregate
Definition: intermediate.h:460
CollectAttribsUniforms::CollectAttribsUniforms
CollectAttribsUniforms(TVariableInfoList &attribs, TVariableInfoList &uniforms, ShHashFunction64 hashFunction)
Definition: VariableInfo.cpp:156
CollectAttribsUniforms
Definition: VariableInfo.h:27
TIntermBinary
Definition: intermediate.h:404
TIntermSelection
Definition: intermediate.h:503
TVariableInfo::mappedName
TPersistString mappedName
Definition: VariableInfo.h:20
CollectAttribsUniforms::visitAggregate
virtual bool visitAggregate(Visit, TIntermAggregate *)
Definition: VariableInfo.cpp:189
TVariableInfo
Definition: VariableInfo.h:15
TVariableInfo::type
ShDataType type
Definition: VariableInfo.h:21
TIntermBranch
Definition: intermediate.h:321
CollectAttribsUniforms::visitSymbol
virtual void visitSymbol(TIntermSymbol *)
Definition: VariableInfo.cpp:166
CollectAttribsUniforms::visitUnary
virtual bool visitUnary(Visit, TIntermUnary *)
Definition: VariableInfo.cpp:179
TIntermTraverser
Definition: intermediate.h:539
CollectAttribsUniforms::visitBranch
virtual bool visitBranch(Visit, TIntermBranch *)
Definition: VariableInfo.cpp:241
TVariableInfo::name
TPersistString name
Definition: VariableInfo.h:19
CollectAttribsUniforms::visitLoop
virtual bool visitLoop(Visit, TIntermLoop *)
Definition: VariableInfo.cpp:236
TIntermSymbol
Definition: intermediate.h:340
TIntermLoop
Definition: intermediate.h:284
CollectAttribsUniforms::visitSelection
virtual bool visitSelection(Visit, TIntermSelection *)
Definition: VariableInfo.cpp:184
TIntermUnary
Definition: intermediate.h:431
TVariableInfoList
std::vector< TVariableInfo > TVariableInfoList
Definition: VariableInfo.h:24
TIntermConstantUnion
Definition: intermediate.h:365
CollectAttribsUniforms::visitConstantUnion
virtual void visitConstantUnion(TIntermConstantUnion *)
Definition: VariableInfo.cpp:170
size
GLsizei size
Definition: gl2ext.h:1467