initial import
[vuplus_webkit] / Source / ThirdParty / ANGLE / src / compiler / Initialize.h
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 _INITIALIZE_INCLUDED_
8 #define _INITIALIZE_INCLUDED_
9
10 #include "compiler/Common.h"
11 #include "compiler/ShHandle.h"
12 #include "compiler/SymbolTable.h"
13
14 typedef TVector<TString> TBuiltInStrings;
15
16 class TBuiltIns {
17 public:
18     POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
19
20     void initialize(ShShaderType type, ShShaderSpec spec,
21                     const ShBuiltInResources& resources);
22     const TBuiltInStrings& getBuiltInStrings() { return builtInStrings; }
23
24 protected:
25     TBuiltInStrings builtInStrings;
26 };
27
28 void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
29                       const ShBuiltInResources& resources,
30                       TSymbolTable& symbolTable);
31
32 void InitExtensionBehavior(const ShBuiltInResources& resources,
33                            TExtensionBehavior& extensionBehavior);
34
35 #endif // _INITIALIZE_INCLUDED_