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