daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 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 | |
alokp@chromium.org | ea0e1af | 2010-03-22 19:33:14 +0000 | [diff] [blame] | 10 | #include "GLSLANG/ResourceLimits.h" |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 11 | |
| 12 | #include "compiler/Common.h" |
| 13 | #include "compiler/ShHandle.h" |
| 14 | #include "compiler/SymbolTable.h" |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 15 | |
| 16 | typedef TVector<TString> TBuiltInStrings; |
| 17 | |
| 18 | class TBuiltIns { |
| 19 | public: |
| 20 | POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) |
| 21 | void initialize(); |
| 22 | void initialize(const TBuiltInResource& resources); |
| 23 | TBuiltInStrings* getBuiltInStrings() { return builtInStrings; } |
| 24 | protected: |
| 25 | TBuiltInStrings builtInStrings[EShLangCount]; |
| 26 | }; |
| 27 | |
| 28 | void IdentifyBuiltIns(EShLanguage, TSymbolTable&); |
| 29 | void IdentifyBuiltIns(EShLanguage, TSymbolTable&, const TBuiltInResource &resources); |
| 30 | bool GenerateBuiltInSymbolTable(const TBuiltInResource* resources, TInfoSink&, TSymbolTable*, EShLanguage language = EShLangCount); |
| 31 | bool InitializeSymbolTable(TBuiltInStrings* BuiltInStrings, EShLanguage language, TInfoSink& infoSink, const TBuiltInResource *resources, TSymbolTable*); |
| 32 | const char* GetPreprocessorBuiltinString(); |
| 33 | extern "C" int InitPreprocessor(void); |
| 34 | extern "C" int FinalizePreprocessor(void); |
| 35 | |
| 36 | #endif // _INITIALIZE_INCLUDED_ |