blob: 483ff48466ce85dc724e3a61c50ce0b447e800d3 [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
daniel@transgaming.combbf56f72010-04-20 18:52:13 +000010#include "compiler/Common.h"
11#include "compiler/ShHandle.h"
12#include "compiler/SymbolTable.h"
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000013
14typedef TVector<TString> TBuiltInStrings;
15
16class TBuiltIns {
17public:
alokp@chromium.orge4249f02010-07-26 18:13:52 +000018 POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
19
alokp@chromium.org4888ceb2010-10-01 21:13:12 +000020 void initialize(ShShaderType type, ShShaderSpec spec,
21 const ShBuiltInResources& resources);
alokp@chromium.orge4249f02010-07-26 18:13:52 +000022 const TBuiltInStrings& getBuiltInStrings() { return builtInStrings; }
23
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000024protected:
alokp@chromium.orge4249f02010-07-26 18:13:52 +000025 TBuiltInStrings builtInStrings;
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000026};
27
alokp@chromium.org4888ceb2010-10-01 21:13:12 +000028void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
29 const ShBuiltInResources& resources,
alokp@chromium.orge4249f02010-07-26 18:13:52 +000030 TSymbolTable& symbolTable);
31
alokp@chromium.org4888ceb2010-10-01 21:13:12 +000032void InitExtensionBehavior(const ShBuiltInResources& resources,
alokp@chromium.orgad771eb2010-09-07 17:36:23 +000033 TExtensionBehavior& extensionBehavior);
34
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000035extern "C" int InitPreprocessor(void);
36extern "C" int FinalizePreprocessor(void);
alokp@chromium.orgad771eb2010-09-07 17:36:23 +000037extern "C" void PredefineIntMacro(const char *name, int value);
daniel@transgaming.com4f39fd92010-03-08 20:26:45 +000038
39#endif // _INITIALIZE_INCLUDED_