zenilib  0.5.3.0
 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 {
17  TVariableInfo();
18 
22  int size;
23 };
24 typedef std::vector<TVariableInfo> TVariableInfoList;
25 
26 // Traverses intermediate tree to collect all attributes and uniforms.
28 public:
30  TVariableInfoList& uniforms,
31  ShHashFunction64 hashFunction);
32 
33  virtual void visitSymbol(TIntermSymbol*);
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
Definition: intermediate.h:524
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
Definition: gl2ext.h:845
#define TPersistString
Definition: Common.h:53
khronos_uint64_t(* ShHashFunction64)(const char *, size_t)
Definition: ShaderLang.h:197
ShDataType
Definition: ShaderLang.h:88
virtual bool visitBinary(Visit, TIntermBinary *)
const GLint * attribs
Definition: glew.h:13064
CollectAttribsUniforms(TVariableInfoList &attribs, TVariableInfoList &uniforms, ShHashFunction64 hashFunction)
TPersistString mappedName
Definition: VariableInfo.h:20
virtual bool visitAggregate(Visit, TIntermAggregate *)
ShDataType type
Definition: VariableInfo.h:21
virtual void visitSymbol(TIntermSymbol *)
virtual bool visitUnary(Visit, TIntermUnary *)
virtual bool visitBranch(Visit, TIntermBranch *)
TPersistString name
Definition: VariableInfo.h:19
virtual bool visitLoop(Visit, TIntermLoop *)
virtual bool visitSelection(Visit, TIntermSelection *)
std::vector< TVariableInfo > TVariableInfoList
Definition: VariableInfo.h:24
virtual void visitConstantUnion(TIntermConstantUnion *)
GLsizei size
Definition: gl2ext.h:1467