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, |
shannon.woods%transgaming.com@gtempaccount.com | 5209de8 | 2013-04-13 03:41:53 +0000 | [diff] [blame] | 21 | const ShBuiltInResources& resources, |
| 22 | const TExtensionBehavior& extensionBehavior); |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 23 | const TBuiltInStrings& getBuiltInStrings() { return builtInStrings; } |
| 24 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 25 | protected: |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 26 | TBuiltInStrings builtInStrings; |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 27 | }; |
| 28 | |
alokp@chromium.org | 4888ceb | 2010-10-01 21:13:12 +0000 | [diff] [blame] | 29 | void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec, |
| 30 | const ShBuiltInResources& resources, |
alokp@chromium.org | e4249f0 | 2010-07-26 18:13:52 +0000 | [diff] [blame] | 31 | TSymbolTable& symbolTable); |
| 32 | |
alokp@chromium.org | 4888ceb | 2010-10-01 21:13:12 +0000 | [diff] [blame] | 33 | void InitExtensionBehavior(const ShBuiltInResources& resources, |
alokp@chromium.org | ad771eb | 2010-09-07 17:36:23 +0000 | [diff] [blame] | 34 | TExtensionBehavior& extensionBehavior); |
| 35 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 36 | #endif // _INITIALIZE_INCLUDED_ |