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 | |
daniel@transgaming.com | bbf56f7 | 2010-04-20 18:52:13 +0000 | [diff] [blame] | 10 | #include "compiler/Common.h" |
| 11 | #include "compiler/ShHandle.h" |
| 12 | #include "compiler/SymbolTable.h" |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 13 | |
| 14 | typedef TVector<TString> TBuiltInStrings; |
| 15 | |
| 16 | class TBuiltIns { |
| 17 | public: |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 18 | POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator) |
| 19 | |
alokp@chromium.org | 4888ceb | 2010-10-01 21:13:12 +0000 | [diff] [blame^] | 20 | void initialize(ShShaderType type, ShShaderSpec spec, |
| 21 | const ShBuiltInResources& resources); |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 22 | const TBuiltInStrings& getBuiltInStrings() { return builtInStrings; } |
| 23 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 24 | protected: |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 25 | TBuiltInStrings builtInStrings; |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 26 | }; |
| 27 | |
alokp@chromium.org | 4888ceb | 2010-10-01 21:13:12 +0000 | [diff] [blame^] | 28 | void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec, |
| 29 | const ShBuiltInResources& resources, |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 30 | TSymbolTable& symbolTable); |
| 31 | |
alokp@chromium.org | 4888ceb | 2010-10-01 21:13:12 +0000 | [diff] [blame^] | 32 | void InitExtensionBehavior(const ShBuiltInResources& resources, |
alokp@chromium.org | ad771eb | 2010-09-07 17:36:23 +0000 | [diff] [blame] | 33 | TExtensionBehavior& extensionBehavior); |
| 34 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 35 | extern "C" int InitPreprocessor(void); |
| 36 | extern "C" int FinalizePreprocessor(void); |
alokp@chromium.org | ad771eb | 2010-09-07 17:36:23 +0000 | [diff] [blame] | 37 | extern "C" void PredefineIntMacro(const char *name, int value); |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 38 | |
| 39 | #endif // _INITIALIZE_INCLUDED_ |