2010-08-02 Paul Sawaya <psawaya@apple.com>
authorcmarrin@apple.com <cmarrin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Aug 2010 16:26:48 +0000 (16:26 +0000)
committercmarrin@apple.com <cmarrin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Aug 2010 16:26:48 +0000 (16:26 +0000)
        Reviewed by Adele Peterson.

        Add ANGLE library to WebKit. From the repository (http://angleproject.googlecode.com) as of July 22.
        https://bugs.webkit.org/show_bug.cgi?id=42789

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@64560 268f45cc-cd09-0410-ab3c-d52691b4dbfc

133 files changed:
ANGLE/ANGLE.xcodeproj/project.pbxproj [new file with mode: 0644]
ANGLE/ChangeLog [new file with mode: 0644]
ANGLE/Makefile [new file with mode: 0644]
ANGLE/include/EGL/egl.h [new file with mode: 0644]
ANGLE/include/EGL/eglext.h [new file with mode: 0644]
ANGLE/include/EGL/eglplatform.h [new file with mode: 0644]
ANGLE/include/GLES2/gl2.h [new file with mode: 0644]
ANGLE/include/GLES2/gl2ext.h [new file with mode: 0644]
ANGLE/include/GLES2/gl2platform.h [new file with mode: 0644]
ANGLE/include/GLSLANG/ResourceLimits.h [new file with mode: 0644]
ANGLE/include/GLSLANG/ShaderLang.h [new file with mode: 0644]
ANGLE/include/KHR/khrplatform.h [new file with mode: 0644]
ANGLE/src/build_angle.xcodeproj/project.pbxproj [new file with mode: 0644]
ANGLE/src/common/angleutils.h [new file with mode: 0644]
ANGLE/src/common/debug.cpp [new file with mode: 0644]
ANGLE/src/common/debug.h [new file with mode: 0644]
ANGLE/src/compiler/BaseTypes.h [new file with mode: 0644]
ANGLE/src/compiler/CodeGenGLSL.cpp [new file with mode: 0644]
ANGLE/src/compiler/CodeGenHLSL.cpp [new file with mode: 0644]
ANGLE/src/compiler/Common.h [new file with mode: 0644]
ANGLE/src/compiler/ConstantUnion.h [new file with mode: 0644]
ANGLE/src/compiler/InfoSink.cpp [new file with mode: 0644]
ANGLE/src/compiler/InfoSink.h [new file with mode: 0644]
ANGLE/src/compiler/Initialize.cpp [new file with mode: 0644]
ANGLE/src/compiler/Initialize.h [new file with mode: 0644]
ANGLE/src/compiler/InitializeDll.cpp [new file with mode: 0644]
ANGLE/src/compiler/InitializeDll.h [new file with mode: 0644]
ANGLE/src/compiler/InitializeGlobals.h [new file with mode: 0644]
ANGLE/src/compiler/InitializeParseContext.h [new file with mode: 0644]
ANGLE/src/compiler/IntermTraverse.cpp [new file with mode: 0644]
ANGLE/src/compiler/Intermediate.cpp [new file with mode: 0644]
ANGLE/src/compiler/MMap.h [new file with mode: 0644]
ANGLE/src/compiler/OutputGLSL.cpp [new file with mode: 0644]
ANGLE/src/compiler/OutputGLSL.h [new file with mode: 0644]
ANGLE/src/compiler/OutputHLSL.cpp [new file with mode: 0644]
ANGLE/src/compiler/OutputHLSL.h [new file with mode: 0644]
ANGLE/src/compiler/ParseHelper.cpp [new file with mode: 0644]
ANGLE/src/compiler/ParseHelper.h [new file with mode: 0644]
ANGLE/src/compiler/PoolAlloc.cpp [new file with mode: 0644]
ANGLE/src/compiler/PoolAlloc.h [new file with mode: 0644]
ANGLE/src/compiler/QualifierAlive.cpp [new file with mode: 0644]
ANGLE/src/compiler/QualifierAlive.h [new file with mode: 0644]
ANGLE/src/compiler/RemoveTree.cpp [new file with mode: 0644]
ANGLE/src/compiler/RemoveTree.h [new file with mode: 0644]
ANGLE/src/compiler/ShHandle.h [new file with mode: 0644]
ANGLE/src/compiler/ShaderLang.cpp [new file with mode: 0644]
ANGLE/src/compiler/SymbolTable.cpp [new file with mode: 0644]
ANGLE/src/compiler/SymbolTable.h [new file with mode: 0644]
ANGLE/src/compiler/TranslatorGLSL.cpp [new file with mode: 0644]
ANGLE/src/compiler/TranslatorGLSL.h [new file with mode: 0644]
ANGLE/src/compiler/TranslatorHLSL.cpp [new file with mode: 0644]
ANGLE/src/compiler/TranslatorHLSL.h [new file with mode: 0644]
ANGLE/src/compiler/Types.h [new file with mode: 0644]
ANGLE/src/compiler/UnfoldSelect.cpp [new file with mode: 0644]
ANGLE/src/compiler/UnfoldSelect.h [new file with mode: 0644]
ANGLE/src/compiler/debug.cpp [new file with mode: 0644]
ANGLE/src/compiler/debug.h [new file with mode: 0644]
ANGLE/src/compiler/glslang.l [new file with mode: 0644]
ANGLE/src/compiler/glslang.y [new file with mode: 0644]
ANGLE/src/compiler/intermOut.cpp [new file with mode: 0644]
ANGLE/src/compiler/intermediate.h [new file with mode: 0644]
ANGLE/src/compiler/localintermediate.h [new file with mode: 0644]
ANGLE/src/compiler/osinclude.h [new file with mode: 0644]
ANGLE/src/compiler/ossource_posix.cpp [new file with mode: 0644]
ANGLE/src/compiler/ossource_win.cpp [new file with mode: 0644]
ANGLE/src/compiler/parseConst.cpp [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/atom.c [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/atom.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/compile.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/cpp.c [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/cpp.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/cppstruct.c [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/memory.c [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/memory.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/parser.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/preprocess.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/scanner.c [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/scanner.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/slglobals.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/symbols.c [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/symbols.h [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/tokens.c [new file with mode: 0644]
ANGLE/src/compiler/preprocessor/tokens.h [new file with mode: 0644]
ANGLE/src/compiler/tools/COPYING.bison [new file with mode: 0644]
ANGLE/src/compiler/tools/COPYING.flex [new file with mode: 0644]
ANGLE/src/compiler/tools/README [new file with mode: 0644]
ANGLE/src/compiler/tools/bison.hairy [new file with mode: 0644]
ANGLE/src/compiler/tools/bison.simple [new file with mode: 0644]
ANGLE/src/compiler/unistd.h [new file with mode: 0644]
ANGLE/src/libEGL/Config.cpp [new file with mode: 0644]
ANGLE/src/libEGL/Config.h [new file with mode: 0644]
ANGLE/src/libEGL/Display.cpp [new file with mode: 0644]
ANGLE/src/libEGL/Display.h [new file with mode: 0644]
ANGLE/src/libEGL/Surface.cpp [new file with mode: 0644]
ANGLE/src/libEGL/Surface.h [new file with mode: 0644]
ANGLE/src/libEGL/libEGL.cpp [new file with mode: 0644]
ANGLE/src/libEGL/libEGL.def [new file with mode: 0644]
ANGLE/src/libEGL/libEGL.vcproj [new file with mode: 0644]
ANGLE/src/libEGL/main.cpp [new file with mode: 0644]
ANGLE/src/libEGL/main.h [new file with mode: 0644]
ANGLE/src/libGLESv2/Blit.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/Blit.h [new file with mode: 0644]
ANGLE/src/libGLESv2/Buffer.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/Buffer.h [new file with mode: 0644]
ANGLE/src/libGLESv2/Context.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/Context.h [new file with mode: 0644]
ANGLE/src/libGLESv2/Framebuffer.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/Framebuffer.h [new file with mode: 0644]
ANGLE/src/libGLESv2/Program.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/Program.h [new file with mode: 0644]
ANGLE/src/libGLESv2/Renderbuffer.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/Renderbuffer.h [new file with mode: 0644]
ANGLE/src/libGLESv2/Shader.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/Shader.h [new file with mode: 0644]
ANGLE/src/libGLESv2/Texture.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/Texture.h [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/IndexDataManager.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/IndexDataManager.h [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/VertexDataManager.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/VertexDataManager.h [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/backend.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/backend.h [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/dx9.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/dx9.h [new file with mode: 0644]
ANGLE/src/libGLESv2/geometry/vertexconversion.h [new file with mode: 0644]
ANGLE/src/libGLESv2/libGLESv2.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/libGLESv2.def [new file with mode: 0644]
ANGLE/src/libGLESv2/libGLESv2.vcproj [new file with mode: 0644]
ANGLE/src/libGLESv2/main.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/main.h [new file with mode: 0644]
ANGLE/src/libGLESv2/mathutil.h [new file with mode: 0644]
ANGLE/src/libGLESv2/utilities.cpp [new file with mode: 0644]
ANGLE/src/libGLESv2/utilities.h [new file with mode: 0644]

diff --git a/ANGLE/ANGLE.xcodeproj/project.pbxproj b/ANGLE/ANGLE.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..8308764
--- /dev/null
@@ -0,0 +1,628 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 42;
+       objects = {
+
+/* Begin PBXBuildFile section */
+               FB39D2711200F35A00088E69 /* CodeGenGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2221200F35A00088E69 /* CodeGenGLSL.cpp */; };
+               FB39D2751200F35A00088E69 /* debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2261200F35A00088E69 /* debug.cpp */; };
+               FB39D2791200F35A00088E69 /* InfoSink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D22A1200F35A00088E69 /* InfoSink.cpp */; };
+               FB39D27B1200F35A00088E69 /* Initialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D22C1200F35A00088E69 /* Initialize.cpp */; };
+               FB39D27D1200F35A00088E69 /* InitializeDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D22E1200F35A00088E69 /* InitializeDll.cpp */; };
+               FB39D2811200F35A00088E69 /* Intermediate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2321200F35A00088E69 /* Intermediate.cpp */; };
+               FB39D2831200F35A00088E69 /* intermOut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2341200F35A00088E69 /* intermOut.cpp */; };
+               FB39D2841200F35A00088E69 /* IntermTraverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2351200F35A00088E69 /* IntermTraverse.cpp */; };
+               FB39D2881200F35A00088E69 /* ossource_posix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2391200F35A00088E69 /* ossource_posix.cpp */; };
+               FB39D28A1200F35A00088E69 /* OutputGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D23B1200F35A00088E69 /* OutputGLSL.cpp */; };
+               FB39D28E1200F35A00088E69 /* parseConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D23F1200F35A00088E69 /* parseConst.cpp */; };
+               FB39D28F1200F35A00088E69 /* ParseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2401200F35A00088E69 /* ParseHelper.cpp */; };
+               FB39D2911200F35A00088E69 /* PoolAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2421200F35A00088E69 /* PoolAlloc.cpp */; };
+               FB39D2931200F35A00088E69 /* atom.c in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2451200F35A00088E69 /* atom.c */; };
+               FB39D2961200F35A00088E69 /* cpp.c in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2481200F35A00088E69 /* cpp.c */; };
+               FB39D2981200F35A00088E69 /* cppstruct.c in Sources */ = {isa = PBXBuildFile; fileRef = FB39D24A1200F35A00088E69 /* cppstruct.c */; };
+               FB39D2991200F35A00088E69 /* memory.c in Sources */ = {isa = PBXBuildFile; fileRef = FB39D24B1200F35A00088E69 /* memory.c */; };
+               FB39D29D1200F35A00088E69 /* scanner.c in Sources */ = {isa = PBXBuildFile; fileRef = FB39D24F1200F35A00088E69 /* scanner.c */; };
+               FB39D2A01200F35A00088E69 /* symbols.c in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2521200F35A00088E69 /* symbols.c */; };
+               FB39D2A21200F35A00088E69 /* tokens.c in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2541200F35A00088E69 /* tokens.c */; };
+               FB39D2A41200F35A00088E69 /* QualifierAlive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2561200F35A00088E69 /* QualifierAlive.cpp */; };
+               FB39D2A61200F35A00088E69 /* RemoveTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2581200F35A00088E69 /* RemoveTree.cpp */; };
+               FB39D2A81200F35A00088E69 /* ShaderLang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D25A1200F35A00088E69 /* ShaderLang.cpp */; };
+               FB39D2AA1200F35A00088E69 /* SymbolTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D25C1200F35A00088E69 /* SymbolTable.cpp */; };
+               FB39D2AC1200F35A00088E69 /* TranslatorGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D2681200F35A00088E69 /* TranslatorGLSL.cpp */; };
+               FB39D2B11200F35A00088E69 /* UnfoldSelect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D26D1200F35A00088E69 /* UnfoldSelect.cpp */; };
+               FB39D7231201032000088E69 /* glslang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D7201201032000088E69 /* glslang.cpp */; };
+               FB39D7241201032000088E69 /* glslang_tab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FB39D7221201032000088E69 /* glslang_tab.cpp */; };
+               FB39D76D120110FC00088E69 /* ResourceLimits.h in Headers */ = {isa = PBXBuildFile; fileRef = FB39D2BE1200F3E600088E69 /* ResourceLimits.h */; settings = {ATTRIBUTES = (Public, ); }; };
+               FB39D76E120110FC00088E69 /* ShaderLang.h in Headers */ = {isa = PBXBuildFile; fileRef = FB39D2BF1200F3E600088E69 /* ShaderLang.h */; settings = {ATTRIBUTES = (Public, ); }; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+               FB39D0D11200F0E300088E69 /* libangle.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libangle.a; sourceTree = BUILT_PRODUCTS_DIR; };
+               FB39D1861200F26200088E69 /* BaseTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BaseTypes.h; sourceTree = "<group>"; };
+               FB39D1871200F26200088E69 /* CodeGenGLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenGLSL.cpp; sourceTree = "<group>"; };
+               FB39D1881200F26200088E69 /* CodeGenHLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenHLSL.cpp; sourceTree = "<group>"; };
+               FB39D1891200F26200088E69 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = "<group>"; };
+               FB39D18A1200F26200088E69 /* ConstantUnion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConstantUnion.h; sourceTree = "<group>"; };
+               FB39D18B1200F26200088E69 /* debug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = debug.cpp; sourceTree = "<group>"; };
+               FB39D18C1200F26200088E69 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug.h; sourceTree = "<group>"; };
+               FB39D18D1200F26200088E69 /* glslang.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = glslang.l; sourceTree = "<group>"; };
+               FB39D18E1200F26200088E69 /* glslang.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = glslang.y; sourceTree = "<group>"; };
+               FB39D18F1200F26200088E69 /* InfoSink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = InfoSink.cpp; sourceTree = "<group>"; };
+               FB39D1901200F26200088E69 /* InfoSink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InfoSink.h; sourceTree = "<group>"; };
+               FB39D1911200F26200088E69 /* Initialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = Initialize.cpp; sourceTree = "<group>"; };
+               FB39D1921200F26200088E69 /* Initialize.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Initialize.h; sourceTree = "<group>"; };
+               FB39D1931200F26200088E69 /* InitializeDll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = InitializeDll.cpp; sourceTree = "<group>"; };
+               FB39D1941200F26200088E69 /* InitializeDll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeDll.h; sourceTree = "<group>"; };
+               FB39D1951200F26200088E69 /* InitializeGlobals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeGlobals.h; sourceTree = "<group>"; };
+               FB39D1961200F26200088E69 /* InitializeParseContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeParseContext.h; sourceTree = "<group>"; };
+               FB39D1971200F26200088E69 /* Intermediate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = Intermediate.cpp; sourceTree = "<group>"; };
+               FB39D1981200F26200088E69 /* intermediate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = intermediate.h; sourceTree = "<group>"; };
+               FB39D1991200F26200088E69 /* intermOut.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = intermOut.cpp; sourceTree = "<group>"; };
+               FB39D19A1200F26200088E69 /* IntermTraverse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = IntermTraverse.cpp; sourceTree = "<group>"; };
+               FB39D19B1200F26200088E69 /* localintermediate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = localintermediate.h; sourceTree = "<group>"; };
+               FB39D19C1200F26200088E69 /* MMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MMap.h; sourceTree = "<group>"; };
+               FB39D19D1200F26200088E69 /* osinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osinclude.h; sourceTree = "<group>"; };
+               FB39D19E1200F26200088E69 /* ossource_posix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = ossource_posix.cpp; sourceTree = "<group>"; };
+               FB39D19F1200F26200088E69 /* ossource_win.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = ossource_win.cpp; sourceTree = "<group>"; };
+               FB39D1A01200F26200088E69 /* OutputGLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = OutputGLSL.cpp; sourceTree = "<group>"; };
+               FB39D1A11200F26200088E69 /* OutputGLSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputGLSL.h; sourceTree = "<group>"; };
+               FB39D1A21200F26200088E69 /* OutputHLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = OutputHLSL.cpp; sourceTree = "<group>"; };
+               FB39D1A31200F26200088E69 /* OutputHLSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputHLSL.h; sourceTree = "<group>"; };
+               FB39D1A41200F26200088E69 /* parseConst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = parseConst.cpp; sourceTree = "<group>"; };
+               FB39D1A51200F26200088E69 /* ParseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = ParseHelper.cpp; sourceTree = "<group>"; };
+               FB39D1A61200F26200088E69 /* ParseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParseHelper.h; sourceTree = "<group>"; };
+               FB39D1A71200F26200088E69 /* PoolAlloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = PoolAlloc.cpp; sourceTree = "<group>"; };
+               FB39D1A81200F26200088E69 /* PoolAlloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PoolAlloc.h; sourceTree = "<group>"; };
+               FB39D1AA1200F26200088E69 /* atom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atom.c; sourceTree = "<group>"; };
+               FB39D1AB1200F26200088E69 /* atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = atom.h; sourceTree = "<group>"; };
+               FB39D1AC1200F26200088E69 /* compile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compile.h; sourceTree = "<group>"; };
+               FB39D1AD1200F26200088E69 /* cpp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpp.c; sourceTree = "<group>"; };
+               FB39D1AE1200F26200088E69 /* cpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpp.h; sourceTree = "<group>"; };
+               FB39D1AF1200F26200088E69 /* cppstruct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cppstruct.c; sourceTree = "<group>"; };
+               FB39D1B01200F26200088E69 /* memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memory.c; sourceTree = "<group>"; };
+               FB39D1B11200F26200088E69 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = "<group>"; };
+               FB39D1B21200F26200088E69 /* parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parser.h; sourceTree = "<group>"; };
+               FB39D1B31200F26200088E69 /* preprocess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = preprocess.h; sourceTree = "<group>"; };
+               FB39D1B41200F26200088E69 /* scanner.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scanner.c; sourceTree = "<group>"; };
+               FB39D1B51200F26200088E69 /* scanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scanner.h; sourceTree = "<group>"; };
+               FB39D1B61200F26200088E69 /* slglobals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = slglobals.h; sourceTree = "<group>"; };
+               FB39D1B71200F26200088E69 /* symbols.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = symbols.c; sourceTree = "<group>"; };
+               FB39D1B81200F26200088E69 /* symbols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = symbols.h; sourceTree = "<group>"; };
+               FB39D1B91200F26200088E69 /* tokens.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tokens.c; sourceTree = "<group>"; };
+               FB39D1BA1200F26200088E69 /* tokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tokens.h; sourceTree = "<group>"; };
+               FB39D1BB1200F26200088E69 /* QualifierAlive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = QualifierAlive.cpp; sourceTree = "<group>"; };
+               FB39D1BC1200F26200088E69 /* QualifierAlive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QualifierAlive.h; sourceTree = "<group>"; };
+               FB39D1BD1200F26200088E69 /* RemoveTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = RemoveTree.cpp; sourceTree = "<group>"; };
+               FB39D1BE1200F26200088E69 /* RemoveTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoveTree.h; sourceTree = "<group>"; };
+               FB39D1BF1200F26200088E69 /* ShaderLang.cpp */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; includeInIndex = 0; path = ShaderLang.cpp; sourceTree = "<group>"; };
+               FB39D1C01200F26200088E69 /* ShHandle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShHandle.h; sourceTree = "<group>"; };
+               FB39D1C11200F26200088E69 /* SymbolTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolTable.cpp; sourceTree = "<group>"; };
+               FB39D1C21200F26200088E69 /* SymbolTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SymbolTable.h; sourceTree = "<group>"; };
+               FB39D1CB1200F26200088E69 /* translator_common.vcproj */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = translator_common.vcproj; sourceTree = "<group>"; };
+               FB39D1CC1200F26200088E69 /* translator_hlsl.vcproj */ = {isa = PBXFileReference; explicitFileType = text.xml; fileEncoding = 4; path = translator_hlsl.vcproj; sourceTree = "<group>"; };
+               FB39D1CD1200F26200088E69 /* TranslatorGLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorGLSL.cpp; sourceTree = "<group>"; };
+               FB39D1CE1200F26200088E69 /* TranslatorGLSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TranslatorGLSL.h; sourceTree = "<group>"; };
+               FB39D1CF1200F26200088E69 /* TranslatorHLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorHLSL.cpp; sourceTree = "<group>"; };
+               FB39D1D01200F26200088E69 /* TranslatorHLSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TranslatorHLSL.h; sourceTree = "<group>"; };
+               FB39D1D11200F26200088E69 /* Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Types.h; sourceTree = "<group>"; };
+               FB39D1D21200F26200088E69 /* UnfoldSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.cpp.cpp; path = UnfoldSelect.cpp; sourceTree = "<group>"; };
+               FB39D1D31200F26200088E69 /* UnfoldSelect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnfoldSelect.h; sourceTree = "<group>"; };
+               FB39D1D41200F26200088E69 /* unistd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unistd.h; sourceTree = "<group>"; };
+               FB39D2211200F35A00088E69 /* BaseTypes.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = BaseTypes.h; sourceTree = "<group>"; };
+               FB39D2221200F35A00088E69 /* CodeGenGLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenGLSL.cpp; sourceTree = "<group>"; };
+               FB39D2241200F35A00088E69 /* Common.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = Common.h; sourceTree = "<group>"; };
+               FB39D2251200F35A00088E69 /* ConstantUnion.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = ConstantUnion.h; sourceTree = "<group>"; };
+               FB39D2261200F35A00088E69 /* debug.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = debug.cpp; sourceTree = "<group>"; };
+               FB39D2271200F35A00088E69 /* debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = debug.h; sourceTree = "<group>"; };
+               FB39D2281200F35A00088E69 /* glslang.l */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.lex; path = glslang.l; sourceTree = "<group>"; };
+               FB39D2291200F35A00088E69 /* glslang.y */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.yacc; path = glslang.y; sourceTree = "<group>"; };
+               FB39D22A1200F35A00088E69 /* InfoSink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InfoSink.cpp; sourceTree = "<group>"; };
+               FB39D22B1200F35A00088E69 /* InfoSink.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = InfoSink.h; sourceTree = "<group>"; };
+               FB39D22C1200F35A00088E69 /* Initialize.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Initialize.cpp; sourceTree = "<group>"; };
+               FB39D22D1200F35A00088E69 /* Initialize.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = Initialize.h; sourceTree = "<group>"; };
+               FB39D22E1200F35A00088E69 /* InitializeDll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InitializeDll.cpp; sourceTree = "<group>"; };
+               FB39D22F1200F35A00088E69 /* InitializeDll.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = InitializeDll.h; sourceTree = "<group>"; };
+               FB39D2301200F35A00088E69 /* InitializeGlobals.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = InitializeGlobals.h; sourceTree = "<group>"; };
+               FB39D2311200F35A00088E69 /* InitializeParseContext.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = InitializeParseContext.h; sourceTree = "<group>"; };
+               FB39D2321200F35A00088E69 /* Intermediate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Intermediate.cpp; sourceTree = "<group>"; };
+               FB39D2331200F35A00088E69 /* intermediate.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = intermediate.h; sourceTree = "<group>"; };
+               FB39D2341200F35A00088E69 /* intermOut.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = intermOut.cpp; sourceTree = "<group>"; };
+               FB39D2351200F35A00088E69 /* IntermTraverse.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntermTraverse.cpp; sourceTree = "<group>"; };
+               FB39D2361200F35A00088E69 /* localintermediate.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = localintermediate.h; sourceTree = "<group>"; };
+               FB39D2371200F35A00088E69 /* MMap.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = MMap.h; sourceTree = "<group>"; };
+               FB39D2381200F35A00088E69 /* osinclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = osinclude.h; sourceTree = "<group>"; };
+               FB39D2391200F35A00088E69 /* ossource_posix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossource_posix.cpp; sourceTree = "<group>"; };
+               FB39D23A1200F35A00088E69 /* ossource_win.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ossource_win.cpp; sourceTree = "<group>"; };
+               FB39D23B1200F35A00088E69 /* OutputGLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OutputGLSL.cpp; sourceTree = "<group>"; };
+               FB39D23C1200F35A00088E69 /* OutputGLSL.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = OutputGLSL.h; sourceTree = "<group>"; };
+               FB39D23F1200F35A00088E69 /* parseConst.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parseConst.cpp; sourceTree = "<group>"; };
+               FB39D2401200F35A00088E69 /* ParseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParseHelper.cpp; sourceTree = "<group>"; };
+               FB39D2411200F35A00088E69 /* ParseHelper.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = ParseHelper.h; sourceTree = "<group>"; };
+               FB39D2421200F35A00088E69 /* PoolAlloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PoolAlloc.cpp; sourceTree = "<group>"; };
+               FB39D2431200F35A00088E69 /* PoolAlloc.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = PoolAlloc.h; sourceTree = "<group>"; };
+               FB39D2451200F35A00088E69 /* atom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = atom.c; sourceTree = "<group>"; };
+               FB39D2461200F35A00088E69 /* atom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = atom.h; sourceTree = "<group>"; };
+               FB39D2471200F35A00088E69 /* compile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = compile.h; sourceTree = "<group>"; };
+               FB39D2481200F35A00088E69 /* cpp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cpp.c; sourceTree = "<group>"; };
+               FB39D2491200F35A00088E69 /* cpp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cpp.h; sourceTree = "<group>"; };
+               FB39D24A1200F35A00088E69 /* cppstruct.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = cppstruct.c; sourceTree = "<group>"; };
+               FB39D24B1200F35A00088E69 /* memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = memory.c; sourceTree = "<group>"; };
+               FB39D24C1200F35A00088E69 /* memory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = "<group>"; };
+               FB39D24D1200F35A00088E69 /* parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parser.h; sourceTree = "<group>"; };
+               FB39D24E1200F35A00088E69 /* preprocess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = preprocess.h; sourceTree = "<group>"; };
+               FB39D24F1200F35A00088E69 /* scanner.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = scanner.c; sourceTree = "<group>"; };
+               FB39D2501200F35A00088E69 /* scanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = scanner.h; sourceTree = "<group>"; };
+               FB39D2511200F35A00088E69 /* slglobals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = slglobals.h; sourceTree = "<group>"; };
+               FB39D2521200F35A00088E69 /* symbols.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = symbols.c; sourceTree = "<group>"; };
+               FB39D2531200F35A00088E69 /* symbols.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = symbols.h; sourceTree = "<group>"; };
+               FB39D2541200F35A00088E69 /* tokens.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tokens.c; sourceTree = "<group>"; };
+               FB39D2551200F35A00088E69 /* tokens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tokens.h; sourceTree = "<group>"; };
+               FB39D2561200F35A00088E69 /* QualifierAlive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = QualifierAlive.cpp; sourceTree = "<group>"; };
+               FB39D2571200F35A00088E69 /* QualifierAlive.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = QualifierAlive.h; sourceTree = "<group>"; };
+               FB39D2581200F35A00088E69 /* RemoveTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoveTree.cpp; sourceTree = "<group>"; };
+               FB39D2591200F35A00088E69 /* RemoveTree.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = RemoveTree.h; sourceTree = "<group>"; };
+               FB39D25A1200F35A00088E69 /* ShaderLang.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ShaderLang.cpp; sourceTree = "<group>"; };
+               FB39D25B1200F35A00088E69 /* ShHandle.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = ShHandle.h; sourceTree = "<group>"; };
+               FB39D25C1200F35A00088E69 /* SymbolTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolTable.cpp; sourceTree = "<group>"; };
+               FB39D25D1200F35A00088E69 /* SymbolTable.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = SymbolTable.h; sourceTree = "<group>"; };
+               FB39D2681200F35A00088E69 /* TranslatorGLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorGLSL.cpp; sourceTree = "<group>"; };
+               FB39D2691200F35A00088E69 /* TranslatorGLSL.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = TranslatorGLSL.h; sourceTree = "<group>"; };
+               FB39D26C1200F35A00088E69 /* Types.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = Types.h; sourceTree = "<group>"; };
+               FB39D26D1200F35A00088E69 /* UnfoldSelect.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UnfoldSelect.cpp; sourceTree = "<group>"; };
+               FB39D26E1200F35A00088E69 /* UnfoldSelect.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = UnfoldSelect.h; sourceTree = "<group>"; };
+               FB39D26F1200F35A00088E69 /* unistd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unistd.h; sourceTree = "<group>"; };
+               FB39D2BE1200F3E600088E69 /* ResourceLimits.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = ResourceLimits.h; sourceTree = "<group>"; };
+               FB39D2BF1200F3E600088E69 /* ShaderLang.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = ShaderLang.h; sourceTree = "<group>"; };
+               FB39D7201201032000088E69 /* glslang.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = glslang.cpp; path = src/intermediate/glslang.cpp; sourceTree = "<group>"; };
+               FB39D7211201032000088E69 /* glslang_tab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = glslang_tab.h; path = src/intermediate/glslang_tab.h; sourceTree = "<group>"; };
+               FB39D7221201032000088E69 /* glslang_tab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = glslang_tab.cpp; path = src/intermediate/glslang_tab.cpp; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               FB39D0CF1200F0E300088E69 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               FB39D06E1200ED9200088E69 = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D2201200F35A00088E69 /* compiler */,
+                               FB39D0841200EDEB00088E69 /* Source */,
+                               FB39D0CB1200EF9400088E69 /* Intermediates */,
+                               FB39D0CC1200EF9B00088E69 /* Products */,
+                       );
+                       sourceTree = "<group>";
+               };
+               FB39D0841200EDEB00088E69 /* Source */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D2BD1200F3E600088E69 /* GLSLANG */,
+                               FB39D1851200F26200088E69 /* compiler */,
+                       );
+                       name = Source;
+                       sourceTree = "<group>";
+               };
+               FB39D0CB1200EF9400088E69 /* Intermediates */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D7201201032000088E69 /* glslang.cpp */,
+                               FB39D7211201032000088E69 /* glslang_tab.h */,
+                               FB39D7221201032000088E69 /* glslang_tab.cpp */,
+                       );
+                       name = Intermediates;
+                       sourceTree = "<group>";
+               };
+               FB39D0CC1200EF9B00088E69 /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D0D11200F0E300088E69 /* libangle.a */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+               FB39D1851200F26200088E69 /* compiler */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D1861200F26200088E69 /* BaseTypes.h */,
+                               FB39D1871200F26200088E69 /* CodeGenGLSL.cpp */,
+                               FB39D1881200F26200088E69 /* CodeGenHLSL.cpp */,
+                               FB39D1891200F26200088E69 /* Common.h */,
+                               FB39D18A1200F26200088E69 /* ConstantUnion.h */,
+                               FB39D18B1200F26200088E69 /* debug.cpp */,
+                               FB39D18C1200F26200088E69 /* debug.h */,
+                               FB39D18D1200F26200088E69 /* glslang.l */,
+                               FB39D18E1200F26200088E69 /* glslang.y */,
+                               FB39D18F1200F26200088E69 /* InfoSink.cpp */,
+                               FB39D1901200F26200088E69 /* InfoSink.h */,
+                               FB39D1911200F26200088E69 /* Initialize.cpp */,
+                               FB39D1921200F26200088E69 /* Initialize.h */,
+                               FB39D1931200F26200088E69 /* InitializeDll.cpp */,
+                               FB39D1941200F26200088E69 /* InitializeDll.h */,
+                               FB39D1951200F26200088E69 /* InitializeGlobals.h */,
+                               FB39D1961200F26200088E69 /* InitializeParseContext.h */,
+                               FB39D1971200F26200088E69 /* Intermediate.cpp */,
+                               FB39D1981200F26200088E69 /* intermediate.h */,
+                               FB39D1991200F26200088E69 /* intermOut.cpp */,
+                               FB39D19A1200F26200088E69 /* IntermTraverse.cpp */,
+                               FB39D19B1200F26200088E69 /* localintermediate.h */,
+                               FB39D19C1200F26200088E69 /* MMap.h */,
+                               FB39D19D1200F26200088E69 /* osinclude.h */,
+                               FB39D19E1200F26200088E69 /* ossource_posix.cpp */,
+                               FB39D19F1200F26200088E69 /* ossource_win.cpp */,
+                               FB39D1A01200F26200088E69 /* OutputGLSL.cpp */,
+                               FB39D1A11200F26200088E69 /* OutputGLSL.h */,
+                               FB39D1A21200F26200088E69 /* OutputHLSL.cpp */,
+                               FB39D1A31200F26200088E69 /* OutputHLSL.h */,
+                               FB39D1A41200F26200088E69 /* parseConst.cpp */,
+                               FB39D1A51200F26200088E69 /* ParseHelper.cpp */,
+                               FB39D1A61200F26200088E69 /* ParseHelper.h */,
+                               FB39D1A71200F26200088E69 /* PoolAlloc.cpp */,
+                               FB39D1A81200F26200088E69 /* PoolAlloc.h */,
+                               FB39D1A91200F26200088E69 /* preprocessor */,
+                               FB39D1BB1200F26200088E69 /* QualifierAlive.cpp */,
+                               FB39D1BC1200F26200088E69 /* QualifierAlive.h */,
+                               FB39D1BD1200F26200088E69 /* RemoveTree.cpp */,
+                               FB39D1BE1200F26200088E69 /* RemoveTree.h */,
+                               FB39D1BF1200F26200088E69 /* ShaderLang.cpp */,
+                               FB39D1C01200F26200088E69 /* ShHandle.h */,
+                               FB39D1C11200F26200088E69 /* SymbolTable.cpp */,
+                               FB39D1C21200F26200088E69 /* SymbolTable.h */,
+                               FB39D1CB1200F26200088E69 /* translator_common.vcproj */,
+                               FB39D1CC1200F26200088E69 /* translator_hlsl.vcproj */,
+                               FB39D1CD1200F26200088E69 /* TranslatorGLSL.cpp */,
+                               FB39D1CE1200F26200088E69 /* TranslatorGLSL.h */,
+                               FB39D1CF1200F26200088E69 /* TranslatorHLSL.cpp */,
+                               FB39D1D01200F26200088E69 /* TranslatorHLSL.h */,
+                               FB39D1D11200F26200088E69 /* Types.h */,
+                               FB39D1D21200F26200088E69 /* UnfoldSelect.cpp */,
+                               FB39D1D31200F26200088E69 /* UnfoldSelect.h */,
+                               FB39D1D41200F26200088E69 /* unistd.h */,
+                       );
+                       includeInIndex = 0;
+                       name = compiler;
+                       path = src/compiler;
+                       sourceTree = "<group>";
+               };
+               FB39D1A91200F26200088E69 /* preprocessor */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D1AA1200F26200088E69 /* atom.c */,
+                               FB39D1AB1200F26200088E69 /* atom.h */,
+                               FB39D1AC1200F26200088E69 /* compile.h */,
+                               FB39D1AD1200F26200088E69 /* cpp.c */,
+                               FB39D1AE1200F26200088E69 /* cpp.h */,
+                               FB39D1AF1200F26200088E69 /* cppstruct.c */,
+                               FB39D1B01200F26200088E69 /* memory.c */,
+                               FB39D1B11200F26200088E69 /* memory.h */,
+                               FB39D1B21200F26200088E69 /* parser.h */,
+                               FB39D1B31200F26200088E69 /* preprocess.h */,
+                               FB39D1B41200F26200088E69 /* scanner.c */,
+                               FB39D1B51200F26200088E69 /* scanner.h */,
+                               FB39D1B61200F26200088E69 /* slglobals.h */,
+                               FB39D1B71200F26200088E69 /* symbols.c */,
+                               FB39D1B81200F26200088E69 /* symbols.h */,
+                               FB39D1B91200F26200088E69 /* tokens.c */,
+                               FB39D1BA1200F26200088E69 /* tokens.h */,
+                       );
+                       includeInIndex = 0;
+                       path = preprocessor;
+                       sourceTree = "<group>";
+               };
+               FB39D2201200F35A00088E69 /* compiler */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D2211200F35A00088E69 /* BaseTypes.h */,
+                               FB39D2221200F35A00088E69 /* CodeGenGLSL.cpp */,
+                               FB39D2241200F35A00088E69 /* Common.h */,
+                               FB39D2251200F35A00088E69 /* ConstantUnion.h */,
+                               FB39D2261200F35A00088E69 /* debug.cpp */,
+                               FB39D2271200F35A00088E69 /* debug.h */,
+                               FB39D2281200F35A00088E69 /* glslang.l */,
+                               FB39D2291200F35A00088E69 /* glslang.y */,
+                               FB39D22A1200F35A00088E69 /* InfoSink.cpp */,
+                               FB39D22B1200F35A00088E69 /* InfoSink.h */,
+                               FB39D22C1200F35A00088E69 /* Initialize.cpp */,
+                               FB39D22D1200F35A00088E69 /* Initialize.h */,
+                               FB39D22E1200F35A00088E69 /* InitializeDll.cpp */,
+                               FB39D22F1200F35A00088E69 /* InitializeDll.h */,
+                               FB39D2301200F35A00088E69 /* InitializeGlobals.h */,
+                               FB39D2311200F35A00088E69 /* InitializeParseContext.h */,
+                               FB39D2321200F35A00088E69 /* Intermediate.cpp */,
+                               FB39D2331200F35A00088E69 /* intermediate.h */,
+                               FB39D2341200F35A00088E69 /* intermOut.cpp */,
+                               FB39D2351200F35A00088E69 /* IntermTraverse.cpp */,
+                               FB39D2361200F35A00088E69 /* localintermediate.h */,
+                               FB39D2371200F35A00088E69 /* MMap.h */,
+                               FB39D2381200F35A00088E69 /* osinclude.h */,
+                               FB39D2391200F35A00088E69 /* ossource_posix.cpp */,
+                               FB39D23A1200F35A00088E69 /* ossource_win.cpp */,
+                               FB39D23B1200F35A00088E69 /* OutputGLSL.cpp */,
+                               FB39D23C1200F35A00088E69 /* OutputGLSL.h */,
+                               FB39D23F1200F35A00088E69 /* parseConst.cpp */,
+                               FB39D2401200F35A00088E69 /* ParseHelper.cpp */,
+                               FB39D2411200F35A00088E69 /* ParseHelper.h */,
+                               FB39D2421200F35A00088E69 /* PoolAlloc.cpp */,
+                               FB39D2431200F35A00088E69 /* PoolAlloc.h */,
+                               FB39D2441200F35A00088E69 /* preprocessor */,
+                               FB39D2561200F35A00088E69 /* QualifierAlive.cpp */,
+                               FB39D2571200F35A00088E69 /* QualifierAlive.h */,
+                               FB39D2581200F35A00088E69 /* RemoveTree.cpp */,
+                               FB39D2591200F35A00088E69 /* RemoveTree.h */,
+                               FB39D25A1200F35A00088E69 /* ShaderLang.cpp */,
+                               FB39D25B1200F35A00088E69 /* ShHandle.h */,
+                               FB39D25C1200F35A00088E69 /* SymbolTable.cpp */,
+                               FB39D25D1200F35A00088E69 /* SymbolTable.h */,
+                               FB39D2681200F35A00088E69 /* TranslatorGLSL.cpp */,
+                               FB39D2691200F35A00088E69 /* TranslatorGLSL.h */,
+                               FB39D26C1200F35A00088E69 /* Types.h */,
+                               FB39D26D1200F35A00088E69 /* UnfoldSelect.cpp */,
+                               FB39D26E1200F35A00088E69 /* UnfoldSelect.h */,
+                               FB39D26F1200F35A00088E69 /* unistd.h */,
+                       );
+                       name = compiler;
+                       path = src/compiler;
+                       sourceTree = "<group>";
+               };
+               FB39D2441200F35A00088E69 /* preprocessor */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D2451200F35A00088E69 /* atom.c */,
+                               FB39D2461200F35A00088E69 /* atom.h */,
+                               FB39D2471200F35A00088E69 /* compile.h */,
+                               FB39D2481200F35A00088E69 /* cpp.c */,
+                               FB39D2491200F35A00088E69 /* cpp.h */,
+                               FB39D24A1200F35A00088E69 /* cppstruct.c */,
+                               FB39D24B1200F35A00088E69 /* memory.c */,
+                               FB39D24C1200F35A00088E69 /* memory.h */,
+                               FB39D24D1200F35A00088E69 /* parser.h */,
+                               FB39D24E1200F35A00088E69 /* preprocess.h */,
+                               FB39D24F1200F35A00088E69 /* scanner.c */,
+                               FB39D2501200F35A00088E69 /* scanner.h */,
+                               FB39D2511200F35A00088E69 /* slglobals.h */,
+                               FB39D2521200F35A00088E69 /* symbols.c */,
+                               FB39D2531200F35A00088E69 /* symbols.h */,
+                               FB39D2541200F35A00088E69 /* tokens.c */,
+                               FB39D2551200F35A00088E69 /* tokens.h */,
+                       );
+                       path = preprocessor;
+                       sourceTree = "<group>";
+               };
+               FB39D2BD1200F3E600088E69 /* GLSLANG */ = {
+                       isa = PBXGroup;
+                       children = (
+                               FB39D2BE1200F3E600088E69 /* ResourceLimits.h */,
+                               FB39D2BF1200F3E600088E69 /* ShaderLang.h */,
+                       );
+                       name = GLSLANG;
+                       path = include/GLSLANG;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+               FB39D77B1201110C00088E69 /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               FB39D76D120110FC00088E69 /* ResourceLimits.h in Headers */,
+                               FB39D76E120110FC00088E69 /* ShaderLang.h in Headers */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+               FB39D0D01200F0E300088E69 /* angle */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = FB39D0D61200F11E00088E69 /* Build configuration list for PBXNativeTarget "angle" */;
+                       buildPhases = (
+                               FB39D77B1201110C00088E69 /* Headers */,
+                               FB39D0DE1200F19100088E69 /* Action "flex_glslang" */,
+                               FB39D31C1200F69200088E69 /* Action "bison_glslang" */,
+                               FB39D0CE1200F0E300088E69 /* Sources */,
+                               FB39D0CF1200F0E300088E69 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                       );
+                       name = angle;
+                       productName = angle;
+                       productReference = FB39D0D11200F0E300088E69 /* libangle.a */;
+                       productType = "com.apple.product-type.library.static";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               FB39D0701200ED9200088E69 /* Project object */ = {
+                       isa = PBXProject;
+                       buildConfigurationList = FB39D0731200ED9200088E69 /* Build configuration list for PBXProject "ANGLE" */;
+                       compatibilityVersion = "Xcode 2.4";
+                       developmentRegion = English;
+                       hasScannedForEncodings = 0;
+                       knownRegions = (
+                               English,
+                               Japanese,
+                               French,
+                               German,
+                       );
+                       mainGroup = FB39D06E1200ED9200088E69;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               FB39D0D01200F0E300088E69 /* angle */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXShellScriptBuildPhase section */
+               FB39D0DE1200F19100088E69 /* Action "flex_glslang" */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 12;
+                       files = (
+                       );
+                       inputPaths = (
+                               compiler/glslang.l,
+                       );
+                       name = "Action \"flex_glslang\"";
+                       outputPaths = (
+                               "$(INTERMEDIATE_DIR)/glslang.cpp",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "echo note: \"Executing flex on compiler/glslang.l\"\necho note: ${INTERMEDIATE_DIR}\nexec flex --noline --nounistd \"--outfile=${INTERMEDIATE_DIR}/glslang.cpp\" src/compiler/glslang.l\nexit 1";
+                       showEnvVarsInLog = 0;
+               };
+               FB39D31C1200F69200088E69 /* Action "bison_glslang" */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               compiler/glslang.y,
+                       );
+                       name = "Action \"bison_glslang\"";
+                       outputPaths = (
+                               "$(INTERMEDIATE_DIR)/glslang_tab.cpp",
+                               "$(INTERMEDIATE_DIR)/glslang_tab.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "echo note: \"Executing bison on compiler/glslang.y\"\nexec bison --no-lines \"--defines=${INTERMEDIATE_DIR}/glslang_tab.h\" \"--skeleton=yacc.c\" \"--output=${INTERMEDIATE_DIR}/glslang_tab.cpp\" src/compiler/glslang.y\nexit 1\n";
+                       showEnvVarsInLog = 0;
+               };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               FB39D0CE1200F0E300088E69 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               FB39D7231201032000088E69 /* glslang.cpp in Sources */,
+                               FB39D7241201032000088E69 /* glslang_tab.cpp in Sources */,
+                               FB39D2711200F35A00088E69 /* CodeGenGLSL.cpp in Sources */,
+                               FB39D2751200F35A00088E69 /* debug.cpp in Sources */,
+                               FB39D2791200F35A00088E69 /* InfoSink.cpp in Sources */,
+                               FB39D27B1200F35A00088E69 /* Initialize.cpp in Sources */,
+                               FB39D27D1200F35A00088E69 /* InitializeDll.cpp in Sources */,
+                               FB39D2811200F35A00088E69 /* Intermediate.cpp in Sources */,
+                               FB39D2831200F35A00088E69 /* intermOut.cpp in Sources */,
+                               FB39D2841200F35A00088E69 /* IntermTraverse.cpp in Sources */,
+                               FB39D2881200F35A00088E69 /* ossource_posix.cpp in Sources */,
+                               FB39D28A1200F35A00088E69 /* OutputGLSL.cpp in Sources */,
+                               FB39D28E1200F35A00088E69 /* parseConst.cpp in Sources */,
+                               FB39D28F1200F35A00088E69 /* ParseHelper.cpp in Sources */,
+                               FB39D2911200F35A00088E69 /* PoolAlloc.cpp in Sources */,
+                               FB39D2931200F35A00088E69 /* atom.c in Sources */,
+                               FB39D2961200F35A00088E69 /* cpp.c in Sources */,
+                               FB39D2981200F35A00088E69 /* cppstruct.c in Sources */,
+                               FB39D2991200F35A00088E69 /* memory.c in Sources */,
+                               FB39D29D1200F35A00088E69 /* scanner.c in Sources */,
+                               FB39D2A01200F35A00088E69 /* symbols.c in Sources */,
+                               FB39D2A21200F35A00088E69 /* tokens.c in Sources */,
+                               FB39D2A41200F35A00088E69 /* QualifierAlive.cpp in Sources */,
+                               FB39D2A61200F35A00088E69 /* RemoveTree.cpp in Sources */,
+                               FB39D2A81200F35A00088E69 /* ShaderLang.cpp in Sources */,
+                               FB39D2AA1200F35A00088E69 /* SymbolTable.cpp in Sources */,
+                               FB39D2AC1200F35A00088E69 /* TranslatorGLSL.cpp in Sources */,
+                               FB39D2B11200F35A00088E69 /* UnfoldSelect.cpp in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+               FB39D0711200ED9200088E69 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+                               ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
+                               COPY_PHASE_STRIP = NO;
+                               HEADER_SEARCH_PATHS = (
+                                       "$(SRCROOT)/include",
+                                       "$(SRCROOT)/src",
+                               );
+                               INTERMEDIATE_DIR = src/intermediate;
+                               PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include;
+                       };
+                       name = Debug;
+               };
+               FB39D0721200ED9200088E69 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)";
+                               ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
+                               COPY_PHASE_STRIP = YES;
+                               HEADER_SEARCH_PATHS = (
+                                       "$(SRCROOT)/include",
+                                       "$(SRCROOT)/src",
+                               );
+                               INTERMEDIATE_DIR = src/intermediate;
+                               PUBLIC_HEADERS_FOLDER_PATH = /usr/local/include;
+                       };
+                       name = Release;
+               };
+               FB39D0D21200F0E400088E69 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_ENABLE_FIX_AND_CONTINUE = YES;
+                               GCC_MODEL_TUNING = G5;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               INSTALL_PATH = /usr/local/lib;
+                               PREBINDING = NO;
+                               PRODUCT_NAME = angle;
+                       };
+                       name = Debug;
+               };
+               FB39D0D31200F0E400088E69 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ALWAYS_SEARCH_USER_PATHS = NO;
+                               COPY_PHASE_STRIP = YES;
+                               DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_MODEL_TUNING = G5;
+                               INSTALL_PATH = /usr/local/lib;
+                               PREBINDING = NO;
+                               PRODUCT_NAME = angle;
+                               ZERO_LINK = NO;
+                       };
+                       name = Release;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               FB39D0731200ED9200088E69 /* Build configuration list for PBXProject "ANGLE" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               FB39D0711200ED9200088E69 /* Debug */,
+                               FB39D0721200ED9200088E69 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               FB39D0D61200F11E00088E69 /* Build configuration list for PBXNativeTarget "angle" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               FB39D0D21200F0E400088E69 /* Debug */,
+                               FB39D0D31200F0E400088E69 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = FB39D0701200ED9200088E69 /* Project object */;
+}
diff --git a/ANGLE/ChangeLog b/ANGLE/ChangeLog
new file mode 100644 (file)
index 0000000..3442661
--- /dev/null
@@ -0,0 +1,7 @@
+2010-08-02  Paul Sawaya  <psawaya@apple.com>
+
+        Reviewed by Adele Peterson.
+
+        Add ANGLE library to WebKit. From the repository (http://angleproject.googlecode.com) as of July 22.
+        https://bugs.webkit.org/show_bug.cgi?id=42789
+        
diff --git a/ANGLE/Makefile b/ANGLE/Makefile
new file mode 100644 (file)
index 0000000..cb4c11a
--- /dev/null
@@ -0,0 +1 @@
+include ../Makefile.shared
diff --git a/ANGLE/include/EGL/egl.h b/ANGLE/include/EGL/egl.h
new file mode 100644 (file)
index 0000000..99ea342
--- /dev/null
@@ -0,0 +1,329 @@
+/* -*- mode: c; tab-width: 8; -*- */
+/* vi: set sw=4 ts=8: */
+/* Reference version of egl.h for EGL 1.4.
+ * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
+ */
+
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#ifndef __egl_h_
+#define __egl_h_
+
+/* All platform-dependent types and macro boilerplate (such as EGLAPI
+ * and EGLAPIENTRY) should go in eglplatform.h.
+ */
+#include <EGL/eglplatform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* EGL Types */
+/* EGLint is defined in eglplatform.h */
+typedef unsigned int EGLBoolean;
+typedef unsigned int EGLenum;
+typedef void *EGLConfig;
+typedef void *EGLContext;
+typedef void *EGLDisplay;
+typedef void *EGLSurface;
+typedef void *EGLClientBuffer;
+
+/* EGL Versioning */
+#define EGL_VERSION_1_0                        1
+#define EGL_VERSION_1_1                        1
+#define EGL_VERSION_1_2                        1
+#define EGL_VERSION_1_3                        1
+#define EGL_VERSION_1_4                        1
+
+/* EGL Enumerants. Bitmasks and other exceptional cases aside, most
+ * enums are assigned unique values starting at 0x3000.
+ */
+
+/* EGL aliases */
+#define EGL_FALSE                      0
+#define EGL_TRUE                       1
+
+/* Out-of-band handle values */
+#define EGL_DEFAULT_DISPLAY            ((EGLNativeDisplayType)0)
+#define EGL_NO_CONTEXT                 ((EGLContext)0)
+#define EGL_NO_DISPLAY                 ((EGLDisplay)0)
+#define EGL_NO_SURFACE                 ((EGLSurface)0)
+
+/* Out-of-band attribute value */
+#define EGL_DONT_CARE                  ((EGLint)-1)
+
+/* Errors / GetError return values */
+#define EGL_SUCCESS                    0x3000
+#define EGL_NOT_INITIALIZED            0x3001
+#define EGL_BAD_ACCESS                 0x3002
+#define EGL_BAD_ALLOC                  0x3003
+#define EGL_BAD_ATTRIBUTE              0x3004
+#define EGL_BAD_CONFIG                 0x3005
+#define EGL_BAD_CONTEXT                        0x3006
+#define EGL_BAD_CURRENT_SURFACE                0x3007
+#define EGL_BAD_DISPLAY                        0x3008
+#define EGL_BAD_MATCH                  0x3009
+#define EGL_BAD_NATIVE_PIXMAP          0x300A
+#define EGL_BAD_NATIVE_WINDOW          0x300B
+#define EGL_BAD_PARAMETER              0x300C
+#define EGL_BAD_SURFACE                        0x300D
+#define EGL_CONTEXT_LOST               0x300E  /* EGL 1.1 - IMG_power_management */
+
+/* Reserved 0x300F-0x301F for additional errors */
+
+/* Config attributes */
+#define EGL_BUFFER_SIZE                        0x3020
+#define EGL_ALPHA_SIZE                 0x3021
+#define EGL_BLUE_SIZE                  0x3022
+#define EGL_GREEN_SIZE                 0x3023
+#define EGL_RED_SIZE                   0x3024
+#define EGL_DEPTH_SIZE                 0x3025
+#define EGL_STENCIL_SIZE               0x3026
+#define EGL_CONFIG_CAVEAT              0x3027
+#define EGL_CONFIG_ID                  0x3028
+#define EGL_LEVEL                      0x3029
+#define EGL_MAX_PBUFFER_HEIGHT         0x302A
+#define EGL_MAX_PBUFFER_PIXELS         0x302B
+#define EGL_MAX_PBUFFER_WIDTH          0x302C
+#define EGL_NATIVE_RENDERABLE          0x302D
+#define EGL_NATIVE_VISUAL_ID           0x302E
+#define EGL_NATIVE_VISUAL_TYPE         0x302F
+#define EGL_SAMPLES                    0x3031
+#define EGL_SAMPLE_BUFFERS             0x3032
+#define EGL_SURFACE_TYPE               0x3033
+#define EGL_TRANSPARENT_TYPE           0x3034
+#define EGL_TRANSPARENT_BLUE_VALUE     0x3035
+#define EGL_TRANSPARENT_GREEN_VALUE    0x3036
+#define EGL_TRANSPARENT_RED_VALUE      0x3037
+#define EGL_NONE                       0x3038  /* Attrib list terminator */
+#define EGL_BIND_TO_TEXTURE_RGB                0x3039
+#define EGL_BIND_TO_TEXTURE_RGBA       0x303A
+#define EGL_MIN_SWAP_INTERVAL          0x303B
+#define EGL_MAX_SWAP_INTERVAL          0x303C
+#define EGL_LUMINANCE_SIZE             0x303D
+#define EGL_ALPHA_MASK_SIZE            0x303E
+#define EGL_COLOR_BUFFER_TYPE          0x303F
+#define EGL_RENDERABLE_TYPE            0x3040
+#define EGL_MATCH_NATIVE_PIXMAP                0x3041  /* Pseudo-attribute (not queryable) */
+#define EGL_CONFORMANT                 0x3042
+
+/* Reserved 0x3041-0x304F for additional config attributes */
+
+/* Config attribute values */
+#define EGL_SLOW_CONFIG                        0x3050  /* EGL_CONFIG_CAVEAT value */
+#define EGL_NON_CONFORMANT_CONFIG      0x3051  /* EGL_CONFIG_CAVEAT value */
+#define EGL_TRANSPARENT_RGB            0x3052  /* EGL_TRANSPARENT_TYPE value */
+#define EGL_RGB_BUFFER                 0x308E  /* EGL_COLOR_BUFFER_TYPE value */
+#define EGL_LUMINANCE_BUFFER           0x308F  /* EGL_COLOR_BUFFER_TYPE value */
+
+/* More config attribute values, for EGL_TEXTURE_FORMAT */
+#define EGL_NO_TEXTURE                 0x305C
+#define EGL_TEXTURE_RGB                        0x305D
+#define EGL_TEXTURE_RGBA               0x305E
+#define EGL_TEXTURE_2D                 0x305F
+
+/* Config attribute mask bits */
+#define EGL_PBUFFER_BIT                        0x0001  /* EGL_SURFACE_TYPE mask bits */
+#define EGL_PIXMAP_BIT                 0x0002  /* EGL_SURFACE_TYPE mask bits */
+#define EGL_WINDOW_BIT                 0x0004  /* EGL_SURFACE_TYPE mask bits */
+#define EGL_VG_COLORSPACE_LINEAR_BIT   0x0020  /* EGL_SURFACE_TYPE mask bits */
+#define EGL_VG_ALPHA_FORMAT_PRE_BIT    0x0040  /* EGL_SURFACE_TYPE mask bits */
+#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */
+#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */
+
+#define EGL_OPENGL_ES_BIT              0x0001  /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENVG_BIT                 0x0002  /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENGL_ES2_BIT             0x0004  /* EGL_RENDERABLE_TYPE mask bits */
+#define EGL_OPENGL_BIT                 0x0008  /* EGL_RENDERABLE_TYPE mask bits */
+
+/* QueryString targets */
+#define EGL_VENDOR                     0x3053
+#define EGL_VERSION                    0x3054
+#define EGL_EXTENSIONS                 0x3055
+#define EGL_CLIENT_APIS                        0x308D
+
+/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */
+#define EGL_HEIGHT                     0x3056
+#define EGL_WIDTH                      0x3057
+#define EGL_LARGEST_PBUFFER            0x3058
+#define EGL_TEXTURE_FORMAT             0x3080
+#define EGL_TEXTURE_TARGET             0x3081
+#define EGL_MIPMAP_TEXTURE             0x3082
+#define EGL_MIPMAP_LEVEL               0x3083
+#define EGL_RENDER_BUFFER              0x3086
+#define EGL_VG_COLORSPACE              0x3087
+#define EGL_VG_ALPHA_FORMAT            0x3088
+#define EGL_HORIZONTAL_RESOLUTION      0x3090
+#define EGL_VERTICAL_RESOLUTION                0x3091
+#define EGL_PIXEL_ASPECT_RATIO         0x3092
+#define EGL_SWAP_BEHAVIOR              0x3093
+#define EGL_MULTISAMPLE_RESOLVE                0x3099
+
+/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */
+#define EGL_BACK_BUFFER                        0x3084
+#define EGL_SINGLE_BUFFER              0x3085
+
+/* OpenVG color spaces */
+#define EGL_VG_COLORSPACE_sRGB         0x3089  /* EGL_VG_COLORSPACE value */
+#define EGL_VG_COLORSPACE_LINEAR       0x308A  /* EGL_VG_COLORSPACE value */
+
+/* OpenVG alpha formats */
+#define EGL_VG_ALPHA_FORMAT_NONPRE     0x308B  /* EGL_ALPHA_FORMAT value */
+#define EGL_VG_ALPHA_FORMAT_PRE                0x308C  /* EGL_ALPHA_FORMAT value */
+
+/* Constant scale factor by which fractional display resolutions &
+ * aspect ratio are scaled when queried as integer values.
+ */
+#define EGL_DISPLAY_SCALING            10000
+
+/* Unknown display resolution/aspect ratio */
+#define EGL_UNKNOWN                    ((EGLint)-1)
+
+/* Back buffer swap behaviors */
+#define EGL_BUFFER_PRESERVED           0x3094  /* EGL_SWAP_BEHAVIOR value */
+#define EGL_BUFFER_DESTROYED           0x3095  /* EGL_SWAP_BEHAVIOR value */
+
+/* CreatePbufferFromClientBuffer buffer types */
+#define EGL_OPENVG_IMAGE               0x3096
+
+/* QueryContext targets */
+#define EGL_CONTEXT_CLIENT_TYPE                0x3097
+
+/* CreateContext attributes */
+#define EGL_CONTEXT_CLIENT_VERSION     0x3098
+
+/* Multisample resolution behaviors */
+#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */
+#define EGL_MULTISAMPLE_RESOLVE_BOX    0x309B  /* EGL_MULTISAMPLE_RESOLVE value */
+
+/* BindAPI/QueryAPI targets */
+#define EGL_OPENGL_ES_API              0x30A0
+#define EGL_OPENVG_API                 0x30A1
+#define EGL_OPENGL_API                 0x30A2
+
+/* GetCurrentSurface targets */
+#define EGL_DRAW                       0x3059
+#define EGL_READ                       0x305A
+
+/* WaitNative engines */
+#define EGL_CORE_NATIVE_ENGINE         0x305B
+
+/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */
+#define EGL_COLORSPACE                 EGL_VG_COLORSPACE
+#define EGL_ALPHA_FORMAT               EGL_VG_ALPHA_FORMAT
+#define EGL_COLORSPACE_sRGB            EGL_VG_COLORSPACE_sRGB
+#define EGL_COLORSPACE_LINEAR          EGL_VG_COLORSPACE_LINEAR
+#define EGL_ALPHA_FORMAT_NONPRE                EGL_VG_ALPHA_FORMAT_NONPRE
+#define EGL_ALPHA_FORMAT_PRE           EGL_VG_ALPHA_FORMAT_PRE
+
+/* EGL extensions must request enum blocks from the Khronos
+ * API Registrar, who maintains the enumerant registry. Submit
+ * a bug in Khronos Bugzilla against task "Registry".
+ */
+
+
+
+/* EGL Functions */
+
+EGLAPI EGLint EGLAPIENTRY eglGetError(void);
+
+EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id);
+EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor);
+EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy);
+
+EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs,
+                        EGLint config_size, EGLint *num_config);
+EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list,
+                          EGLConfig *configs, EGLint config_size,
+                          EGLint *num_config);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config,
+                             EGLint attribute, EGLint *value);
+
+EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
+                                 EGLNativeWindowType win,
+                                 const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config,
+                                  const EGLint *attrib_list);
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config,
+                                 EGLNativePixmapType pixmap,
+                                 const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface);
+EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface,
+                          EGLint attribute, EGLint *value);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api);
+EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void);
+
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(
+             EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
+             EGLConfig config, const EGLint *attrib_list);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface,
+                           EGLint attribute, EGLint value);
+EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
+EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
+
+
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval);
+
+
+EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config,
+                           EGLContext share_context,
+                           const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx);
+EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw,
+                         EGLSurface read, EGLContext ctx);
+
+EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void);
+EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw);
+EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void);
+EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx,
+                          EGLint attribute, EGLint *value);
+
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void);
+EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine);
+EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface);
+EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface,
+                         EGLNativePixmapType target);
+
+/* This is a generic function pointer type, whose name indicates it must
+ * be cast to the proper type *and calling convention* before use.
+ */
+typedef void (*__eglMustCastToProperFunctionPointerType)(void);
+
+/* Now, define eglGetProcAddress using the generic function ptr. type */
+EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY
+       eglGetProcAddress(const char *procname);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __egl_h_ */
diff --git a/ANGLE/include/EGL/eglext.h b/ANGLE/include/EGL/eglext.h
new file mode 100644 (file)
index 0000000..638e336
--- /dev/null
@@ -0,0 +1,222 @@
+#ifndef __eglext_h_
+#define __eglext_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+#include <EGL/eglplatform.h>
+
+/*************************************************************/
+
+/* Header file version number */
+/* Current version at http://www.khronos.org/registry/egl/ */
+/* $Revision: 10795 $ on $Date: 2010-03-19 17:04:17 -0700 (Fri, 19 Mar 2010) $ */
+#define EGL_EGLEXT_VERSION 5
+
+#ifndef EGL_KHR_config_attribs
+#define EGL_KHR_config_attribs 1
+#define EGL_CONFORMANT_KHR                     0x3042  /* EGLConfig attribute */
+#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR       0x0020  /* EGL_SURFACE_TYPE bitfield */
+#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR                0x0040  /* EGL_SURFACE_TYPE bitfield */
+#endif
+
+#ifndef EGL_KHR_lock_surface
+#define EGL_KHR_lock_surface 1
+#define EGL_READ_SURFACE_BIT_KHR               0x0001  /* EGL_LOCK_USAGE_HINT_KHR bitfield */
+#define EGL_WRITE_SURFACE_BIT_KHR              0x0002  /* EGL_LOCK_USAGE_HINT_KHR bitfield */
+#define EGL_LOCK_SURFACE_BIT_KHR               0x0080  /* EGL_SURFACE_TYPE bitfield */
+#define EGL_OPTIMAL_FORMAT_BIT_KHR             0x0100  /* EGL_SURFACE_TYPE bitfield */
+#define EGL_MATCH_FORMAT_KHR                   0x3043  /* EGLConfig attribute */
+#define EGL_FORMAT_RGB_565_EXACT_KHR           0x30C0  /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGB_565_KHR                 0x30C1  /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGBA_8888_EXACT_KHR         0x30C2  /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_FORMAT_RGBA_8888_KHR               0x30C3  /* EGL_MATCH_FORMAT_KHR value */
+#define EGL_MAP_PRESERVE_PIXELS_KHR            0x30C4  /* eglLockSurfaceKHR attribute */
+#define EGL_LOCK_USAGE_HINT_KHR                        0x30C5  /* eglLockSurfaceKHR attribute */
+#define EGL_BITMAP_POINTER_KHR                 0x30C6  /* eglQuerySurface attribute */
+#define EGL_BITMAP_PITCH_KHR                   0x30C7  /* eglQuerySurface attribute */
+#define EGL_BITMAP_ORIGIN_KHR                  0x30C8  /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR                0x30C9  /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR      0x30CA  /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR       0x30CB  /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR      0x30CC  /* eglQuerySurface attribute */
+#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR  0x30CD  /* eglQuerySurface attribute */
+#define EGL_LOWER_LEFT_KHR                     0x30CE  /* EGL_BITMAP_ORIGIN_KHR value */
+#define EGL_UPPER_LEFT_KHR                     0x30CF  /* EGL_BITMAP_ORIGIN_KHR value */
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface);
+#endif
+
+#ifndef EGL_KHR_image
+#define EGL_KHR_image 1
+#define EGL_NATIVE_PIXMAP_KHR                  0x30B0  /* eglCreateImageKHR target */
+typedef void *EGLImageKHR;
+#define EGL_NO_IMAGE_KHR                       ((EGLImageKHR)0)
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image);
+#endif
+
+#ifndef EGL_KHR_vg_parent_image
+#define EGL_KHR_vg_parent_image 1
+#define EGL_VG_PARENT_IMAGE_KHR                        0x30BA  /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_gl_texture_2D_image
+#define EGL_KHR_gl_texture_2D_image 1
+#define EGL_GL_TEXTURE_2D_KHR                  0x30B1  /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_LEVEL_KHR               0x30BC  /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_gl_texture_cubemap_image
+#define EGL_KHR_gl_texture_cubemap_image 1
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3  /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4  /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5  /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6  /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7  /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8  /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_gl_texture_3D_image
+#define EGL_KHR_gl_texture_3D_image 1
+#define EGL_GL_TEXTURE_3D_KHR                  0x30B2  /* eglCreateImageKHR target */
+#define EGL_GL_TEXTURE_ZOFFSET_KHR             0x30BD  /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_gl_renderbuffer_image
+#define EGL_KHR_gl_renderbuffer_image 1
+#define EGL_GL_RENDERBUFFER_KHR                        0x30B9  /* eglCreateImageKHR target */
+#endif
+
+#ifndef EGL_KHR_reusable_sync
+#define EGL_KHR_reusable_sync 1
+
+typedef void* EGLSyncKHR;
+typedef khronos_utime_nanoseconds_t EGLTimeKHR;
+
+#define EGL_SYNC_STATUS_KHR                    0x30F1
+#define EGL_SIGNALED_KHR                       0x30F2
+#define EGL_UNSIGNALED_KHR                     0x30F3
+#define EGL_TIMEOUT_EXPIRED_KHR                        0x30F5
+#define EGL_CONDITION_SATISFIED_KHR            0x30F6
+#define EGL_SYNC_TYPE_KHR                      0x30F7
+#define EGL_SYNC_REUSABLE_KHR                  0x30FA
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR                0x0001  /* eglClientWaitSyncKHR <flags> bitfield */
+#define EGL_FOREVER_KHR                                0xFFFFFFFFFFFFFFFFull
+#define EGL_NO_SYNC_KHR                                ((EGLSyncKHR)0)
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync);
+EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
+#endif
+
+#ifndef EGL_KHR_image_base
+#define EGL_KHR_image_base 1
+/* Most interfaces defined by EGL_KHR_image_pixmap above */
+#define EGL_IMAGE_PRESERVED_KHR                        0x30D2  /* eglCreateImageKHR attribute */
+#endif
+
+#ifndef EGL_KHR_image_pixmap
+#define EGL_KHR_image_pixmap 1
+/* Interfaces defined by EGL_KHR_image above */
+#endif
+
+#ifndef EGL_IMG_context_priority
+#define EGL_IMG_context_priority 1
+#define EGL_CONTEXT_PRIORITY_LEVEL_IMG         0x3100
+#define EGL_CONTEXT_PRIORITY_HIGH_IMG          0x3101
+#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG                0x3102
+#define EGL_CONTEXT_PRIORITY_LOW_IMG           0x3103
+#endif
+
+#ifndef EGL_NV_coverage_sample
+#define EGL_NV_coverage_sample 1
+#define EGL_COVERAGE_BUFFERS_NV 0x30E0
+#define EGL_COVERAGE_SAMPLES_NV 0x30E1
+#endif
+
+#ifndef EGL_NV_depth_nonlinear
+#define EGL_NV_depth_nonlinear 1
+#define EGL_DEPTH_ENCODING_NV 0x30E2
+#define EGL_DEPTH_ENCODING_NONE_NV 0
+#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
+#endif
+
+#ifndef EGL_NV_sync
+#define EGL_NV_sync 1
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV    0x30E6
+#define EGL_SYNC_STATUS_NV                     0x30E7
+#define EGL_SIGNALED_NV                                0x30E8
+#define EGL_UNSIGNALED_NV                      0x30E9
+#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV         0x0001
+#define EGL_FOREVER_NV                         0xFFFFFFFFFFFFFFFFull
+#define EGL_ALREADY_SIGNALED_NV                        0x30EA
+#define EGL_TIMEOUT_EXPIRED_NV                 0x30EB
+#define EGL_CONDITION_SATISFIED_NV             0x30EC
+#define EGL_SYNC_TYPE_NV                       0x30ED
+#define EGL_SYNC_CONDITION_NV                  0x30EE
+#define EGL_SYNC_FENCE_NV                      0x30EF
+#define EGL_NO_SYNC_NV                         ((EGLSyncNV)0)
+typedef void* EGLSyncNV;
+typedef unsigned long long EGLTimeNV;
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
+EGLBoolean eglFenceNV (EGLSyncNV sync);
+EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode);
+EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync);
+typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/ANGLE/include/EGL/eglplatform.h b/ANGLE/include/EGL/eglplatform.h
new file mode 100644 (file)
index 0000000..22e855f
--- /dev/null
@@ -0,0 +1,110 @@
+#ifndef __eglplatform_h_
+#define __eglplatform_h_
+
+/*
+** Copyright (c) 2007-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Platform-specific types and definitions for egl.h
+ * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file.  Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "EGL" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+/* Macros used in EGL function prototype declarations.
+ *
+ * EGL functions should be prototyped as:
+ *
+ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments);
+ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments);
+ *
+ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h
+ */
+
+#ifndef EGLAPI
+#define EGLAPI KHRONOS_APICALL
+#endif
+
+#ifndef EGLAPIENTRY
+#define EGLAPIENTRY  KHRONOS_APIENTRY
+#endif
+#define EGLAPIENTRYP EGLAPIENTRY*
+
+/* The types NativeDisplayType, NativeWindowType, and NativePixmapType
+ * are aliases of window-system-dependent types, such as X Display * or
+ * Windows Device Context. They must be defined in platform-specific
+ * code below. The EGL-prefixed versions of Native*Type are the same
+ * types, renamed in EGL 1.3 so all types in the API start with "EGL".
+ */
+
+#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN 1
+#endif
+#include <windows.h>
+
+typedef HDC     EGLNativeDisplayType;
+typedef HBITMAP EGLNativePixmapType;
+typedef HWND    EGLNativeWindowType;
+
+#elif defined(__WINSCW__) || defined(__SYMBIAN32__)  /* Symbian */
+
+typedef int   EGLNativeDisplayType;
+typedef void *EGLNativeWindowType;
+typedef void *EGLNativePixmapType;
+
+#elif defined(__unix__)
+
+/* X11 (tentative)  */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+
+typedef Display *EGLNativeDisplayType;
+typedef Pixmap   EGLNativePixmapType;
+typedef Window   EGLNativeWindowType;
+
+#else
+#error "Platform not recognized"
+#endif
+
+/* EGL 1.2 types, renamed for consistency in EGL 1.3 */
+typedef EGLNativeDisplayType NativeDisplayType;
+typedef EGLNativePixmapType  NativePixmapType;
+typedef EGLNativeWindowType  NativeWindowType;
+
+
+/* Define EGLint. This must be a signed integral type large enough to contain
+ * all legal attribute names and values passed into and out of EGL, whether
+ * their type is boolean, bitmask, enumerant (symbolic constant), integer,
+ * handle, or other.  While in general a 32-bit integer will suffice, if
+ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit
+ * integer type.
+ */
+typedef khronos_int32_t EGLint;
+
+#endif /* __eglplatform_h */
diff --git a/ANGLE/include/GLES2/gl2.h b/ANGLE/include/GLES2/gl2.h
new file mode 100644 (file)
index 0000000..e1d3b87
--- /dev/null
@@ -0,0 +1,621 @@
+#ifndef __gl2_h_
+#define __gl2_h_
+
+/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
+
+#include <GLES2/gl2platform.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/*-------------------------------------------------------------------------
+ * Data type definitions
+ *-----------------------------------------------------------------------*/
+
+typedef void             GLvoid;
+typedef char             GLchar;
+typedef unsigned int     GLenum;
+typedef unsigned char    GLboolean;
+typedef unsigned int     GLbitfield;
+typedef khronos_int8_t   GLbyte;
+typedef short            GLshort;
+typedef int              GLint;
+typedef int              GLsizei;
+typedef khronos_uint8_t  GLubyte;
+typedef unsigned short   GLushort;
+typedef unsigned int     GLuint;
+typedef khronos_float_t  GLfloat;
+typedef khronos_float_t  GLclampf;
+typedef khronos_int32_t  GLfixed;
+
+/* GL types for handling large vertex buffer objects */
+typedef khronos_intptr_t GLintptr;
+typedef khronos_ssize_t  GLsizeiptr;
+
+/* OpenGL ES core versions */
+#define GL_ES_VERSION_2_0                 1
+
+/* ClearBufferMask */
+#define GL_DEPTH_BUFFER_BIT               0x00000100
+#define GL_STENCIL_BUFFER_BIT             0x00000400
+#define GL_COLOR_BUFFER_BIT               0x00004000
+
+/* Boolean */
+#define GL_FALSE                          0
+#define GL_TRUE                           1
+
+/* BeginMode */
+#define GL_POINTS                         0x0000
+#define GL_LINES                          0x0001
+#define GL_LINE_LOOP                      0x0002
+#define GL_LINE_STRIP                     0x0003
+#define GL_TRIANGLES                      0x0004
+#define GL_TRIANGLE_STRIP                 0x0005
+#define GL_TRIANGLE_FAN                   0x0006
+
+/* AlphaFunction (not supported in ES20) */
+/*      GL_NEVER */
+/*      GL_LESS */
+/*      GL_EQUAL */
+/*      GL_LEQUAL */
+/*      GL_GREATER */
+/*      GL_NOTEQUAL */
+/*      GL_GEQUAL */
+/*      GL_ALWAYS */
+
+/* BlendingFactorDest */
+#define GL_ZERO                           0
+#define GL_ONE                            1
+#define GL_SRC_COLOR                      0x0300
+#define GL_ONE_MINUS_SRC_COLOR            0x0301
+#define GL_SRC_ALPHA                      0x0302
+#define GL_ONE_MINUS_SRC_ALPHA            0x0303
+#define GL_DST_ALPHA                      0x0304
+#define GL_ONE_MINUS_DST_ALPHA            0x0305
+
+/* BlendingFactorSrc */
+/*      GL_ZERO */
+/*      GL_ONE */
+#define GL_DST_COLOR                      0x0306
+#define GL_ONE_MINUS_DST_COLOR            0x0307
+#define GL_SRC_ALPHA_SATURATE             0x0308
+/*      GL_SRC_ALPHA */
+/*      GL_ONE_MINUS_SRC_ALPHA */
+/*      GL_DST_ALPHA */
+/*      GL_ONE_MINUS_DST_ALPHA */
+
+/* BlendEquationSeparate */
+#define GL_FUNC_ADD                       0x8006
+#define GL_BLEND_EQUATION                 0x8009
+#define GL_BLEND_EQUATION_RGB             0x8009    /* same as BLEND_EQUATION */
+#define GL_BLEND_EQUATION_ALPHA           0x883D
+
+/* BlendSubtract */
+#define GL_FUNC_SUBTRACT                  0x800A
+#define GL_FUNC_REVERSE_SUBTRACT          0x800B
+
+/* Separate Blend Functions */
+#define GL_BLEND_DST_RGB                  0x80C8
+#define GL_BLEND_SRC_RGB                  0x80C9
+#define GL_BLEND_DST_ALPHA                0x80CA
+#define GL_BLEND_SRC_ALPHA                0x80CB
+#define GL_CONSTANT_COLOR                 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR       0x8002
+#define GL_CONSTANT_ALPHA                 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA       0x8004
+#define GL_BLEND_COLOR                    0x8005
+
+/* Buffer Objects */
+#define GL_ARRAY_BUFFER                   0x8892
+#define GL_ELEMENT_ARRAY_BUFFER           0x8893
+#define GL_ARRAY_BUFFER_BINDING           0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING   0x8895
+
+#define GL_STREAM_DRAW                    0x88E0
+#define GL_STATIC_DRAW                    0x88E4
+#define GL_DYNAMIC_DRAW                   0x88E8
+
+#define GL_BUFFER_SIZE                    0x8764
+#define GL_BUFFER_USAGE                   0x8765
+
+#define GL_CURRENT_VERTEX_ATTRIB          0x8626
+
+/* CullFaceMode */
+#define GL_FRONT                          0x0404
+#define GL_BACK                           0x0405
+#define GL_FRONT_AND_BACK                 0x0408
+
+/* DepthFunction */
+/*      GL_NEVER */
+/*      GL_LESS */
+/*      GL_EQUAL */
+/*      GL_LEQUAL */
+/*      GL_GREATER */
+/*      GL_NOTEQUAL */
+/*      GL_GEQUAL */
+/*      GL_ALWAYS */
+
+/* EnableCap */
+#define GL_TEXTURE_2D                     0x0DE1
+#define GL_CULL_FACE                      0x0B44
+#define GL_BLEND                          0x0BE2
+#define GL_DITHER                         0x0BD0
+#define GL_STENCIL_TEST                   0x0B90
+#define GL_DEPTH_TEST                     0x0B71
+#define GL_SCISSOR_TEST                   0x0C11
+#define GL_POLYGON_OFFSET_FILL            0x8037
+#define GL_SAMPLE_ALPHA_TO_COVERAGE       0x809E
+#define GL_SAMPLE_COVERAGE                0x80A0
+
+/* ErrorCode */
+#define GL_NO_ERROR                       0
+#define GL_INVALID_ENUM                   0x0500
+#define GL_INVALID_VALUE                  0x0501
+#define GL_INVALID_OPERATION              0x0502
+#define GL_OUT_OF_MEMORY                  0x0505
+
+/* FrontFaceDirection */
+#define GL_CW                             0x0900
+#define GL_CCW                            0x0901
+
+/* GetPName */
+#define GL_LINE_WIDTH                     0x0B21
+#define GL_ALIASED_POINT_SIZE_RANGE       0x846D
+#define GL_ALIASED_LINE_WIDTH_RANGE       0x846E
+#define GL_CULL_FACE_MODE                 0x0B45
+#define GL_FRONT_FACE                     0x0B46
+#define GL_DEPTH_RANGE                    0x0B70
+#define GL_DEPTH_WRITEMASK                0x0B72
+#define GL_DEPTH_CLEAR_VALUE              0x0B73
+#define GL_DEPTH_FUNC                     0x0B74
+#define GL_STENCIL_CLEAR_VALUE            0x0B91
+#define GL_STENCIL_FUNC                   0x0B92
+#define GL_STENCIL_FAIL                   0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL        0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS        0x0B96
+#define GL_STENCIL_REF                    0x0B97
+#define GL_STENCIL_VALUE_MASK             0x0B93
+#define GL_STENCIL_WRITEMASK              0x0B98
+#define GL_STENCIL_BACK_FUNC              0x8800
+#define GL_STENCIL_BACK_FAIL              0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL   0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS   0x8803
+#define GL_STENCIL_BACK_REF               0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK        0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK         0x8CA5
+#define GL_VIEWPORT                       0x0BA2
+#define GL_SCISSOR_BOX                    0x0C10
+/*      GL_SCISSOR_TEST */
+#define GL_COLOR_CLEAR_VALUE              0x0C22
+#define GL_COLOR_WRITEMASK                0x0C23
+#define GL_UNPACK_ALIGNMENT               0x0CF5
+#define GL_PACK_ALIGNMENT                 0x0D05
+#define GL_MAX_TEXTURE_SIZE               0x0D33
+#define GL_MAX_VIEWPORT_DIMS              0x0D3A
+#define GL_SUBPIXEL_BITS                  0x0D50
+#define GL_RED_BITS                       0x0D52
+#define GL_GREEN_BITS                     0x0D53
+#define GL_BLUE_BITS                      0x0D54
+#define GL_ALPHA_BITS                     0x0D55
+#define GL_DEPTH_BITS                     0x0D56
+#define GL_STENCIL_BITS                   0x0D57
+#define GL_POLYGON_OFFSET_UNITS           0x2A00
+/*      GL_POLYGON_OFFSET_FILL */
+#define GL_POLYGON_OFFSET_FACTOR          0x8038
+#define GL_TEXTURE_BINDING_2D             0x8069
+#define GL_SAMPLE_BUFFERS                 0x80A8
+#define GL_SAMPLES                        0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE          0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT         0x80AB
+
+/* GetTextureParameter */
+/*      GL_TEXTURE_MAG_FILTER */
+/*      GL_TEXTURE_MIN_FILTER */
+/*      GL_TEXTURE_WRAP_S */
+/*      GL_TEXTURE_WRAP_T */
+
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS     0x86A3
+
+/* HintMode */
+#define GL_DONT_CARE                      0x1100
+#define GL_FASTEST                        0x1101
+#define GL_NICEST                         0x1102
+
+/* HintTarget */
+#define GL_GENERATE_MIPMAP_HINT            0x8192
+
+/* DataType */
+#define GL_BYTE                           0x1400
+#define GL_UNSIGNED_BYTE                  0x1401
+#define GL_SHORT                          0x1402
+#define GL_UNSIGNED_SHORT                 0x1403
+#define GL_INT                            0x1404
+#define GL_UNSIGNED_INT                   0x1405
+#define GL_FLOAT                          0x1406
+#define GL_FIXED                          0x140C
+
+/* PixelFormat */
+#define GL_DEPTH_COMPONENT                0x1902
+#define GL_ALPHA                          0x1906
+#define GL_RGB                            0x1907
+#define GL_RGBA                           0x1908
+#define GL_LUMINANCE                      0x1909
+#define GL_LUMINANCE_ALPHA                0x190A
+
+/* PixelType */
+/*      GL_UNSIGNED_BYTE */
+#define GL_UNSIGNED_SHORT_4_4_4_4         0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1         0x8034
+#define GL_UNSIGNED_SHORT_5_6_5           0x8363
+
+/* Shaders */
+#define GL_FRAGMENT_SHADER                  0x8B30
+#define GL_VERTEX_SHADER                    0x8B31
+#define GL_MAX_VERTEX_ATTRIBS               0x8869
+#define GL_MAX_VERTEX_UNIFORM_VECTORS       0x8DFB
+#define GL_MAX_VARYING_VECTORS              0x8DFC
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS   0x8B4C
+#define GL_MAX_TEXTURE_IMAGE_UNITS          0x8872
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS     0x8DFD
+#define GL_SHADER_TYPE                      0x8B4F
+#define GL_DELETE_STATUS                    0x8B80
+#define GL_LINK_STATUS                      0x8B82
+#define GL_VALIDATE_STATUS                  0x8B83
+#define GL_ATTACHED_SHADERS                 0x8B85
+#define GL_ACTIVE_UNIFORMS                  0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH        0x8B87
+#define GL_ACTIVE_ATTRIBUTES                0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH      0x8B8A
+#define GL_SHADING_LANGUAGE_VERSION         0x8B8C
+#define GL_CURRENT_PROGRAM                  0x8B8D
+
+/* StencilFunction */
+#define GL_NEVER                          0x0200
+#define GL_LESS                           0x0201
+#define GL_EQUAL                          0x0202
+#define GL_LEQUAL                         0x0203
+#define GL_GREATER                        0x0204
+#define GL_NOTEQUAL                       0x0205
+#define GL_GEQUAL                         0x0206
+#define GL_ALWAYS                         0x0207
+
+/* StencilOp */
+/*      GL_ZERO */
+#define GL_KEEP                           0x1E00
+#define GL_REPLACE                        0x1E01
+#define GL_INCR                           0x1E02
+#define GL_DECR                           0x1E03
+#define GL_INVERT                         0x150A
+#define GL_INCR_WRAP                      0x8507
+#define GL_DECR_WRAP                      0x8508
+
+/* StringName */
+#define GL_VENDOR                         0x1F00
+#define GL_RENDERER                       0x1F01
+#define GL_VERSION                        0x1F02
+#define GL_EXTENSIONS                     0x1F03
+
+/* TextureMagFilter */
+#define GL_NEAREST                        0x2600
+#define GL_LINEAR                         0x2601
+
+/* TextureMinFilter */
+/*      GL_NEAREST */
+/*      GL_LINEAR */
+#define GL_NEAREST_MIPMAP_NEAREST         0x2700
+#define GL_LINEAR_MIPMAP_NEAREST          0x2701
+#define GL_NEAREST_MIPMAP_LINEAR          0x2702
+#define GL_LINEAR_MIPMAP_LINEAR           0x2703
+
+/* TextureParameterName */
+#define GL_TEXTURE_MAG_FILTER             0x2800
+#define GL_TEXTURE_MIN_FILTER             0x2801
+#define GL_TEXTURE_WRAP_S                 0x2802
+#define GL_TEXTURE_WRAP_T                 0x2803
+
+/* TextureTarget */
+/*      GL_TEXTURE_2D */
+#define GL_TEXTURE                        0x1702
+
+#define GL_TEXTURE_CUBE_MAP               0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP       0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X    0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X    0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y    0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y    0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z    0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z    0x851A
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE      0x851C
+
+/* TextureUnit */
+#define GL_TEXTURE0                       0x84C0
+#define GL_TEXTURE1                       0x84C1
+#define GL_TEXTURE2                       0x84C2
+#define GL_TEXTURE3                       0x84C3
+#define GL_TEXTURE4                       0x84C4
+#define GL_TEXTURE5                       0x84C5
+#define GL_TEXTURE6                       0x84C6
+#define GL_TEXTURE7                       0x84C7
+#define GL_TEXTURE8                       0x84C8
+#define GL_TEXTURE9                       0x84C9
+#define GL_TEXTURE10                      0x84CA
+#define GL_TEXTURE11                      0x84CB
+#define GL_TEXTURE12                      0x84CC
+#define GL_TEXTURE13                      0x84CD
+#define GL_TEXTURE14                      0x84CE
+#define GL_TEXTURE15                      0x84CF
+#define GL_TEXTURE16                      0x84D0
+#define GL_TEXTURE17                      0x84D1
+#define GL_TEXTURE18                      0x84D2
+#define GL_TEXTURE19                      0x84D3
+#define GL_TEXTURE20                      0x84D4
+#define GL_TEXTURE21                      0x84D5
+#define GL_TEXTURE22                      0x84D6
+#define GL_TEXTURE23                      0x84D7
+#define GL_TEXTURE24                      0x84D8
+#define GL_TEXTURE25                      0x84D9
+#define GL_TEXTURE26                      0x84DA
+#define GL_TEXTURE27                      0x84DB
+#define GL_TEXTURE28                      0x84DC
+#define GL_TEXTURE29                      0x84DD
+#define GL_TEXTURE30                      0x84DE
+#define GL_TEXTURE31                      0x84DF
+#define GL_ACTIVE_TEXTURE                 0x84E0
+
+/* TextureWrapMode */
+#define GL_REPEAT                         0x2901
+#define GL_CLAMP_TO_EDGE                  0x812F
+#define GL_MIRRORED_REPEAT                0x8370
+
+/* Uniform Types */
+#define GL_FLOAT_VEC2                     0x8B50
+#define GL_FLOAT_VEC3                     0x8B51
+#define GL_FLOAT_VEC4                     0x8B52
+#define GL_INT_VEC2                       0x8B53
+#define GL_INT_VEC3                       0x8B54
+#define GL_INT_VEC4                       0x8B55
+#define GL_BOOL                           0x8B56
+#define GL_BOOL_VEC2                      0x8B57
+#define GL_BOOL_VEC3                      0x8B58
+#define GL_BOOL_VEC4                      0x8B59
+#define GL_FLOAT_MAT2                     0x8B5A
+#define GL_FLOAT_MAT3                     0x8B5B
+#define GL_FLOAT_MAT4                     0x8B5C
+#define GL_SAMPLER_2D                     0x8B5E
+#define GL_SAMPLER_CUBE                   0x8B60
+
+/* Vertex Arrays */
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED        0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE           0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE         0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE           0x8625
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED     0x886A
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER        0x8645
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+
+/* Read Format */
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE   0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+
+/* Shader Source */
+#define GL_COMPILE_STATUS                 0x8B81
+#define GL_INFO_LOG_LENGTH                0x8B84
+#define GL_SHADER_SOURCE_LENGTH           0x8B88
+#define GL_SHADER_COMPILER                0x8DFA
+
+/* Shader Binary */
+#define GL_SHADER_BINARY_FORMATS          0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS      0x8DF9
+
+/* Shader Precision-Specified Types */
+#define GL_LOW_FLOAT                      0x8DF0
+#define GL_MEDIUM_FLOAT                   0x8DF1
+#define GL_HIGH_FLOAT                     0x8DF2
+#define GL_LOW_INT                        0x8DF3
+#define GL_MEDIUM_INT                     0x8DF4
+#define GL_HIGH_INT                       0x8DF5
+
+/* Framebuffer Object. */
+#define GL_FRAMEBUFFER                    0x8D40
+#define GL_RENDERBUFFER                   0x8D41
+
+#define GL_RGBA4                          0x8056
+#define GL_RGB5_A1                        0x8057
+#define GL_RGB565                         0x8D62
+#define GL_DEPTH_COMPONENT16              0x81A5
+#define GL_STENCIL_INDEX                  0x1901
+#define GL_STENCIL_INDEX8                 0x8D48
+
+#define GL_RENDERBUFFER_WIDTH             0x8D42
+#define GL_RENDERBUFFER_HEIGHT            0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT   0x8D44
+#define GL_RENDERBUFFER_RED_SIZE          0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE        0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE         0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE        0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE        0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE      0x8D55
+
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE           0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME           0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL         0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+
+#define GL_COLOR_ATTACHMENT0              0x8CE0
+#define GL_DEPTH_ATTACHMENT               0x8D00
+#define GL_STENCIL_ATTACHMENT             0x8D20
+
+#define GL_NONE                           0
+
+#define GL_FRAMEBUFFER_COMPLETE                      0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT         0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS         0x8CD9
+#define GL_FRAMEBUFFER_UNSUPPORTED                   0x8CDD
+
+#define GL_FRAMEBUFFER_BINDING            0x8CA6
+#define GL_RENDERBUFFER_BINDING           0x8CA7
+#define GL_MAX_RENDERBUFFER_SIZE          0x84E8
+
+#define GL_INVALID_FRAMEBUFFER_OPERATION  0x0506
+
+/*-------------------------------------------------------------------------
+ * GL core functions.
+ *-----------------------------------------------------------------------*/
+
+GL_APICALL void         GL_APIENTRY glActiveTexture (GLenum texture);
+GL_APICALL void         GL_APIENTRY glAttachShader (GLuint program, GLuint shader);
+GL_APICALL void         GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name);
+GL_APICALL void         GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GL_APICALL void         GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GL_APICALL void         GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GL_APICALL void         GL_APIENTRY glBindTexture (GLenum target, GLuint texture);
+GL_APICALL void         GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_APICALL void         GL_APIENTRY glBlendEquation ( GLenum mode );
+GL_APICALL void         GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GL_APICALL void         GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GL_APICALL void         GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+GL_APICALL void         GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
+GL_APICALL void         GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
+GL_APICALL GLenum       GL_APIENTRY glCheckFramebufferStatus (GLenum target);
+GL_APICALL void         GL_APIENTRY glClear (GLbitfield mask);
+GL_APICALL void         GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
+GL_APICALL void         GL_APIENTRY glClearDepthf (GLclampf depth);
+GL_APICALL void         GL_APIENTRY glClearStencil (GLint s);
+GL_APICALL void         GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GL_APICALL void         GL_APIENTRY glCompileShader (GLuint shader);
+GL_APICALL void         GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void         GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void         GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GL_APICALL void         GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL GLuint       GL_APIENTRY glCreateProgram (void);
+GL_APICALL GLuint       GL_APIENTRY glCreateShader (GLenum type);
+GL_APICALL void         GL_APIENTRY glCullFace (GLenum mode);
+GL_APICALL void         GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers);
+GL_APICALL void         GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers);
+GL_APICALL void         GL_APIENTRY glDeleteProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers);
+GL_APICALL void         GL_APIENTRY glDeleteShader (GLuint shader);
+GL_APICALL void         GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures);
+GL_APICALL void         GL_APIENTRY glDepthFunc (GLenum func);
+GL_APICALL void         GL_APIENTRY glDepthMask (GLboolean flag);
+GL_APICALL void         GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar);
+GL_APICALL void         GL_APIENTRY glDetachShader (GLuint program, GLuint shader);
+GL_APICALL void         GL_APIENTRY glDisable (GLenum cap);
+GL_APICALL void         GL_APIENTRY glDisableVertexAttribArray (GLuint index);
+GL_APICALL void         GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GL_APICALL void         GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
+GL_APICALL void         GL_APIENTRY glEnable (GLenum cap);
+GL_APICALL void         GL_APIENTRY glEnableVertexAttribArray (GLuint index);
+GL_APICALL void         GL_APIENTRY glFinish (void);
+GL_APICALL void         GL_APIENTRY glFlush (void);
+GL_APICALL void         GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GL_APICALL void         GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GL_APICALL void         GL_APIENTRY glFrontFace (GLenum mode);
+GL_APICALL void         GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers);
+GL_APICALL void         GL_APIENTRY glGenerateMipmap (GLenum target);
+GL_APICALL void         GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers);
+GL_APICALL void         GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers);
+GL_APICALL void         GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures);
+GL_APICALL void         GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
+GL_APICALL int          GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params);
+GL_APICALL void         GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL GLenum       GL_APIENTRY glGetError (void);
+GL_APICALL void         GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
+GL_APICALL void         GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
+GL_APICALL void         GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
+GL_APICALL void         GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name);
+GL_APICALL void         GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params);
+GL_APICALL int          GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params);
+GL_APICALL void         GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer);
+GL_APICALL void         GL_APIENTRY glHint (GLenum target, GLenum mode);
+GL_APICALL GLboolean    GL_APIENTRY glIsBuffer (GLuint buffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsEnabled (GLenum cap);
+GL_APICALL GLboolean    GL_APIENTRY glIsFramebuffer (GLuint framebuffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsProgram (GLuint program);
+GL_APICALL GLboolean    GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GL_APICALL GLboolean    GL_APIENTRY glIsShader (GLuint shader);
+GL_APICALL GLboolean    GL_APIENTRY glIsTexture (GLuint texture);
+GL_APICALL void         GL_APIENTRY glLineWidth (GLfloat width);
+GL_APICALL void         GL_APIENTRY glLinkProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glPixelStorei (GLenum pname, GLint param);
+GL_APICALL void         GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GL_APICALL void         GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
+GL_APICALL void         GL_APIENTRY glReleaseShaderCompiler (void);
+GL_APICALL void         GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void         GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert);
+GL_APICALL void         GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void         GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
+GL_APICALL void         GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length);
+GL_APICALL void         GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilMask (GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GL_APICALL void         GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void         GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
+GL_APICALL void         GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void         GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GL_APICALL void         GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params);
+GL_APICALL void         GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GL_APICALL void         GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params);
+GL_APICALL void         GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void         GL_APIENTRY glUniform1f (GLint location, GLfloat x);
+GL_APICALL void         GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void         GL_APIENTRY glUniform1i (GLint location, GLint x);
+GL_APICALL void         GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void         GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y);
+GL_APICALL void         GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void         GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y);
+GL_APICALL void         GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void         GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void         GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void         GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z);
+GL_APICALL void         GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void         GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void         GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v);
+GL_APICALL void         GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void         GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v);
+GL_APICALL void         GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
+GL_APICALL void         GL_APIENTRY glUseProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glValidateProgram (GLuint program);
+GL_APICALL void         GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x);
+GL_APICALL void         GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values);
+GL_APICALL void         GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y);
+GL_APICALL void         GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values);
+GL_APICALL void         GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void         GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values);
+GL_APICALL void         GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void         GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values);
+GL_APICALL void         GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
+GL_APICALL void         GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl2_h_ */
diff --git a/ANGLE/include/GLES2/gl2ext.h b/ANGLE/include/GLES2/gl2ext.h
new file mode 100644 (file)
index 0000000..80a6820
--- /dev/null
@@ -0,0 +1,773 @@
+#ifndef __gl2ext_h_
+#define __gl2ext_h_
+
+/* $Revision: 10798 $ on $Date:: 2010-03-19 17:34:30 -0700 #$ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+#ifndef GL_APIENTRYP
+#   define GL_APIENTRYP GL_APIENTRY*
+#endif
+
+/*------------------------------------------------------------------------*
+ * OES extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_ETC1_RGB8_OES                                        0x8D64
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_PALETTE4_RGB8_OES                                    0x8B90
+#define GL_PALETTE4_RGBA8_OES                                   0x8B91
+#define GL_PALETTE4_R5_G6_B5_OES                                0x8B92
+#define GL_PALETTE4_RGBA4_OES                                   0x8B93
+#define GL_PALETTE4_RGB5_A1_OES                                 0x8B94
+#define GL_PALETTE8_RGB8_OES                                    0x8B95
+#define GL_PALETTE8_RGBA8_OES                                   0x8B96
+#define GL_PALETTE8_R5_G6_B5_OES                                0x8B97
+#define GL_PALETTE8_RGBA4_OES                                   0x8B98
+#define GL_PALETTE8_RGB5_A1_OES                                 0x8B99
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_DEPTH_COMPONENT24_OES                                0x81A6
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_DEPTH_COMPONENT32_OES                                0x81A7
+#endif
+
+/* GL_OES_depth_texture */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+typedef void* GLeglImageOES;
+#endif
+
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_UNSIGNED_INT                                         0x1405
+#endif
+
+/* GL_OES_get_program_binary */
+#ifndef GL_OES_get_program_binary
+#define GL_PROGRAM_BINARY_LENGTH_OES                            0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS_OES                       0x87FE
+#define GL_PROGRAM_BINARY_FORMATS_OES                           0x87FF
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_WRITE_ONLY_OES                                       0x88B9
+#define GL_BUFFER_ACCESS_OES                                    0x88BB
+#define GL_BUFFER_MAPPED_OES                                    0x88BC
+#define GL_BUFFER_MAP_POINTER_OES                               0x88BD
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_DEPTH_STENCIL_OES                                    0x84F9
+#define GL_UNSIGNED_INT_24_8_OES                                0x84FA
+#define GL_DEPTH24_STENCIL8_OES                                 0x88F0
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_RGB8_OES                                             0x8051
+#define GL_RGBA8_OES                                            0x8058
+#endif
+
+/* GL_OES_standard_derivatives */
+#ifndef GL_OES_standard_derivatives
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES                  0x8B8B
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_STENCIL_INDEX1_OES                                   0x8D46
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_STENCIL_INDEX4_OES                                   0x8D47
+#endif
+
+/* GL_OES_texture_3D */
+#ifndef GL_OES_texture_3D
+#define GL_TEXTURE_WRAP_R_OES                                   0x8072
+#define GL_TEXTURE_3D_OES                                       0x806F
+#define GL_TEXTURE_BINDING_3D_OES                               0x806A
+#define GL_MAX_3D_TEXTURE_SIZE_OES                              0x8073
+#define GL_SAMPLER_3D_OES                                       0x8B5F
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES        0x8CD4
+#endif
+
+/* GL_OES_texture_float */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_float_linear */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_half_float */
+#ifndef GL_OES_texture_half_float
+#define GL_HALF_FLOAT_OES                                       0x8D61
+#endif
+
+/* GL_OES_texture_half_float_linear */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_texture_npot */
+/* No new tokens introduced by this extension. */
+
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING_OES                             0x85B5
+#endif
+
+/* GL_OES_vertex_half_float */
+/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
+
+/* GL_OES_vertex_type_10_10_10_2 */
+#ifndef GL_OES_vertex_type_10_10_10_2
+#define GL_UNSIGNED_INT_10_10_10_2_OES                          0x8DF6
+#define GL_INT_10_10_10_2_OES                                   0x8DF7
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_3DC_X_AMD                                            0x87F9
+#define GL_3DC_XY_AMD                                           0x87FA
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_ATC_RGB_AMD                                          0x8C92
+#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD                          0x8C93
+#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD                      0x87EE
+#endif
+
+/* GL_AMD_performance_monitor */
+#ifndef GL_AMD_performance_monitor
+#define GL_COUNTER_TYPE_AMD                                     0x8BC0
+#define GL_COUNTER_RANGE_AMD                                    0x8BC1
+#define GL_UNSIGNED_INT64_AMD                                   0x8BC2
+#define GL_PERCENTAGE_AMD                                       0x8BC3
+#define GL_PERFMON_RESULT_AVAILABLE_AMD                         0x8BC4
+#define GL_PERFMON_RESULT_SIZE_AMD                              0x8BC5
+#define GL_PERFMON_RESULT_AMD                                   0x8BC6
+#endif
+
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_Z400_BINARY_AMD                                      0x8740
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_MIN_EXT                                              0x8007
+#define GL_MAX_EXT                                              0x8008
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_COLOR_EXT                                            0x1800
+#define GL_DEPTH_EXT                                            0x1801
+#define GL_STENCIL_EXT                                          0x1802
+#endif
+
+/* GL_EXT_multi_draw_arrays */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_BGRA_EXT                                             0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT                       0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT                       0x8366
+#endif
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_TEXTURE_MAX_ANISOTROPY_EXT                           0x84FE
+#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT                       0x84FF
+#endif
+
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_BGRA_EXT                                             0x80E1
+#endif
+
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT                      0x8368
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_program_binary */
+#ifndef GL_IMG_program_binary
+#define GL_SGX_PROGRAM_BINARY_IMG                               0x9130
+#endif
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_BGRA_IMG                                             0x80E1
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG                       0x8365
+#endif
+
+/* GL_IMG_shader_binary */
+#ifndef GL_IMG_shader_binary
+#define GL_SGX_BINARY_IMG                                       0x8C0A
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG                      0x8C00
+#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG                      0x8C01
+#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG                     0x8C02
+#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG                     0x8C03
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV                                     0x84F2
+#define GL_FENCE_STATUS_NV                                      0x84F3
+#define GL_FENCE_CONDITION_NV                                   0x84F4
+#endif
+
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_COVERAGE_COMPONENT_NV                                0x8ED0
+#define GL_COVERAGE_COMPONENT4_NV                               0x8ED1
+#define GL_COVERAGE_ATTACHMENT_NV                               0x8ED2
+#define GL_COVERAGE_BUFFERS_NV                                  0x8ED3
+#define GL_COVERAGE_SAMPLES_NV                                  0x8ED4
+#define GL_COVERAGE_ALL_FRAGMENTS_NV                            0x8ED5
+#define GL_COVERAGE_EDGE_FRAGMENTS_NV                           0x8ED6
+#define GL_COVERAGE_AUTOMATIC_NV                                0x8ED7
+#define GL_COVERAGE_BUFFER_BIT_NV                               0x8000
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_DEPTH_COMPONENT16_NONLINEAR_NV                       0x8E2C
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_TEXTURE_WIDTH_QCOM                                   0x8BD2
+#define GL_TEXTURE_HEIGHT_QCOM                                  0x8BD3
+#define GL_TEXTURE_DEPTH_QCOM                                   0x8BD4
+#define GL_TEXTURE_INTERNAL_FORMAT_QCOM                         0x8BD5
+#define GL_TEXTURE_FORMAT_QCOM                                  0x8BD6
+#define GL_TEXTURE_TYPE_QCOM                                    0x8BD7
+#define GL_TEXTURE_IMAGE_VALID_QCOM                             0x8BD8
+#define GL_TEXTURE_NUM_LEVELS_QCOM                              0x8BD9
+#define GL_TEXTURE_TARGET_QCOM                                  0x8BDA
+#define GL_TEXTURE_OBJECT_VALID_QCOM                            0x8BDB
+#define GL_STATE_RESTORE                                        0x8BDC
+#endif
+
+/* GL_QCOM_extended_get2 */
+/* No new tokens introduced by this extension. */
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_PERFMON_GLOBAL_MODE_QCOM                             0x8FA0
+#endif
+
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_WRITEONLY_RENDERING_QCOM                             0x8823
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_COLOR_BUFFER_BIT0_QCOM                               0x00000001
+#define GL_COLOR_BUFFER_BIT1_QCOM                               0x00000002
+#define GL_COLOR_BUFFER_BIT2_QCOM                               0x00000004
+#define GL_COLOR_BUFFER_BIT3_QCOM                               0x00000008
+#define GL_COLOR_BUFFER_BIT4_QCOM                               0x00000010
+#define GL_COLOR_BUFFER_BIT5_QCOM                               0x00000020
+#define GL_COLOR_BUFFER_BIT6_QCOM                               0x00000040
+#define GL_COLOR_BUFFER_BIT7_QCOM                               0x00000080
+#define GL_DEPTH_BUFFER_BIT0_QCOM                               0x00000100
+#define GL_DEPTH_BUFFER_BIT1_QCOM                               0x00000200
+#define GL_DEPTH_BUFFER_BIT2_QCOM                               0x00000400
+#define GL_DEPTH_BUFFER_BIT3_QCOM                               0x00000800
+#define GL_DEPTH_BUFFER_BIT4_QCOM                               0x00001000
+#define GL_DEPTH_BUFFER_BIT5_QCOM                               0x00002000
+#define GL_DEPTH_BUFFER_BIT6_QCOM                               0x00004000
+#define GL_DEPTH_BUFFER_BIT7_QCOM                               0x00008000
+#define GL_STENCIL_BUFFER_BIT0_QCOM                             0x00010000
+#define GL_STENCIL_BUFFER_BIT1_QCOM                             0x00020000
+#define GL_STENCIL_BUFFER_BIT2_QCOM                             0x00040000
+#define GL_STENCIL_BUFFER_BIT3_QCOM                             0x00080000
+#define GL_STENCIL_BUFFER_BIT4_QCOM                             0x00100000
+#define GL_STENCIL_BUFFER_BIT5_QCOM                             0x00200000
+#define GL_STENCIL_BUFFER_BIT6_QCOM                             0x00400000
+#define GL_STENCIL_BUFFER_BIT7_QCOM                             0x00800000
+#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM                         0x01000000
+#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM                         0x02000000
+#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM                         0x04000000
+#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM                         0x08000000
+#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM                         0x10000000
+#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM                         0x20000000
+#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM                         0x40000000
+#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM                         0x80000000
+#endif
+
+/*------------------------------------------------------------------------*
+ * End of extension tokens, start of corresponding extension functions
+ *------------------------------------------------------------------------*/
+
+/*------------------------------------------------------------------------*
+ * OES extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_OES_compressed_ETC1_RGB8_texture */
+#ifndef GL_OES_compressed_ETC1_RGB8_texture
+#define GL_OES_compressed_ETC1_RGB8_texture 1
+#endif
+
+/* GL_OES_compressed_paletted_texture */
+#ifndef GL_OES_compressed_paletted_texture
+#define GL_OES_compressed_paletted_texture 1
+#endif
+
+/* GL_OES_depth24 */
+#ifndef GL_OES_depth24
+#define GL_OES_depth24 1
+#endif
+
+/* GL_OES_depth32 */
+#ifndef GL_OES_depth32
+#define GL_OES_depth32 1
+#endif
+
+/* GL_OES_depth_texture */
+#ifndef GL_OES_depth_texture
+#define GL_OES_depth_texture 1
+#endif
+
+/* GL_OES_EGL_image */
+#ifndef GL_OES_EGL_image
+#define GL_OES_EGL_image 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
+GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image);
+#endif
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image);
+typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
+#endif
+
+/* GL_OES_element_index_uint */
+#ifndef GL_OES_element_index_uint
+#define GL_OES_element_index_uint 1
+#endif
+
+/* GL_OES_fbo_render_mipmap */
+#ifndef GL_OES_fbo_render_mipmap
+#define GL_OES_fbo_render_mipmap 1
+#endif
+
+/* GL_OES_fragment_precision_high */
+#ifndef GL_OES_fragment_precision_high
+#define GL_OES_fragment_precision_high 1
+#endif
+
+/* GL_OES_get_program_binary */
+#ifndef GL_OES_get_program_binary
+#define GL_OES_get_program_binary 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length);
+#endif
+
+/* GL_OES_mapbuffer */
+#ifndef GL_OES_mapbuffer
+#define GL_OES_mapbuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access);
+GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target);
+GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params);
+#endif
+typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access);
+typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params);
+#endif
+
+/* GL_OES_packed_depth_stencil */
+#ifndef GL_OES_packed_depth_stencil
+#define GL_OES_packed_depth_stencil 1
+#endif
+
+/* GL_OES_rgb8_rgba8 */
+#ifndef GL_OES_rgb8_rgba8
+#define GL_OES_rgb8_rgba8 1
+#endif
+
+/* GL_OES_standard_derivatives */
+#ifndef GL_OES_standard_derivatives
+#define GL_OES_standard_derivatives 1
+#endif
+
+/* GL_OES_stencil1 */
+#ifndef GL_OES_stencil1
+#define GL_OES_stencil1 1
+#endif
+
+/* GL_OES_stencil4 */
+#ifndef GL_OES_stencil4
+#define GL_OES_stencil4 1
+#endif
+
+/* GL_OES_texture_3D */
+#ifndef GL_OES_texture_3D
+#define GL_OES_texture_3D 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
+GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
+GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels);
+typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels);
+typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data);
+typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+#endif
+
+/* GL_OES_texture_float */
+#ifndef GL_OES_texture_float
+#define GL_OES_texture_float 1
+#endif
+
+/* GL_OES_texture_float_linear */
+#ifndef GL_OES_texture_float_linear
+#define GL_OES_texture_float_linear 1
+#endif
+
+/* GL_OES_texture_half_float */
+#ifndef GL_OES_texture_half_float
+#define GL_OES_texture_half_float 1
+#endif
+
+/* GL_OES_texture_half_float_linear */
+#ifndef GL_OES_texture_half_float_linear
+#define GL_OES_texture_half_float_linear 1
+#endif
+
+/* GL_OES_texture_npot */
+#ifndef GL_OES_texture_npot
+#define GL_OES_texture_npot 1
+#endif
+
+/* GL_OES_vertex_array_object */
+#ifndef GL_OES_vertex_array_object
+#define GL_OES_vertex_array_object 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array);
+GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays);
+GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays);
+GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array);
+#endif
+typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array);
+typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays);
+typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
+#endif
+
+/* GL_OES_vertex_half_float */
+#ifndef GL_OES_vertex_half_float
+#define GL_OES_vertex_half_float 1
+#endif
+
+/* GL_OES_vertex_type_10_10_10_2 */
+#ifndef GL_OES_vertex_type_10_10_10_2
+#define GL_OES_vertex_type_10_10_10_2 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * AMD extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_AMD_compressed_3DC_texture */
+#ifndef GL_AMD_compressed_3DC_texture
+#define GL_AMD_compressed_3DC_texture 1
+#endif
+
+/* GL_AMD_compressed_ATC_texture */
+#ifndef GL_AMD_compressed_ATC_texture
+#define GL_AMD_compressed_ATC_texture 1
+#endif
+
+/* AMD_performance_monitor */
+#ifndef GL_AMD_performance_monitor
+#define GL_AMD_performance_monitor 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
+GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors);
+GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor);
+GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor);
+GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data);
+typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors);
+typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList);
+typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor);
+typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+#endif
+
+/* GL_AMD_program_binary_Z400 */
+#ifndef GL_AMD_program_binary_Z400
+#define GL_AMD_program_binary_Z400 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * EXT extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_EXT_blend_minmax */
+#ifndef GL_EXT_blend_minmax
+#define GL_EXT_blend_minmax 1
+#endif
+
+/* GL_EXT_discard_framebuffer */
+#ifndef GL_EXT_discard_framebuffer
+#define GL_EXT_discard_framebuffer 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+#endif
+
+#ifndef GL_EXT_multi_draw_arrays
+#define GL_EXT_multi_draw_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei);
+GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+#endif
+
+/* GL_EXT_read_format_bgra */
+#ifndef GL_EXT_read_format_bgra
+#define GL_EXT_read_format_bgra 1
+#endif
+
+/* GL_EXT_texture_filter_anisotropic */
+#ifndef GL_EXT_texture_filter_anisotropic
+#define GL_EXT_texture_filter_anisotropic 1
+#endif
+
+/* GL_EXT_texture_format_BGRA8888 */
+#ifndef GL_EXT_texture_format_BGRA8888
+#define GL_EXT_texture_format_BGRA8888 1
+#endif
+
+/* GL_EXT_texture_type_2_10_10_10_REV */
+#ifndef GL_EXT_texture_type_2_10_10_10_REV
+#define GL_EXT_texture_type_2_10_10_10_REV 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * IMG extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_IMG_program_binary */
+#ifndef GL_IMG_program_binary
+#define GL_IMG_program_binary 1
+#endif
+
+/* GL_IMG_read_format */
+#ifndef GL_IMG_read_format
+#define GL_IMG_read_format 1
+#endif
+
+/* GL_IMG_shader_binary */
+#ifndef GL_IMG_shader_binary
+#define GL_IMG_shader_binary 1
+#endif
+
+/* GL_IMG_texture_compression_pvrtc */
+#ifndef GL_IMG_texture_compression_pvrtc
+#define GL_IMG_texture_compression_pvrtc 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * NV extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_NV_fence 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *);
+GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *);
+GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint);
+GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint);
+GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *);
+GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint);
+GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum);
+#endif
+typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences);
+typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences);
+typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence);
+typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
+typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
+#endif
+
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_NV_coverage_sample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
+GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+#endif
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_NV_depth_nonlinear 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * QCOM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_QCOM_driver_control */
+#ifndef GL_QCOM_driver_control
+#define GL_QCOM_driver_control 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls);
+GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl);
+GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls);
+typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
+typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl);
+#endif
+
+/* GL_QCOM_extended_get */
+#ifndef GL_QCOM_extended_get
+#define GL_QCOM_extended_get 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures);
+GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param);
+GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels);
+typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params);
+#endif
+
+/* GL_QCOM_extended_get2 */
+#ifndef GL_QCOM_extended_get2
+#define GL_QCOM_extended_get2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program);
+GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms);
+typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program);
+typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length);
+#endif
+
+/* GL_QCOM_perfmon_global_mode */
+#ifndef GL_QCOM_perfmon_global_mode
+#define GL_QCOM_perfmon_global_mode 1
+#endif
+
+/* GL_QCOM_writeonly_rendering */
+#ifndef GL_QCOM_writeonly_rendering
+#define GL_QCOM_writeonly_rendering 1
+#endif
+
+/* GL_QCOM_tiled_rendering */
+#ifndef GL_QCOM_tiled_rendering
+#define GL_QCOM_tiled_rendering 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask);
+#endif
+typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask);
+typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __gl2ext_h_ */
diff --git a/ANGLE/include/GLES2/gl2platform.h b/ANGLE/include/GLES2/gl2platform.h
new file mode 100644 (file)
index 0000000..c9fa3c4
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef __gl2platform_h_
+#define __gl2platform_h_
+
+/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */
+
+/*
+ * This document is licensed under the SGI Free Software B License Version
+ * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
+ */
+
+/* Platform-specific types and definitions for OpenGL ES 2.X  gl2.h
+ *
+ * Adopters may modify khrplatform.h and this file to suit their platform.
+ * You are encouraged to submit all modifications to the Khronos group so that
+ * they can be included in future versions of this file.  Please submit changes
+ * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla)
+ * by filing a bug against product "OpenGL-ES" component "Registry".
+ */
+
+#include <KHR/khrplatform.h>
+
+#ifndef GL_APICALL
+#define GL_APICALL  KHRONOS_APICALL
+#endif
+
+#ifndef GL_APIENTRY
+#define GL_APIENTRY KHRONOS_APIENTRY
+#endif
+
+#endif /* __gl2platform_h_ */
diff --git a/ANGLE/include/GLSLANG/ResourceLimits.h b/ANGLE/include/GLSLANG/ResourceLimits.h
new file mode 100644 (file)
index 0000000..7b7a4b7
--- /dev/null
@@ -0,0 +1,21 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef _RESOURCE_LIMITS_INCLUDED_
+#define _RESOURCE_LIMITS_INCLUDED_
+
+struct TBuiltInResource
+{
+       int maxVertexAttribs;
+       int maxVertexUniformVectors;
+       int maxVaryingVectors;
+       int maxVertexTextureImageUnits;
+       int maxCombinedTextureImageUnits;
+       int maxTextureImageUnits;
+       int maxFragmentUniformVectors;
+       int maxDrawBuffers;
+};
+#endif // _RESOURCE_LIMITS_INCLUDED_
diff --git a/ANGLE/include/GLSLANG/ShaderLang.h b/ANGLE/include/GLSLANG/ShaderLang.h
new file mode 100644 (file)
index 0000000..b4d2f3c
--- /dev/null
@@ -0,0 +1,103 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+#ifndef _COMPILER_INTERFACE_INCLUDED_
+#define _COMPILER_INTERFACE_INCLUDED_
+
+#include "ResourceLimits.h"
+
+//
+// This is the platform independent interface between an OGL driver
+// and the shading language compiler.
+//
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+//
+// Driver must call this first, once, before doing any other
+// compiler operations.
+//
+int ShInitialize();
+//
+// Driver should call this at shutdown.
+//
+int ShFinalize();
+//
+// Types of languages the compiler can consume.
+//
+typedef enum {
+    EShLangVertex,
+    EShLangFragment,
+    EShLangCount,
+} EShLanguage;
+
+//
+// The language specification compiler conforms to.
+// It currently supports OpenGL ES and WebGL specifications.
+//
+typedef enum {
+    EShSpecGLES2,
+    EShSpecWebGL,
+} EShSpec;
+
+//
+// Optimization level for the compiler.
+//
+typedef enum {
+    EShOptNoGeneration,
+    EShOptNone,
+    EShOptSimple,       // Optimizations that can be done quickly
+    EShOptFull,         // Optimizations that will take more time
+} EShOptimizationLevel;
+
+enum TDebugOptions {
+    EDebugOpNone               = 0x000,
+    EDebugOpIntermediate       = 0x001,  // Writes intermediate tree into info-log.
+};
+
+//
+// ShHandle held by but opaque to the driver.  It is allocated,
+// managed, and de-allocated by the compiler. It's contents 
+// are defined by and used by the compiler.
+//
+// If handle creation fails, 0 will be returned.
+//
+typedef void* ShHandle;
+
+//
+// Driver calls these to create and destroy compiler objects.
+//
+ShHandle ShConstructCompiler(EShLanguage, EShSpec);  // one per shader
+void ShDestruct(ShHandle);
+
+//
+// The return value of ShCompile is boolean, indicating
+// success or failure.
+//
+// The info-log should be written by ShCompile into 
+// ShHandle, so it can answer future queries.
+//
+int ShCompile(
+    const ShHandle,
+    const char* const shaderStrings[],
+    const int numStrings,
+    const EShOptimizationLevel,
+    const TBuiltInResource *resources,
+    int debugOptions
+    );
+
+//
+// All the following return 0 if the information is not
+// available in the object passed down, or the object is bad.
+//
+const char* ShGetInfoLog(const ShHandle);
+const char* ShGetObjectCode(const ShHandle);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _COMPILER_INTERFACE_INCLUDED_
diff --git a/ANGLE/include/KHR/khrplatform.h b/ANGLE/include/KHR/khrplatform.h
new file mode 100644 (file)
index 0000000..8ec0d19
--- /dev/null
@@ -0,0 +1,269 @@
+#ifndef __khrplatform_h_
+#define __khrplatform_h_
+
+/*
+** Copyright (c) 2008-2009 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* Khronos platform-specific types and definitions.
+ *
+ * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $
+ *
+ * Adopters may modify this file to suit their platform. Adopters are
+ * encouraged to submit platform specific modifications to the Khronos
+ * group so that they can be included in future versions of this file.
+ * Please submit changes by sending them to the public Khronos Bugzilla
+ * (http://khronos.org/bugzilla) by filing a bug against product
+ * "Khronos (general)" component "Registry".
+ *
+ * A predefined template which fills in some of the bug fields can be
+ * reached using http://tinyurl.com/khrplatform-h-bugreport, but you
+ * must create a Bugzilla login first.
+ *
+ *
+ * See the Implementer's Guidelines for information about where this file
+ * should be located on your system and for more details of its use:
+ *    http://www.khronos.org/registry/implementers_guide.pdf
+ *
+ * This file should be included as
+ *        #include <KHR/khrplatform.h>
+ * by Khronos client API header files that use its types and defines.
+ *
+ * The types in khrplatform.h should only be used to define API-specific types.
+ *
+ * Types defined in khrplatform.h:
+ *    khronos_int8_t              signed   8  bit
+ *    khronos_uint8_t             unsigned 8  bit
+ *    khronos_int16_t             signed   16 bit
+ *    khronos_uint16_t            unsigned 16 bit
+ *    khronos_int32_t             signed   32 bit
+ *    khronos_uint32_t            unsigned 32 bit
+ *    khronos_int64_t             signed   64 bit
+ *    khronos_uint64_t            unsigned 64 bit
+ *    khronos_intptr_t            signed   same number of bits as a pointer
+ *    khronos_uintptr_t           unsigned same number of bits as a pointer
+ *    khronos_ssize_t             signed   size
+ *    khronos_usize_t             unsigned size
+ *    khronos_float_t             signed   32 bit floating point
+ *    khronos_time_ns_t           unsigned 64 bit time in nanoseconds
+ *    khronos_utime_nanoseconds_t unsigned time interval or absolute time in
+ *                                         nanoseconds
+ *    khronos_stime_nanoseconds_t signed time interval in nanoseconds
+ *    khronos_boolean_enum_t      enumerated boolean type. This should
+ *      only be used as a base type when a client API's boolean type is
+ *      an enum. Client APIs which use an integer or other type for
+ *      booleans cannot use this as the base type for their boolean.
+ *
+ * Tokens defined in khrplatform.h:
+ *
+ *    KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values.
+ *
+ *    KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0.
+ *    KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0.
+ *
+ * Calling convention macros defined in this file:
+ *    KHRONOS_APICALL
+ *    KHRONOS_APIENTRY
+ *    KHRONOS_APIATTRIBUTES
+ *
+ * These may be used in function prototypes as:
+ *
+ *      KHRONOS_APICALL void KHRONOS_APIENTRY funcname(
+ *                                  int arg1,
+ *                                  int arg2) KHRONOS_APIATTRIBUTES;
+ */
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APICALL
+ *-------------------------------------------------------------------------
+ * This precedes the return type of the function in the function prototype.
+ */
+#if defined(_WIN32) && !defined(__SCITECH_SNAP__)
+#   define KHRONOS_APICALL __declspec(dllimport)
+#elif defined (__SYMBIAN32__)
+#   define KHRONOS_APICALL IMPORT_C
+#else
+#   define KHRONOS_APICALL
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIENTRY
+ *-------------------------------------------------------------------------
+ * This follows the return type of the function  and precedes the function
+ * name in the function prototype.
+ */
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+    /* Win32 but not WinCE */
+#   define KHRONOS_APIENTRY __stdcall
+#else
+#   define KHRONOS_APIENTRY
+#endif
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIATTRIBUTES
+ *-------------------------------------------------------------------------
+ * This follows the closing parenthesis of the function prototype arguments.
+ */
+#if defined (__ARMCC_2__)
+#define KHRONOS_APIATTRIBUTES __softfp
+#else
+#define KHRONOS_APIATTRIBUTES
+#endif
+
+/*-------------------------------------------------------------------------
+ * basic type definitions
+ *-----------------------------------------------------------------------*/
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__)
+
+
+/*
+ * Using <stdint.h>
+ */
+#include <stdint.h>
+typedef int32_t                 khronos_int32_t;
+typedef uint32_t                khronos_uint32_t;
+typedef int64_t                 khronos_int64_t;
+typedef uint64_t                khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#elif defined(__VMS ) || defined(__sgi)
+
+/*
+ * Using <inttypes.h>
+ */
+#include <inttypes.h>
+typedef int32_t                 khronos_int32_t;
+typedef uint32_t                khronos_uint32_t;
+typedef int64_t                 khronos_int64_t;
+typedef uint64_t                khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#elif defined(_WIN32) && !defined(__SCITECH_SNAP__)
+
+/*
+ * Win32
+ */
+typedef __int32                 khronos_int32_t;
+typedef unsigned __int32        khronos_uint32_t;
+typedef __int64                 khronos_int64_t;
+typedef unsigned __int64        khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#elif defined(__sun__) || defined(__digital__)
+
+/*
+ * Sun or Digital
+ */
+typedef int                     khronos_int32_t;
+typedef unsigned int            khronos_uint32_t;
+#if defined(__arch64__) || defined(_LP64)
+typedef long int                khronos_int64_t;
+typedef unsigned long int       khronos_uint64_t;
+#else
+typedef long long int           khronos_int64_t;
+typedef unsigned long long int  khronos_uint64_t;
+#endif /* __arch64__ */
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#elif 0
+
+/*
+ * Hypothetical platform with no float or int64 support
+ */
+typedef int                     khronos_int32_t;
+typedef unsigned int            khronos_uint32_t;
+#define KHRONOS_SUPPORT_INT64   0
+#define KHRONOS_SUPPORT_FLOAT   0
+
+#else
+
+/*
+ * Generic fallback
+ */
+#include <stdint.h>
+typedef int32_t                 khronos_int32_t;
+typedef uint32_t                khronos_uint32_t;
+typedef int64_t                 khronos_int64_t;
+typedef uint64_t                khronos_uint64_t;
+#define KHRONOS_SUPPORT_INT64   1
+#define KHRONOS_SUPPORT_FLOAT   1
+
+#endif
+
+
+/*
+ * Types that are (so far) the same on all platforms
+ */
+typedef signed   char          khronos_int8_t;
+typedef unsigned char          khronos_uint8_t;
+typedef signed   short int     khronos_int16_t;
+typedef unsigned short int     khronos_uint16_t;
+typedef signed   long  int     khronos_intptr_t;
+typedef unsigned long  int     khronos_uintptr_t;
+typedef signed   long  int     khronos_ssize_t;
+typedef unsigned long  int     khronos_usize_t;
+
+#if KHRONOS_SUPPORT_FLOAT
+/*
+ * Float type
+ */
+typedef          float         khronos_float_t;
+#endif
+
+#if KHRONOS_SUPPORT_INT64
+/* Time types
+ *
+ * These types can be used to represent a time interval in nanoseconds or
+ * an absolute Unadjusted System Time.  Unadjusted System Time is the number
+ * of nanoseconds since some arbitrary system event (e.g. since the last
+ * time the system booted).  The Unadjusted System Time is an unsigned
+ * 64 bit value that wraps back to 0 every 584 years.  Time intervals
+ * may be either signed or unsigned.
+ */
+typedef khronos_uint64_t       khronos_utime_nanoseconds_t;
+typedef khronos_int64_t        khronos_stime_nanoseconds_t;
+#endif
+
+/*
+ * Dummy value used to pad enum types to 32 bits.
+ */
+#ifndef KHRONOS_MAX_ENUM
+#define KHRONOS_MAX_ENUM 0x7FFFFFFF
+#endif
+
+/*
+ * Enumerated boolean type
+ *
+ * Values other than zero should be considered to be true.  Therefore
+ * comparisons should not be made against KHRONOS_TRUE.
+ */
+typedef enum {
+    KHRONOS_FALSE = 0,
+    KHRONOS_TRUE  = 1,
+    KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM
+} khronos_boolean_enum_t;
+
+#endif /* __khrplatform_h_ */
diff --git a/ANGLE/src/build_angle.xcodeproj/project.pbxproj b/ANGLE/src/build_angle.xcodeproj/project.pbxproj
new file mode 100644 (file)
index 0000000..6c0e06b
--- /dev/null
@@ -0,0 +1,613 @@
+// !$*UTF8*$!
+{
+       archiveVersion = 1;
+       classes = {
+       };
+       objectVersion = 45;
+       objects = {
+
+/* Begin PBXAggregateTarget section */
+               1563D9916BFDAD853032CE1A /* All */ = {
+                       isa = PBXAggregateTarget;
+                       buildConfigurationList = 77CEFB7B40F05B0A804E6B2B /* Build configuration list for PBXAggregateTarget "All" */;
+                       buildPhases = (
+                       );
+                       dependencies = (
+                               FB3C506411F792970081F5BA /* PBXTargetDependency */,
+                       );
+                       name = All;
+                       productName = All;
+               };
+               31349D665FAE642AEB49135E /* ANGLE Support */ = {
+                       isa = PBXAggregateTarget;
+                       buildConfigurationList = 0AA54825BF5DF0A3FBA92B60 /* Build configuration list for PBXAggregateTarget "ANGLE Support" */;
+                       buildPhases = (
+                               FA0D7125DB06A7A7716A5910 /* Action "flex_glslang" */,
+                               0D513F8B923949C156DB02C5 /* Action "bison_glslang" */,
+                       );
+                       dependencies = (
+                       );
+                       name = "ANGLE Support";
+                       productName = "translator_common Support";
+               };
+/* End PBXAggregateTarget section */
+
+/* Begin PBXBuildFile section */
+               05563ADFEA15116D7233332F /* QualifierAlive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4857E18799D332C30EF460C7 /* QualifierAlive.cpp */; };
+               0A216949103E1E228F9C12F0 /* InitializeDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 60C3998C9CE66DE0C5B0FD99 /* InitializeDll.cpp */; };
+               0D4064167398A6892809A09E /* glslang_tab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A53D169CB849B861E15DF99A /* glslang_tab.cpp */; };
+               3065D29E97FAC6E127388D15 /* Initialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A54F2ED0D82D7BBCA4E9EEEA /* Initialize.cpp */; };
+               32B1DBCD6B83F2146D787A62 /* atom.c in Sources */ = {isa = PBXBuildFile; fileRef = 0C9B4616A65A5ABEF91FD6DC /* atom.c */; };
+               35BE1BBEE6135A1CB0608EA8 /* cppstruct.c in Sources */ = {isa = PBXBuildFile; fileRef = 8058A0A2A0A02386867517EA /* cppstruct.c */; };
+               3A96E9CAC8A25AF1564B652C /* memory.c in Sources */ = {isa = PBXBuildFile; fileRef = 294F442A2606FEC55F12A28E /* memory.c */; };
+               40FC189B8A246EDF14C2FDE3 /* intermOut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEAF6F3126C2EC4397785C3F /* intermOut.cpp */; };
+               50DF00005CC4212F6FB1291D /* Intermediate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F7C486C370A72938FE8160F /* Intermediate.cpp */; };
+               6F9F875017A68ABE5D39FF19 /* ParseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976C831A75EBE009A9861796 /* ParseHelper.cpp */; };
+               888F1382498E2D74AF2801C8 /* debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ABA230FEA3654B030E4C4FB /* debug.cpp */; };
+               9E8DFE1CCEF038BF2B65428C /* parseConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D2C9C8EB4A7EFF5B67FF9DBF /* parseConst.cpp */; };
+               ABA5C61B1B78B9A8D69F6AEC /* glslang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB1F91D3D8CC446F35B00D1B /* glslang.cpp */; };
+               AC23F58FDD3C55F5CA18EED7 /* RemoveTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B436EFF06913FCB19C3522A7 /* RemoveTree.cpp */; };
+               AD85517F086FDCEF3947C403 /* symbols.c in Sources */ = {isa = PBXBuildFile; fileRef = F013A7240BDAE8A61413D8C0 /* symbols.c */; };
+               B4858417E54365BE8CDE3919 /* ossource_posix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE258486005F6696CC031622 /* ossource_posix.cpp */; };
+               B8BD2685A16B188CCDFB052B /* ShaderLang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 56C7E99BA500A84C35216FE0 /* ShaderLang.cpp */; };
+               BEBBF4F0819EA3D03977A8FC /* InfoSink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E6927BE5D3C2C82F86111DF /* InfoSink.cpp */; };
+               CB7F0EF0D6A89FA8C4DF5513 /* cpp.c in Sources */ = {isa = PBXBuildFile; fileRef = B75707B393B7EAB7DD9999CB /* cpp.c */; };
+               E1C7C5DFF0B2DFEC09387F4E /* PoolAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B64EABE738FC666A5E4E2F42 /* PoolAlloc.cpp */; };
+               E8C727AA8E9DC5E7B58857DF /* tokens.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D00745DA9914FDE274D03D5 /* tokens.c */; };
+               F098F463EDABCF0769007678 /* scanner.c in Sources */ = {isa = PBXBuildFile; fileRef = FF3AA694DF9A4455A813234D /* scanner.c */; };
+               F5AE2A292DFAF8C158412AA2 /* IntermTraverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4FE988EF9A293867E5C771B /* IntermTraverse.cpp */; };
+               F6ABD58F8CAB7641D8BFE935 /* SymbolTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B7E5B0F04635E6090F0DE8EF /* SymbolTable.cpp */; };
+               FB3C505711F7924A0081F5BA /* CodeGenGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B7B1127C75B576FC00D74AED /* CodeGenGLSL.cpp */; };
+               FB3C505811F7924A0081F5BA /* OutputGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48B7402CC07A059FEF5EC351 /* OutputGLSL.cpp */; };
+               FB3C505911F7924A0081F5BA /* TranslatorGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6FB70DC74A21FBCD665ABDF9 /* TranslatorGLSL.cpp */; };
+               FB3C508E11F7949E0081F5BA /* glslang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CB1F91D3D8CC446F35B00D1B /* glslang.cpp */; };
+               FB3C508F11F7949E0081F5BA /* glslang_tab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A53D169CB849B861E15DF99A /* glslang_tab.cpp */; };
+               FB3C509211F794CE0081F5BA /* debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ABA230FEA3654B030E4C4FB /* debug.cpp */; };
+               FB3C509311F794CE0081F5BA /* InfoSink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E6927BE5D3C2C82F86111DF /* InfoSink.cpp */; };
+               FB3C509411F794CE0081F5BA /* Initialize.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A54F2ED0D82D7BBCA4E9EEEA /* Initialize.cpp */; };
+               FB3C509511F794CE0081F5BA /* InitializeDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 60C3998C9CE66DE0C5B0FD99 /* InitializeDll.cpp */; };
+               FB3C509611F794CE0081F5BA /* Intermediate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F7C486C370A72938FE8160F /* Intermediate.cpp */; };
+               FB3C509711F794CE0081F5BA /* intermOut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEAF6F3126C2EC4397785C3F /* intermOut.cpp */; };
+               FB3C509811F794CE0081F5BA /* IntermTraverse.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C4FE988EF9A293867E5C771B /* IntermTraverse.cpp */; };
+               FB3C509A11F794CE0081F5BA /* ossource_posix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BE258486005F6696CC031622 /* ossource_posix.cpp */; };
+               FB3C509B11F794CE0081F5BA /* parseConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D2C9C8EB4A7EFF5B67FF9DBF /* parseConst.cpp */; };
+               FB3C509C11F794CE0081F5BA /* ParseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976C831A75EBE009A9861796 /* ParseHelper.cpp */; };
+               FB3C509D11F794CE0081F5BA /* PoolAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B64EABE738FC666A5E4E2F42 /* PoolAlloc.cpp */; };
+               FB3C509E11F794CE0081F5BA /* QualifierAlive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4857E18799D332C30EF460C7 /* QualifierAlive.cpp */; };
+               FB3C509F11F794CE0081F5BA /* RemoveTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B436EFF06913FCB19C3522A7 /* RemoveTree.cpp */; };
+               FB3C50A011F794CE0081F5BA /* ShaderLang.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 56C7E99BA500A84C35216FE0 /* ShaderLang.cpp */; };
+               FB3C50A111F794CE0081F5BA /* SymbolTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B7E5B0F04635E6090F0DE8EF /* SymbolTable.cpp */; };
+               FB3C50A411F794FF0081F5BA /* atom.c in Sources */ = {isa = PBXBuildFile; fileRef = 0C9B4616A65A5ABEF91FD6DC /* atom.c */; };
+               FB3C50A511F794FF0081F5BA /* cpp.c in Sources */ = {isa = PBXBuildFile; fileRef = B75707B393B7EAB7DD9999CB /* cpp.c */; };
+               FB3C50A611F794FF0081F5BA /* cppstruct.c in Sources */ = {isa = PBXBuildFile; fileRef = 8058A0A2A0A02386867517EA /* cppstruct.c */; };
+               FB3C50A711F794FF0081F5BA /* memory.c in Sources */ = {isa = PBXBuildFile; fileRef = 294F442A2606FEC55F12A28E /* memory.c */; };
+               FB3C50A811F794FF0081F5BA /* scanner.c in Sources */ = {isa = PBXBuildFile; fileRef = FF3AA694DF9A4455A813234D /* scanner.c */; };
+               FB3C50A911F794FF0081F5BA /* symbols.c in Sources */ = {isa = PBXBuildFile; fileRef = F013A7240BDAE8A61413D8C0 /* symbols.c */; };
+               FB3C50AA11F794FF0081F5BA /* tokens.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D00745DA9914FDE274D03D5 /* tokens.c */; };
+               FB3C50AB11F7951B0081F5BA /* TranslatorGLSL.h in Sources */ = {isa = PBXBuildFile; fileRef = DDD3B7E3B7B35A0B8469AB87 /* TranslatorGLSL.h */; };
+               FB3C50AC11F7951B0081F5BA /* OutputGLSL.h in Sources */ = {isa = PBXBuildFile; fileRef = 93D61CB0BCE54E069D71F920 /* OutputGLSL.h */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+               E69BFBE2D1272620E46C3F8A /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = DA188D8C6BF8073122539131 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 31349D665FAE642AEB49135E;
+                       remoteInfo = "translator_common Support";
+               };
+               FB3C506311F792970081F5BA /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = DA188D8C6BF8073122539131 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = FB3C505511F7924A0081F5BA;
+                       remoteInfo = angle;
+               };
+               FB3C50D011F79CCC0081F5BA /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = DA188D8C6BF8073122539131 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 31349D665FAE642AEB49135E;
+                       remoteInfo = "ANGLE Support";
+               };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+               056FEADC7D95C6D4C9CF1113 /* scanner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = scanner.h; sourceTree = "<group>"; };
+               0C9B4616A65A5ABEF91FD6DC /* atom.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = atom.c; sourceTree = "<group>"; };
+               12EAF028311EEA4753E82818 /* PoolAlloc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PoolAlloc.h; sourceTree = "<group>"; };
+               153BF06BF12C6F50496C6156 /* localintermediate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = localintermediate.h; sourceTree = "<group>"; };
+               27E4C7ED0B82E18DCBEDF1C9 /* BaseTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseTypes.h; sourceTree = "<group>"; };
+               294F442A2606FEC55F12A28E /* memory.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = memory.c; sourceTree = "<group>"; };
+               2A765B86CBAF0D4A3E69DCA7 /* UnfoldSelect.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UnfoldSelect.h; sourceTree = "<group>"; };
+               2D00745DA9914FDE274D03D5 /* tokens.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = tokens.c; sourceTree = "<group>"; };
+               2E7C9B6E6DB751E12A2F6CB6 /* InitializeGlobals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InitializeGlobals.h; sourceTree = "<group>"; };
+               3DDDC77216202A4DE1808BDB /* libtranslator_common.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libtranslator_common.a; sourceTree = BUILT_PRODUCTS_DIR; };
+               3F7C486C370A72938FE8160F /* Intermediate.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Intermediate.cpp; sourceTree = "<group>"; };
+               4857E18799D332C30EF460C7 /* QualifierAlive.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = QualifierAlive.cpp; sourceTree = "<group>"; };
+               48B7402CC07A059FEF5EC351 /* OutputGLSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OutputGLSL.cpp; sourceTree = "<group>"; };
+               4ABA230FEA3654B030E4C4FB /* debug.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = debug.cpp; sourceTree = "<group>"; };
+               528FF201839C6F233E26FFDA /* cpp.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = cpp.h; sourceTree = "<group>"; };
+               56C7E99BA500A84C35216FE0 /* ShaderLang.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ShaderLang.cpp; sourceTree = "<group>"; };
+               580B2A31F7C51A59B40F11A3 /* compile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = compile.h; sourceTree = "<group>"; };
+               5A21599C59BC1A75A7FABA34 /* OutputHLSL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OutputHLSL.h; sourceTree = "<group>"; };
+               60C3998C9CE66DE0C5B0FD99 /* InitializeDll.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InitializeDll.cpp; sourceTree = "<group>"; };
+               6BBC8224B9D8E234D117FA0C /* preprocess.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = preprocess.h; sourceTree = "<group>"; };
+               6E6927BE5D3C2C82F86111DF /* InfoSink.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InfoSink.cpp; sourceTree = "<group>"; };
+               6FB70DC74A21FBCD665ABDF9 /* TranslatorGLSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorGLSL.cpp; sourceTree = "<group>"; };
+               799DC9611EE2EA3BA7CF5477 /* intermediate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = intermediate.h; sourceTree = "<group>"; };
+               7C6BB12AB099556CF379D78F /* SymbolTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SymbolTable.h; sourceTree = "<group>"; };
+               7D9CF376DC5799B4C6B3331E /* symbols.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = symbols.h; sourceTree = "<group>"; };
+               8058A0A2A0A02386867517EA /* cppstruct.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cppstruct.c; sourceTree = "<group>"; };
+               831399DEE5DABA09570FB3E7 /* memory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = memory.h; sourceTree = "<group>"; };
+               8513FAC699DB1558D1D49A48 /* Initialize.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Initialize.h; sourceTree = "<group>"; };
+               85845FFF5A8E63364308236D /* InitializeParseContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InitializeParseContext.h; sourceTree = "<group>"; };
+               89A6F7B1AD3918E64DF76EB1 /* slglobals.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = slglobals.h; sourceTree = "<group>"; };
+               8C3225C2F8C3573CD9725E66 /* glslang.y */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.yacc; path = glslang.y; sourceTree = "<group>"; };
+               93D61CB0BCE54E069D71F920 /* OutputGLSL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OutputGLSL.h; sourceTree = "<group>"; };
+               95276AA6B36FC1B1D913FCE4 /* debug.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = debug.h; sourceTree = "<group>"; };
+               976C831A75EBE009A9861796 /* ParseHelper.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ParseHelper.cpp; sourceTree = "<group>"; };
+               9A5B5BB2526802479E19F993 /* OutputHLSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OutputHLSL.cpp; sourceTree = "<group>"; };
+               9CED3AFF1E61B45EE1005656 /* atom.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = atom.h; sourceTree = "<group>"; };
+               9D47B1AC82E4EE859AC54243 /* QualifierAlive.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QualifierAlive.h; sourceTree = "<group>"; };
+               A0CE43631849276A31187C7B /* InitializeDll.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InitializeDll.h; sourceTree = "<group>"; };
+               A3153D58F4BBBD98A84E4210 /* glslang.l */ = {isa = PBXFileReference; lastKnownFileType = text; path = glslang.l; sourceTree = "<group>"; };
+               A53D169CB849B861E15DF99A /* glslang_tab.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = glslang_tab.cpp; sourceTree = "<group>"; };
+               A54F2ED0D82D7BBCA4E9EEEA /* Initialize.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Initialize.cpp; sourceTree = "<group>"; };
+               AA53B6632C76F905DF08E564 /* Types.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Types.h; sourceTree = "<group>"; };
+               AE65E139AE10DE9EFAD8D5B1 /* ShHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShHandle.h; sourceTree = "<group>"; };
+               AE7674C52BDDDB28AF5FFD9F /* unistd.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = unistd.h; sourceTree = "<group>"; };
+               B2F5CA11EEA92DF2384EFD93 /* ConstantUnion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ConstantUnion.h; sourceTree = "<group>"; };
+               B436EFF06913FCB19C3522A7 /* RemoveTree.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoveTree.cpp; sourceTree = "<group>"; };
+               B64EABE738FC666A5E4E2F42 /* PoolAlloc.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PoolAlloc.cpp; sourceTree = "<group>"; };
+               B75707B393B7EAB7DD9999CB /* cpp.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = cpp.c; sourceTree = "<group>"; };
+               B7B1127C75B576FC00D74AED /* CodeGenGLSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenGLSL.cpp; sourceTree = "<group>"; };
+               B7E5B0F04635E6090F0DE8EF /* SymbolTable.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SymbolTable.cpp; sourceTree = "<group>"; };
+               BC66D6B47D9AF3286644BBE1 /* glslang_tab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = glslang_tab.h; sourceTree = "<group>"; };
+               BE258486005F6696CC031622 /* ossource_posix.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ossource_posix.cpp; sourceTree = "<group>"; };
+               C3DAFF6BF12BB7F4784D6C7E /* TranslatorHLSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorHLSL.cpp; sourceTree = "<group>"; };
+               C49549DCCAF450EB761520E1 /* CodeGenHLSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CodeGenHLSL.cpp; sourceTree = "<group>"; };
+               C4FE988EF9A293867E5C771B /* IntermTraverse.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = IntermTraverse.cpp; sourceTree = "<group>"; };
+               C8BD59BD7056FFC21373C50A /* osinclude.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = osinclude.h; sourceTree = "<group>"; };
+               CB1F91D3D8CC446F35B00D1B /* glslang.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = glslang.cpp; sourceTree = "<group>"; };
+               CEE0C90DF6D504D1F3629711 /* ParseHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ParseHelper.h; sourceTree = "<group>"; };
+               CF2B62E0820C831AF812D000 /* build_angle.gyp */ = {isa = PBXFileReference; lastKnownFileType = text; path = build_angle.gyp; sourceTree = "<group>"; };
+               CFD12C6E46EBE0839BBE52B5 /* parser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = parser.h; sourceTree = "<group>"; };
+               D13C3693B9E40D37F2FAB34A /* tokens.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tokens.h; sourceTree = "<group>"; };
+               D2C9C8EB4A7EFF5B67FF9DBF /* parseConst.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = parseConst.cpp; sourceTree = "<group>"; };
+               D40F78CB9BA0C89921FA319D /* RemoveTree.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoveTree.h; sourceTree = "<group>"; };
+               DDD3B7E3B7B35A0B8469AB87 /* TranslatorGLSL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TranslatorGLSL.h; sourceTree = "<group>"; };
+               DEAF6F3126C2EC4397785C3F /* intermOut.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = intermOut.cpp; sourceTree = "<group>"; };
+               DEEAFC618A3B33F1FBFE3536 /* MMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MMap.h; sourceTree = "<group>"; };
+               E3711A48A0BF16B1CBD77AC9 /* UnfoldSelect.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = UnfoldSelect.cpp; sourceTree = "<group>"; };
+               E3A29B6E9C21B67C25FF0D2B /* TranslatorHLSL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TranslatorHLSL.h; sourceTree = "<group>"; };
+               F013A7240BDAE8A61413D8C0 /* symbols.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = symbols.c; sourceTree = "<group>"; };
+               F74618F18FE5448115017C44 /* Common.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = "<group>"; };
+               F7B2971D4EB3836B94B7ECAF /* InfoSink.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InfoSink.h; sourceTree = "<group>"; };
+               FB3C505D11F7924A0081F5BA /* libangle.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libangle.a; sourceTree = BUILT_PRODUCTS_DIR; };
+               FF3AA694DF9A4455A813234D /* scanner.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = scanner.c; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+               A5C994E74DB1E60338E7BC11 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               FB3C505A11F7924A0081F5BA /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+               0E8D65F584FDB84DAABD3969 /* preprocessor */ = {
+                       isa = PBXGroup;
+                       children = (
+                               0C9B4616A65A5ABEF91FD6DC /* atom.c */,
+                               9CED3AFF1E61B45EE1005656 /* atom.h */,
+                               580B2A31F7C51A59B40F11A3 /* compile.h */,
+                               B75707B393B7EAB7DD9999CB /* cpp.c */,
+                               528FF201839C6F233E26FFDA /* cpp.h */,
+                               8058A0A2A0A02386867517EA /* cppstruct.c */,
+                               294F442A2606FEC55F12A28E /* memory.c */,
+                               831399DEE5DABA09570FB3E7 /* memory.h */,
+                               CFD12C6E46EBE0839BBE52B5 /* parser.h */,
+                               6BBC8224B9D8E234D117FA0C /* preprocess.h */,
+                               FF3AA694DF9A4455A813234D /* scanner.c */,
+                               056FEADC7D95C6D4C9CF1113 /* scanner.h */,
+                               89A6F7B1AD3918E64DF76EB1 /* slglobals.h */,
+                               F013A7240BDAE8A61413D8C0 /* symbols.c */,
+                               7D9CF376DC5799B4C6B3331E /* symbols.h */,
+                               2D00745DA9914FDE274D03D5 /* tokens.c */,
+                               D13C3693B9E40D37F2FAB34A /* tokens.h */,
+                       );
+                       path = preprocessor;
+                       sourceTree = "<group>";
+               };
+               196DB6AB006BB83503C7D786 /* Source */ = {
+                       isa = PBXGroup;
+                       children = (
+                               0E8D65F584FDB84DAABD3969 /* preprocessor */,
+                               27E4C7ED0B82E18DCBEDF1C9 /* BaseTypes.h */,
+                               B7B1127C75B576FC00D74AED /* CodeGenGLSL.cpp */,
+                               C49549DCCAF450EB761520E1 /* CodeGenHLSL.cpp */,
+                               F74618F18FE5448115017C44 /* Common.h */,
+                               B2F5CA11EEA92DF2384EFD93 /* ConstantUnion.h */,
+                               6E6927BE5D3C2C82F86111DF /* InfoSink.cpp */,
+                               F7B2971D4EB3836B94B7ECAF /* InfoSink.h */,
+                               A54F2ED0D82D7BBCA4E9EEEA /* Initialize.cpp */,
+                               8513FAC699DB1558D1D49A48 /* Initialize.h */,
+                               60C3998C9CE66DE0C5B0FD99 /* InitializeDll.cpp */,
+                               A0CE43631849276A31187C7B /* InitializeDll.h */,
+                               2E7C9B6E6DB751E12A2F6CB6 /* InitializeGlobals.h */,
+                               85845FFF5A8E63364308236D /* InitializeParseContext.h */,
+                               C4FE988EF9A293867E5C771B /* IntermTraverse.cpp */,
+                               3F7C486C370A72938FE8160F /* Intermediate.cpp */,
+                               DEEAFC618A3B33F1FBFE3536 /* MMap.h */,
+                               48B7402CC07A059FEF5EC351 /* OutputGLSL.cpp */,
+                               93D61CB0BCE54E069D71F920 /* OutputGLSL.h */,
+                               9A5B5BB2526802479E19F993 /* OutputHLSL.cpp */,
+                               5A21599C59BC1A75A7FABA34 /* OutputHLSL.h */,
+                               976C831A75EBE009A9861796 /* ParseHelper.cpp */,
+                               CEE0C90DF6D504D1F3629711 /* ParseHelper.h */,
+                               B64EABE738FC666A5E4E2F42 /* PoolAlloc.cpp */,
+                               12EAF028311EEA4753E82818 /* PoolAlloc.h */,
+                               4857E18799D332C30EF460C7 /* QualifierAlive.cpp */,
+                               9D47B1AC82E4EE859AC54243 /* QualifierAlive.h */,
+                               B436EFF06913FCB19C3522A7 /* RemoveTree.cpp */,
+                               D40F78CB9BA0C89921FA319D /* RemoveTree.h */,
+                               AE65E139AE10DE9EFAD8D5B1 /* ShHandle.h */,
+                               56C7E99BA500A84C35216FE0 /* ShaderLang.cpp */,
+                               B7E5B0F04635E6090F0DE8EF /* SymbolTable.cpp */,
+                               7C6BB12AB099556CF379D78F /* SymbolTable.h */,
+                               6FB70DC74A21FBCD665ABDF9 /* TranslatorGLSL.cpp */,
+                               DDD3B7E3B7B35A0B8469AB87 /* TranslatorGLSL.h */,
+                               C3DAFF6BF12BB7F4784D6C7E /* TranslatorHLSL.cpp */,
+                               E3A29B6E9C21B67C25FF0D2B /* TranslatorHLSL.h */,
+                               AA53B6632C76F905DF08E564 /* Types.h */,
+                               E3711A48A0BF16B1CBD77AC9 /* UnfoldSelect.cpp */,
+                               2A765B86CBAF0D4A3E69DCA7 /* UnfoldSelect.h */,
+                               4ABA230FEA3654B030E4C4FB /* debug.cpp */,
+                               95276AA6B36FC1B1D913FCE4 /* debug.h */,
+                               A3153D58F4BBBD98A84E4210 /* glslang.l */,
+                               8C3225C2F8C3573CD9725E66 /* glslang.y */,
+                               DEAF6F3126C2EC4397785C3F /* intermOut.cpp */,
+                               799DC9611EE2EA3BA7CF5477 /* intermediate.h */,
+                               153BF06BF12C6F50496C6156 /* localintermediate.h */,
+                               C8BD59BD7056FFC21373C50A /* osinclude.h */,
+                               BE258486005F6696CC031622 /* ossource_posix.cpp */,
+                               D2C9C8EB4A7EFF5B67FF9DBF /* parseConst.cpp */,
+                               AE7674C52BDDDB28AF5FFD9F /* unistd.h */,
+                       );
+                       name = Source;
+                       path = compiler;
+                       sourceTree = "<group>";
+               };
+               466E1D0531A79B5813E8A7F8 /* Intermediates */ = {
+                       isa = PBXGroup;
+                       children = (
+                               CB1F91D3D8CC446F35B00D1B /* glslang.cpp */,
+                               A53D169CB849B861E15DF99A /* glslang_tab.cpp */,
+                               BC66D6B47D9AF3286644BBE1 /* glslang_tab.h */,
+                       );
+                       name = Intermediates;
+                       sourceTree = INTERMEDIATE_DIR;
+               };
+               5BBEFF9B91738297B95C568D = {
+                       isa = PBXGroup;
+                       children = (
+                               196DB6AB006BB83503C7D786 /* Source */,
+                               466E1D0531A79B5813E8A7F8 /* Intermediates */,
+                               E0EDC4130E7D374318CE72BE /* Products */,
+                               B2C184C3543198BA51592EA4 /* Build */,
+                       );
+                       sourceTree = "<group>";
+               };
+               B2C184C3543198BA51592EA4 /* Build */ = {
+                       isa = PBXGroup;
+                       children = (
+                               CF2B62E0820C831AF812D000 /* build_angle.gyp */,
+                       );
+                       name = Build;
+                       sourceTree = "<group>";
+               };
+               E0EDC4130E7D374318CE72BE /* Products */ = {
+                       isa = PBXGroup;
+                       children = (
+                               3DDDC77216202A4DE1808BDB /* libtranslator_common.a */,
+                               FB3C505D11F7924A0081F5BA /* libangle.a */,
+                       );
+                       name = Products;
+                       sourceTree = "<group>";
+               };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+               6F4FD35CB3DFC89D70ECD432 /* translator_common */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 34BB38E3A74418B2A063B49E /* Build configuration list for PBXNativeTarget "translator_common" */;
+                       buildPhases = (
+                               EAA22CA63FD572FCCB913D22 /* Sources */,
+                               A5C994E74DB1E60338E7BC11 /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               291EE04202EC7967835FCC38 /* PBXTargetDependency */,
+                       );
+                       name = translator_common;
+                       productName = translator_common;
+                       productReference = 3DDDC77216202A4DE1808BDB /* libtranslator_common.a */;
+                       productType = "com.apple.product-type.library.static";
+               };
+               FB3C505511F7924A0081F5BA /* angle */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = FB3C505B11F7924A0081F5BA /* Build configuration list for PBXNativeTarget "angle" */;
+                       buildPhases = (
+                               FB3C505611F7924A0081F5BA /* Sources */,
+                               FB3C505A11F7924A0081F5BA /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               FB3C50D111F79CCC0081F5BA /* PBXTargetDependency */,
+                       );
+                       name = angle;
+                       productName = translator_glsl;
+                       productReference = FB3C505D11F7924A0081F5BA /* libangle.a */;
+                       productType = "com.apple.product-type.library.static";
+               };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+               DA188D8C6BF8073122539131 /* Project object */ = {
+                       isa = PBXProject;
+                       attributes = {
+                               BuildIndependentTargetsInParallel = YES;
+                       };
+                       buildConfigurationList = 0E59F8FE4A8099E8DDCA4CE7 /* Build configuration list for PBXProject "build_angle" */;
+                       compatibilityVersion = "Xcode 3.1";
+                       hasScannedForEncodings = 1;
+                       mainGroup = 5BBEFF9B91738297B95C568D;
+                       projectDirPath = "";
+                       projectRoot = "";
+                       targets = (
+                               1563D9916BFDAD853032CE1A /* All */,
+                               6F4FD35CB3DFC89D70ECD432 /* translator_common */,
+                               31349D665FAE642AEB49135E /* ANGLE Support */,
+                               FB3C505511F7924A0081F5BA /* angle */,
+                       );
+               };
+/* End PBXProject section */
+
+/* Begin PBXShellScriptBuildPhase section */
+               0D513F8B923949C156DB02C5 /* Action "bison_glslang" */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               compiler/glslang.y,
+                       );
+                       name = "Action \"bison_glslang\"";
+                       outputPaths = (
+                               "$(INTERMEDIATE_DIR)/glslang_tab.cpp",
+                               "$(INTERMEDIATE_DIR)/glslang_tab.h",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "echo note: \"Executing bison on compiler/glslang.y\"\nexec bison --no-lines \"--defines=${INTERMEDIATE_DIR}/glslang_tab.h\" \"--skeleton=yacc.c\" \"--output=${INTERMEDIATE_DIR}/glslang_tab.cpp\" compiler/glslang.y\nexit 1\n";
+                       showEnvVarsInLog = 0;
+               };
+               FA0D7125DB06A7A7716A5910 /* Action "flex_glslang" */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                               compiler/glslang.l,
+                       );
+                       name = "Action \"flex_glslang\"";
+                       outputPaths = (
+                               "$(INTERMEDIATE_DIR)/glslang.cpp",
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "echo note: \"Executing flex on compiler/glslang.l\"\nexec flex --noline --nounistd \"--outfile=${INTERMEDIATE_DIR}/glslang.cpp\" compiler/glslang.l\nexit 1\n";
+                       showEnvVarsInLog = 0;
+               };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+               EAA22CA63FD572FCCB913D22 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               888F1382498E2D74AF2801C8 /* debug.cpp in Sources */,
+                               BEBBF4F0819EA3D03977A8FC /* InfoSink.cpp in Sources */,
+                               3065D29E97FAC6E127388D15 /* Initialize.cpp in Sources */,
+                               0A216949103E1E228F9C12F0 /* InitializeDll.cpp in Sources */,
+                               50DF00005CC4212F6FB1291D /* Intermediate.cpp in Sources */,
+                               40FC189B8A246EDF14C2FDE3 /* intermOut.cpp in Sources */,
+                               F5AE2A292DFAF8C158412AA2 /* IntermTraverse.cpp in Sources */,
+                               9E8DFE1CCEF038BF2B65428C /* parseConst.cpp in Sources */,
+                               6F9F875017A68ABE5D39FF19 /* ParseHelper.cpp in Sources */,
+                               E1C7C5DFF0B2DFEC09387F4E /* PoolAlloc.cpp in Sources */,
+                               05563ADFEA15116D7233332F /* QualifierAlive.cpp in Sources */,
+                               AC23F58FDD3C55F5CA18EED7 /* RemoveTree.cpp in Sources */,
+                               B8BD2685A16B188CCDFB052B /* ShaderLang.cpp in Sources */,
+                               F6ABD58F8CAB7641D8BFE935 /* SymbolTable.cpp in Sources */,
+                               32B1DBCD6B83F2146D787A62 /* atom.c in Sources */,
+                               CB7F0EF0D6A89FA8C4DF5513 /* cpp.c in Sources */,
+                               35BE1BBEE6135A1CB0608EA8 /* cppstruct.c in Sources */,
+                               3A96E9CAC8A25AF1564B652C /* memory.c in Sources */,
+                               F098F463EDABCF0769007678 /* scanner.c in Sources */,
+                               AD85517F086FDCEF3947C403 /* symbols.c in Sources */,
+                               E8C727AA8E9DC5E7B58857DF /* tokens.c in Sources */,
+                               ABA5C61B1B78B9A8D69F6AEC /* glslang.cpp in Sources */,
+                               0D4064167398A6892809A09E /* glslang_tab.cpp in Sources */,
+                               B4858417E54365BE8CDE3919 /* ossource_posix.cpp in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               FB3C505611F7924A0081F5BA /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               FB3C50AB11F7951B0081F5BA /* TranslatorGLSL.h in Sources */,
+                               FB3C50AC11F7951B0081F5BA /* OutputGLSL.h in Sources */,
+                               FB3C50A411F794FF0081F5BA /* atom.c in Sources */,
+                               FB3C50A511F794FF0081F5BA /* cpp.c in Sources */,
+                               FB3C50A611F794FF0081F5BA /* cppstruct.c in Sources */,
+                               FB3C50A711F794FF0081F5BA /* memory.c in Sources */,
+                               FB3C50A811F794FF0081F5BA /* scanner.c in Sources */,
+                               FB3C50A911F794FF0081F5BA /* symbols.c in Sources */,
+                               FB3C50AA11F794FF0081F5BA /* tokens.c in Sources */,
+                               FB3C508E11F7949E0081F5BA /* glslang.cpp in Sources */,
+                               FB3C505711F7924A0081F5BA /* CodeGenGLSL.cpp in Sources */,
+                               FB3C509211F794CE0081F5BA /* debug.cpp in Sources */,
+                               FB3C509311F794CE0081F5BA /* InfoSink.cpp in Sources */,
+                               FB3C509411F794CE0081F5BA /* Initialize.cpp in Sources */,
+                               FB3C509511F794CE0081F5BA /* InitializeDll.cpp in Sources */,
+                               FB3C509611F794CE0081F5BA /* Intermediate.cpp in Sources */,
+                               FB3C509711F794CE0081F5BA /* intermOut.cpp in Sources */,
+                               FB3C509811F794CE0081F5BA /* IntermTraverse.cpp in Sources */,
+                               FB3C509A11F794CE0081F5BA /* ossource_posix.cpp in Sources */,
+                               FB3C505811F7924A0081F5BA /* OutputGLSL.cpp in Sources */,
+                               FB3C509B11F794CE0081F5BA /* parseConst.cpp in Sources */,
+                               FB3C509C11F794CE0081F5BA /* ParseHelper.cpp in Sources */,
+                               FB3C509D11F794CE0081F5BA /* PoolAlloc.cpp in Sources */,
+                               FB3C509E11F794CE0081F5BA /* QualifierAlive.cpp in Sources */,
+                               FB3C509F11F794CE0081F5BA /* RemoveTree.cpp in Sources */,
+                               FB3C50A011F794CE0081F5BA /* ShaderLang.cpp in Sources */,
+                               FB3C50A111F794CE0081F5BA /* SymbolTable.cpp in Sources */,
+                               FB3C505911F7924A0081F5BA /* TranslatorGLSL.cpp in Sources */,
+                               FB3C508F11F7949E0081F5BA /* glslang_tab.cpp in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+               291EE04202EC7967835FCC38 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 31349D665FAE642AEB49135E /* ANGLE Support */;
+                       targetProxy = E69BFBE2D1272620E46C3F8A /* PBXContainerItemProxy */;
+               };
+               FB3C506411F792970081F5BA /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = FB3C505511F7924A0081F5BA /* angle */;
+                       targetProxy = FB3C506311F792970081F5BA /* PBXContainerItemProxy */;
+               };
+               FB3C50D111F79CCC0081F5BA /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 31349D665FAE642AEB49135E /* ANGLE Support */;
+                       targetProxy = FB3C50D011F79CCC0081F5BA /* PBXContainerItemProxy */;
+               };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+               00BF2EBCBDF5678F4BA2FA92 /* Default */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               PRODUCT_NAME = "translator_common Support";
+                       };
+                       name = Default;
+               };
+               1A12AA5D65ACDE71AE089EE3 /* Default */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               PRODUCT_NAME = All;
+                       };
+                       name = Default;
+               };
+               1F3F1218B5135FBB067DE809 /* Default */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               EXECUTABLE_PREFIX = lib;
+                               HEADER_SEARCH_PATHS = (
+                                       .,
+                                       ../include,
+                               );
+                               PRODUCT_NAME = translator_common;
+                       };
+                       name = Default;
+               };
+               BC5793C9A1FF021A81C66559 /* Default */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+                               CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
+                               INTERMEDIATE_DIR = "$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)";
+                               OBJROOT = "";
+                               ONLY_ACTIVE_ARCH = YES;
+                               SHARED_INTERMEDIATE_DIR = "$(SYMROOT)/DerivedSources/$(CONFIGURATION)";
+                               SYMROOT = "$(BUILD_DIR)";
+                       };
+                       name = Default;
+               };
+               FB3C505C11F7924A0081F5BA /* Default */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               EXECUTABLE_PREFIX = lib;
+                               HEADER_SEARCH_PATHS = (
+                                       .,
+                                       ../include,
+                               );
+                               PRODUCT_NAME = angle;
+                       };
+                       name = Default;
+               };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+               0AA54825BF5DF0A3FBA92B60 /* Build configuration list for PBXAggregateTarget "ANGLE Support" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               00BF2EBCBDF5678F4BA2FA92 /* Default */,
+                       );
+                       defaultConfigurationIsVisible = 1;
+                       defaultConfigurationName = Default;
+               };
+               0E59F8FE4A8099E8DDCA4CE7 /* Build configuration list for PBXProject "build_angle" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               BC5793C9A1FF021A81C66559 /* Default */,
+                       );
+                       defaultConfigurationIsVisible = 1;
+                       defaultConfigurationName = Default;
+               };
+               34BB38E3A74418B2A063B49E /* Build configuration list for PBXNativeTarget "translator_common" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               1F3F1218B5135FBB067DE809 /* Default */,
+                       );
+                       defaultConfigurationIsVisible = 1;
+                       defaultConfigurationName = Default;
+               };
+               77CEFB7B40F05B0A804E6B2B /* Build configuration list for PBXAggregateTarget "All" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               1A12AA5D65ACDE71AE089EE3 /* Default */,
+                       );
+                       defaultConfigurationIsVisible = 1;
+                       defaultConfigurationName = Default;
+               };
+               FB3C505B11F7924A0081F5BA /* Build configuration list for PBXNativeTarget "angle" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               FB3C505C11F7924A0081F5BA /* Default */,
+                       );
+                       defaultConfigurationIsVisible = 1;
+                       defaultConfigurationName = Default;
+               };
+/* End XCConfigurationList section */
+       };
+       rootObject = DA188D8C6BF8073122539131 /* Project object */;
+}
diff --git a/ANGLE/src/common/angleutils.h b/ANGLE/src/common/angleutils.h
new file mode 100644 (file)
index 0000000..24c766b
--- /dev/null
@@ -0,0 +1,18 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// angleutils.h: Common ANGLE utilities.
+
+#ifndef COMMON_ANGLEUTILS_H_
+#define COMMON_ANGLEUTILS_H_
+
+// A macro to disallow the copy constructor and operator= functions
+// This must be used in the private: declarations for a class
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+  TypeName(const TypeName&);               \
+  void operator=(const TypeName&)
+
+#endif // COMMON_ANGLEUTILS_H_
diff --git a/ANGLE/src/common/debug.cpp b/ANGLE/src/common/debug.cpp
new file mode 100644 (file)
index 0000000..d8d6ab8
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// debug.cpp: Debugging utilities.
+
+#include "common/debug.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+
+static bool trace_on = true;
+
+namespace gl
+{
+void trace(const char *format, ...)
+{
+    if (trace_on)
+    {
+        if (format)
+        {
+            FILE *file = fopen("debug.txt", "a");
+
+            if (file)
+            {
+                va_list vararg;
+                va_start(vararg, format);
+                vfprintf(file, format, vararg);
+                va_end(vararg);
+
+                fclose(file);
+            }
+        }
+    }
+}
+}
diff --git a/ANGLE/src/common/debug.h b/ANGLE/src/common/debug.h
new file mode 100644 (file)
index 0000000..9a5135b
--- /dev/null
@@ -0,0 +1,65 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// debug.h: Debugging utilities.
+
+#ifndef COMMON_DEBUG_H_
+#define COMMON_DEBUG_H_
+
+#include <stdio.h>
+#include <assert.h>
+
+namespace gl
+{
+    // Outputs text to the debugging log
+    void trace(const char *format, ...);
+}
+
+// A macro to output a trace of a function call and its arguments to the debugging log
+#ifndef NDEBUG
+    #define TRACE(message, ...) gl::trace("trace: %s"message"\n", __FUNCTION__, __VA_ARGS__)
+#else
+    #define TRACE(...) ((void)0)
+#endif
+
+// A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing. Will occur even in release mode.
+#define FIXME(message, ...) gl::trace("fixme: %s"message"\n", __FUNCTION__, __VA_ARGS__)
+
+// A macro to output a function call and its arguments to the debugging log, in case of error. Will occur even in release mode.
+#define ERR(message, ...) gl::trace("err: %s"message"\n", __FUNCTION__, __VA_ARGS__)
+
+// A macro asserting a condition and outputting failures to the debug log
+#define ASSERT(expression) do { \
+    if(!(expression)) \
+        ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \
+    assert(expression); \
+    } while(0)
+
+
+// A macro to indicate unimplemented functionality
+#ifndef NDEBUG
+    #define UNIMPLEMENTED() do { \
+        FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); \
+        assert(false); \
+        } while(0)
+#else
+    #define UNIMPLEMENTED() FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__)
+#endif
+
+// A macro for code which is not expected to be reached under valid assumptions
+#ifndef NDEBUG
+    #define UNREACHABLE() do { \
+        ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \
+        assert(false); \
+        } while(0)
+#else
+    #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__)
+#endif
+
+// A macro functioning as a compile-time assert to validate constant conditions
+#define META_ASSERT(condition) typedef int COMPILE_TIME_ASSERT_##__LINE__[static_cast<bool>(condition)?1:-1]
+
+#endif   // COMMON_DEBUG_H_
diff --git a/ANGLE/src/compiler/BaseTypes.h b/ANGLE/src/compiler/BaseTypes.h
new file mode 100644 (file)
index 0000000..cb646fc
--- /dev/null
@@ -0,0 +1,132 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef _BASICTYPES_INCLUDED_
+#define _BASICTYPES_INCLUDED_
+
+//
+// Precision qualifiers
+//
+enum TPrecision
+{
+    // These need to be kept sorted
+    EbpUndefined,
+    EbpLow,
+    EbpMedium,
+    EbpHigh,
+};
+
+__inline const char* getPrecisionString(TPrecision p)
+{
+    switch(p)
+    {
+    case EbpHigh:              return "highp";         break;
+    case EbpMedium:            return "mediump";       break;
+    case EbpLow:               return "lowp";          break;
+    default:                   return "mediump";   break;   // Safest fallback
+    }
+}
+
+//
+// Basic type.  Arrays, vectors, etc., are orthogonal to this.
+//
+enum TBasicType
+{
+    EbtVoid,
+    EbtFloat,
+    EbtInt,
+    EbtBool,
+    EbtGuardSamplerBegin,  // non type:  see implementation of IsSampler()
+    EbtSampler2D,
+    EbtSamplerCube,
+    EbtGuardSamplerEnd,    // non type:  see implementation of IsSampler()
+    EbtStruct,
+    EbtAddress,            // should be deprecated??
+};
+
+__inline bool IsSampler(TBasicType type)
+{
+    return type > EbtGuardSamplerBegin && type < EbtGuardSamplerEnd;
+}
+
+//
+// Qualifiers and built-ins.  These are mainly used to see what can be read
+// or written, and by the machine dependent translator to know which registers
+// to allocate variables in.  Since built-ins tend to go to different registers
+// than varying or uniform, it makes sense they are peers, not sub-classes.
+//
+enum TQualifier
+{
+    EvqTemporary,     // For temporaries (within a function), read/write
+    EvqGlobal,        // For globals read/write
+    EvqConst,         // User defined constants and non-output parameters in functions
+    EvqAttribute,     // Readonly
+    EvqVaryingIn,     // readonly, fragment shaders only
+    EvqVaryingOut,    // vertex shaders only  read/write
+    EvqInvariantVaryingIn,     // readonly, fragment shaders only
+    EvqInvariantVaryingOut,    // vertex shaders only  read/write
+    EvqUniform,       // Readonly, vertex and fragment
+
+    // pack/unpack input and output
+    EvqInput,
+    EvqOutput,
+
+    // parameters
+    EvqIn,
+    EvqOut,
+    EvqInOut,
+    EvqConstReadOnly,
+
+    // built-ins written by vertex shader
+    EvqPosition,
+    EvqPointSize,
+
+    // built-ins read by fragment shader
+    EvqFragCoord,
+    EvqFrontFacing,
+    EvqPointCoord,
+
+    // built-ins written by fragment shader
+    EvqFragColor,
+    EvqFragData,
+
+    // end of list
+    EvqLast,
+};
+
+//
+// This is just for debug print out, carried along with the definitions above.
+//
+__inline const char* getQualifierString(TQualifier q)
+{
+    switch(q)
+    {
+    case EvqTemporary:      return "Temporary";      break;
+    case EvqGlobal:         return "Global";         break;
+    case EvqConst:          return "const";          break;
+    case EvqConstReadOnly:  return "const";          break;
+    case EvqAttribute:      return "attribute";      break;
+    case EvqVaryingIn:      return "varying";        break;
+    case EvqVaryingOut:     return "varying";        break;
+    case EvqInvariantVaryingIn: return "invariant varying";    break;
+    case EvqInvariantVaryingOut:return "invariant varying";    break;
+    case EvqUniform:        return "uniform";        break;
+    case EvqIn:             return "in";             break;
+    case EvqOut:            return "out";            break;
+    case EvqInOut:          return "inout";          break;
+    case EvqInput:          return "input";          break;
+    case EvqOutput:         return "output";         break;
+    case EvqPosition:       return "Position";       break;
+    case EvqPointSize:      return "PointSize";      break;
+    case EvqFragCoord:      return "FragCoord";      break;
+    case EvqFrontFacing:    return "FrontFacing";    break;
+    case EvqFragColor:      return "FragColor";      break;
+    case EvqFragData:       return "FragData";      break;
+    default:                return "unknown qualifier";
+    }
+}
+
+#endif // _BASICTYPES_INCLUDED_
diff --git a/ANGLE/src/compiler/CodeGenGLSL.cpp b/ANGLE/src/compiler/CodeGenGLSL.cpp
new file mode 100644 (file)
index 0000000..855b092
--- /dev/null
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/TranslatorGLSL.h"
+
+//
+// This function must be provided to create the actual
+// compile object used by higher level code.  It returns
+// a subclass of TCompiler.
+//
+TCompiler* ConstructCompiler(EShLanguage language, EShSpec spec)
+{
+    return new TranslatorGLSL(language, spec);
+}
+
+//
+// Delete the compiler made by ConstructCompiler
+//
+void DeleteCompiler(TCompiler* compiler)
+{
+    delete compiler;
+}
diff --git a/ANGLE/src/compiler/CodeGenHLSL.cpp b/ANGLE/src/compiler/CodeGenHLSL.cpp
new file mode 100644 (file)
index 0000000..4db771d
--- /dev/null
@@ -0,0 +1,25 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/TranslatorHLSL.h"
+
+//
+// This function must be provided to create the actual
+// compile object used by higher level code.  It returns
+// a subclass of TCompiler.
+//
+TCompiler* ConstructCompiler(EShLanguage language, EShSpec spec)
+{
+    return new TranslatorHLSL(language, spec);
+}
+
+//
+// Delete the compiler made by ConstructCompiler
+//
+void DeleteCompiler(TCompiler* compiler)
+{
+    delete compiler;
+}
diff --git a/ANGLE/src/compiler/Common.h b/ANGLE/src/compiler/Common.h
new file mode 100644 (file)
index 0000000..65d0a51
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef _COMMON_INCLUDED_
+#define _COMMON_INCLUDED_
+
+#include <map>
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include "compiler/PoolAlloc.h"
+
+typedef int TSourceLoc;
+const unsigned int SourceLocLineMask = 0xffff;
+const unsigned int SourceLocStringShift = 16;
+
+//
+// Put POOL_ALLOCATOR_NEW_DELETE in base classes to make them use this scheme.
+//
+#define POOL_ALLOCATOR_NEW_DELETE(A)                                  \
+    void* operator new(size_t s) { return (A).allocate(s); }          \
+    void* operator new(size_t, void *_Where) { return (_Where);        }     \
+    void operator delete(void*) { }                                   \
+    void operator delete(void *, void *) { }                          \
+    void* operator new[](size_t s) { return (A).allocate(s); }        \
+    void* operator new[](size_t, void *_Where) { return (_Where);      } \
+    void operator delete[](void*) { }                                 \
+    void operator delete[](void *, void *) { }
+
+//
+// Pool version of string.
+//
+typedef pool_allocator<char> TStringAllocator;
+typedef std::basic_string <char, std::char_traits<char>, TStringAllocator> TString;
+typedef std::basic_ostringstream<char, std::char_traits<char>, TStringAllocator> TStringStream;
+inline TString* NewPoolTString(const char* s)
+{
+       void* memory = GlobalPoolAllocator.allocate(sizeof(TString));
+       return new(memory) TString(s);
+}
+
+//
+// Persistent string memory.  Should only be used for strings that survive
+// across compiles.
+//
+#define TPersistString std::string
+#define TPersistStringStream std::ostringstream
+
+//
+// Pool allocator versions of vectors, lists, and maps
+//
+template <class T> class TVector : public std::vector<T, pool_allocator<T> > {
+public:
+    typedef typename std::vector<T, pool_allocator<T> >::size_type size_type;
+    TVector() : std::vector<T, pool_allocator<T> >() {}
+    TVector(const pool_allocator<T>& a) : std::vector<T, pool_allocator<T> >(a) {}
+    TVector(size_type i): std::vector<T, pool_allocator<T> >(i) {}
+};
+
+template <class K, class D, class CMP = std::less<K> > 
+class TMap : public std::map<K, D, CMP, pool_allocator<std::pair<const K, D> > > {
+public:
+    typedef pool_allocator<std::pair<const K, D> > tAllocator;
+
+    TMap() : std::map<K, D, CMP, tAllocator>() {}
+    // use correct two-stage name lookup supported in gcc 3.4 and above
+    TMap(const tAllocator& a) : std::map<K, D, CMP, tAllocator>(std::map<K, D, CMP, tAllocator>::key_compare(), a) {}
+};
+
+typedef TMap<TString, TString> TPragmaTable;
+
+#endif // _COMMON_INCLUDED_
diff --git a/ANGLE/src/compiler/ConstantUnion.h b/ANGLE/src/compiler/ConstantUnion.h
new file mode 100644 (file)
index 0000000..cf531ea
--- /dev/null
@@ -0,0 +1,288 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef _CONSTANT_UNION_INCLUDED_
+#define _CONSTANT_UNION_INCLUDED_
+
+#include <assert.h>
+
+class ConstantUnion {
+public:
+
+    POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)        
+    void setIConst(int i) {iConst = i; type = EbtInt; }
+    void setFConst(float f) {fConst = f; type = EbtFloat; }
+    void setBConst(bool b) {bConst = b; type = EbtBool; }
+
+    int getIConst() { return iConst; }
+    float getFConst() { return fConst; }
+    bool getBConst() { return bConst; }
+    int getIConst() const { return iConst; }
+    float getFConst() const { return fConst; }
+    bool getBConst() const { return bConst; }
+
+    bool operator==(const int i) const
+    {
+        if (i == iConst)
+            return true;
+
+        return false;
+    }
+
+    bool operator==(const float f) const
+    {
+        if (f == fConst)
+            return true;
+
+        return false;
+    }
+
+    bool operator==(const bool b) const
+    {
+        if (b == bConst)
+            return true;
+
+        return false;
+    }
+
+    bool operator==(const ConstantUnion& constant) const
+    {
+        if (constant.type != type)
+            return false;
+
+        switch (type) {
+        case EbtInt:
+            if (constant.iConst == iConst)
+                return true;
+
+            break;
+        case EbtFloat:
+            if (constant.fConst == fConst)
+                return true;
+
+            break;
+        case EbtBool:
+            if (constant.bConst == bConst)
+                return true;
+
+            break;
+        }
+
+        return false;
+    }
+
+    bool operator!=(const int i) const
+    {
+        return !operator==(i);
+    }
+
+    bool operator!=(const float f) const
+    {
+        return !operator==(f);
+    }
+
+    bool operator!=(const bool b) const
+    {
+        return !operator==(b);
+    }
+
+    bool operator!=(const ConstantUnion& constant) const
+    {
+        return !operator==(constant);
+    }
+
+    bool operator>(const ConstantUnion& constant) const
+    { 
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt:
+            if (iConst > constant.iConst)
+                return true;
+
+            return false;
+        case EbtFloat:
+            if (fConst > constant.fConst)
+                return true;
+
+            return false;
+        default:
+            assert(false && "Default missing");
+            return false;
+        }
+
+        return false;
+    }
+
+    bool operator<(const ConstantUnion& constant) const
+    { 
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt:
+            if (iConst < constant.iConst)
+                return true;
+
+            return false;
+        case EbtFloat:
+            if (fConst < constant.fConst)
+                return true;
+
+            return false;
+        default:
+            assert(false && "Default missing");
+            return false;
+        }
+
+        return false;
+    }
+
+    ConstantUnion operator+(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt: returnValue.setIConst(iConst + constant.iConst); break;
+        case EbtFloat: returnValue.setFConst(fConst + constant.fConst); break;
+        default: assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator-(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt: returnValue.setIConst(iConst - constant.iConst); break;
+        case EbtFloat: returnValue.setFConst(fConst - constant.fConst); break;
+        default: assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator*(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt: returnValue.setIConst(iConst * constant.iConst); break;
+        case EbtFloat: returnValue.setFConst(fConst * constant.fConst); break; 
+        default: assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator%(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt: returnValue.setIConst(iConst % constant.iConst); break;
+        default:     assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator>>(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break;
+        default:     assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator<<(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt: returnValue.setIConst(iConst << constant.iConst); break;
+        default:     assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator&(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt:  returnValue.setIConst(iConst & constant.iConst); break;
+        default:     assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator|(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt:  returnValue.setIConst(iConst | constant.iConst); break;
+        default:     assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator^(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtInt:  returnValue.setIConst(iConst ^ constant.iConst); break;
+        default:     assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator&&(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtBool: returnValue.setBConst(bConst && constant.bConst); break;
+        default:     assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    ConstantUnion operator||(const ConstantUnion& constant) const
+    { 
+        ConstantUnion returnValue;
+        assert(type == constant.type);
+        switch (type) {
+        case EbtBool: returnValue.setBConst(bConst || constant.bConst); break;
+        default:     assert(false && "Default missing");
+        }
+
+        return returnValue;
+    }
+
+    TBasicType getType() const { return type; }
+private:
+
+    union  {
+        int iConst;  // used for ivec, scalar ints
+        bool bConst; // used for bvec, scalar bools
+        float fConst;   // used for vec, mat, scalar floats
+    } ;
+
+    TBasicType type;
+};
+
+#endif // _CONSTANT_UNION_INCLUDED_
diff --git a/ANGLE/src/compiler/InfoSink.cpp b/ANGLE/src/compiler/InfoSink.cpp
new file mode 100644 (file)
index 0000000..317a88f
--- /dev/null
@@ -0,0 +1,59 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/InfoSink.h"
+
+void TInfoSinkBase::prefix(TPrefixType message) {
+    switch(message) {
+        case EPrefixNone:
+            break;
+        case EPrefixWarning:
+            sink.append("WARNING: ");
+            break;
+        case EPrefixError:
+            sink.append("ERROR: ");
+            break;
+        case EPrefixInternalError:
+            sink.append("INTERNAL ERROR: ");
+            break;
+        case EPrefixUnimplemented:
+            sink.append("UNIMPLEMENTED: ");
+            break;
+        case EPrefixNote:
+            sink.append("NOTE: ");
+            break;
+        default:
+            sink.append("UNKOWN ERROR: ");
+            break;
+    }
+}
+
+void TInfoSinkBase::location(TSourceLoc loc) {
+    int string = loc >> SourceLocStringShift;
+    int line = loc & SourceLocLineMask;
+
+    TPersistStringStream stream;
+    if (line)
+        stream << string << ":" << line;
+    else
+        stream << string << ":? ";
+    stream << ": ";
+
+    sink.append(stream.str());
+}
+
+void TInfoSinkBase::message(TPrefixType message, const char* s) {
+    prefix(message);
+    sink.append(s);
+    sink.append("\n");
+}
+
+void TInfoSinkBase::message(TPrefixType message, const char* s, TSourceLoc loc) {
+    prefix(message);
+    location(loc);
+    sink.append(s);
+    sink.append("\n");
+}
diff --git a/ANGLE/src/compiler/InfoSink.h b/ANGLE/src/compiler/InfoSink.h
new file mode 100644 (file)
index 0000000..4762778
--- /dev/null
@@ -0,0 +1,114 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef _INFOSINK_INCLUDED_
+#define _INFOSINK_INCLUDED_
+
+#include <math.h>
+#include "compiler/Common.h"
+
+// Returns the fractional part of the given floating-point number.
+inline float fractionalPart(float f) {
+  float intPart = 0.0f;
+  return modff(f, &intPart);
+}
+
+//
+// TPrefixType is used to centralize how info log messages start.
+// See below.
+//
+enum TPrefixType {
+    EPrefixNone,
+    EPrefixWarning,
+    EPrefixError,
+    EPrefixInternalError,
+    EPrefixUnimplemented,
+    EPrefixNote
+};
+
+//
+// Encapsulate info logs for all objects that have them.
+//
+// The methods are a general set of tools for getting a variety of
+// messages and types inserted into the log.
+//
+class TInfoSinkBase {
+public:
+    TInfoSinkBase() {}
+
+    template <typename T>
+    TInfoSinkBase& operator<<(const T& t) {
+        TPersistStringStream stream;
+        stream << t;
+        sink.append(stream.str());
+        return *this;
+    }
+    // Override << operator for specific types. It is faster to append strings
+    // and characters directly to the sink.
+    TInfoSinkBase& operator<<(char c) {
+        sink.append(1, c);
+        return *this;
+    }
+    TInfoSinkBase& operator<<(const char* str) {
+        sink.append(str);
+        return *this;
+    }
+    TInfoSinkBase& operator<<(const TPersistString& str) {
+        sink.append(str);
+        return *this;
+    }
+    TInfoSinkBase& operator<<(const TString& str) {
+        sink.append(str.c_str());
+        return *this;
+    }
+    // Make sure floats are written with correct precision.
+    TInfoSinkBase& operator<<(float f) {
+        // Make sure that at least one decimal point is written. If a number
+        // does not have a fractional part, the default precision format does
+        // not write the decimal portion which gets interpreted as integer by
+        // the compiler.
+        TPersistStringStream stream;
+        if (fractionalPart(f) == 0.0f) {
+            stream.precision(1);
+            stream << std::showpoint << std::fixed << f;
+        } else {
+            stream.unsetf(std::ios::fixed);
+            stream.unsetf(std::ios::scientific);
+            stream.precision(8);
+            stream << f;
+        }
+        sink.append(stream.str());
+        return *this;
+    }
+    // Write boolean values as their names instead of integral value.
+    TInfoSinkBase& operator<<(bool b) {
+        const char* str = b ? "true" : "false";
+        sink.append(str);
+        return *this;
+    }
+
+    void erase() { sink.clear(); }
+
+    const TPersistString& str() const { return sink; }
+    const char* c_str() const { return sink.c_str(); }
+
+    void prefix(TPrefixType message);
+    void location(TSourceLoc loc);
+    void message(TPrefixType message, const char* s);
+    void message(TPrefixType message, const char* s, TSourceLoc loc);
+
+private:
+    TPersistString sink;
+};
+
+class TInfoSink {
+public:
+    TInfoSinkBase info;
+    TInfoSinkBase debug;
+    TInfoSinkBase obj;
+};
+
+#endif // _INFOSINK_INCLUDED_
diff --git a/ANGLE/src/compiler/Initialize.cpp b/ANGLE/src/compiler/Initialize.cpp
new file mode 100644 (file)
index 0000000..ebd23fb
--- /dev/null
@@ -0,0 +1,619 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+//
+// Create strings that declare built-in definitions, add built-ins that
+// cannot be expressed in the files, and establish mappings between 
+// built-in functions and operators.
+//
+
+#include "compiler/Initialize.h"
+
+#include "compiler/intermediate.h"
+
+void TBuiltIns::initialize()
+{
+    //
+    // Initialize all the built-in strings for parsing.
+    //
+    TString BuiltInFunctions;
+    TString BuiltInFunctionsVertex;
+    TString BuiltInFunctionsFragment;
+    TString StandardUniforms;
+    TString VertexDefaultPrecision;
+    TString FragmentDefaultPrecision;
+
+    {
+        //============================================================================
+        //
+        // Prototypes for built-in functions seen by both vertex and fragment shaders.
+        //
+        //============================================================================
+
+        TString& s = BuiltInFunctions;
+
+        //
+        // Angle and Trigonometric Functions.
+        //
+        s.append(TString("float radians(float degrees);"));
+        s.append(TString("vec2  radians(vec2  degrees);"));
+        s.append(TString("vec3  radians(vec3  degrees);"));
+        s.append(TString("vec4  radians(vec4  degrees);"));
+
+        s.append(TString("float degrees(float radians);"));
+        s.append(TString("vec2  degrees(vec2  radians);"));
+        s.append(TString("vec3  degrees(vec3  radians);"));
+        s.append(TString("vec4  degrees(vec4  radians);"));
+
+        s.append(TString("float sin(float angle);"));
+        s.append(TString("vec2  sin(vec2  angle);"));
+        s.append(TString("vec3  sin(vec3  angle);"));
+        s.append(TString("vec4  sin(vec4  angle);"));
+
+        s.append(TString("float cos(float angle);"));
+        s.append(TString("vec2  cos(vec2  angle);"));
+        s.append(TString("vec3  cos(vec3  angle);"));
+        s.append(TString("vec4  cos(vec4  angle);"));
+
+        s.append(TString("float tan(float angle);"));
+        s.append(TString("vec2  tan(vec2  angle);"));
+        s.append(TString("vec3  tan(vec3  angle);"));
+        s.append(TString("vec4  tan(vec4  angle);"));
+
+        s.append(TString("float asin(float x);"));
+        s.append(TString("vec2  asin(vec2  x);"));
+        s.append(TString("vec3  asin(vec3  x);"));
+        s.append(TString("vec4  asin(vec4  x);"));
+
+        s.append(TString("float acos(float x);"));
+        s.append(TString("vec2  acos(vec2  x);"));
+        s.append(TString("vec3  acos(vec3  x);"));
+        s.append(TString("vec4  acos(vec4  x);"));
+
+        s.append(TString("float atan(float y, float x);"));
+        s.append(TString("vec2  atan(vec2  y, vec2  x);"));
+        s.append(TString("vec3  atan(vec3  y, vec3  x);"));
+        s.append(TString("vec4  atan(vec4  y, vec4  x);"));
+
+        s.append(TString("float atan(float y_over_x);"));
+        s.append(TString("vec2  atan(vec2  y_over_x);"));
+        s.append(TString("vec3  atan(vec3  y_over_x);"));
+        s.append(TString("vec4  atan(vec4  y_over_x);"));
+
+        //
+        // Exponential Functions.
+        //
+        s.append(TString("float pow(float x, float y);"));
+        s.append(TString("vec2  pow(vec2  x, vec2  y);"));
+        s.append(TString("vec3  pow(vec3  x, vec3  y);"));
+        s.append(TString("vec4  pow(vec4  x, vec4  y);"));
+
+        s.append(TString("float exp(float x);"));
+        s.append(TString("vec2  exp(vec2  x);"));
+        s.append(TString("vec3  exp(vec3  x);"));
+        s.append(TString("vec4  exp(vec4  x);"));
+
+        s.append(TString("float log(float x);"));
+        s.append(TString("vec2  log(vec2  x);"));
+        s.append(TString("vec3  log(vec3  x);"));
+        s.append(TString("vec4  log(vec4  x);"));
+
+        s.append(TString("float exp2(float x);"));
+        s.append(TString("vec2  exp2(vec2  x);"));
+        s.append(TString("vec3  exp2(vec3  x);"));
+        s.append(TString("vec4  exp2(vec4  x);"));
+
+        s.append(TString("float log2(float x);"));
+        s.append(TString("vec2  log2(vec2  x);"));
+        s.append(TString("vec3  log2(vec3  x);"));
+        s.append(TString("vec4  log2(vec4  x);"));
+
+        s.append(TString("float sqrt(float x);"));
+        s.append(TString("vec2  sqrt(vec2  x);"));
+        s.append(TString("vec3  sqrt(vec3  x);"));
+        s.append(TString("vec4  sqrt(vec4  x);"));
+
+        s.append(TString("float inversesqrt(float x);"));
+        s.append(TString("vec2  inversesqrt(vec2  x);"));
+        s.append(TString("vec3  inversesqrt(vec3  x);"));
+        s.append(TString("vec4  inversesqrt(vec4  x);"));
+
+        //
+        // Common Functions.
+        //
+        s.append(TString("float abs(float x);"));
+        s.append(TString("vec2  abs(vec2  x);"));
+        s.append(TString("vec3  abs(vec3  x);"));
+        s.append(TString("vec4  abs(vec4  x);"));
+
+        s.append(TString("float sign(float x);"));
+        s.append(TString("vec2  sign(vec2  x);"));
+        s.append(TString("vec3  sign(vec3  x);"));
+        s.append(TString("vec4  sign(vec4  x);"));
+
+        s.append(TString("float floor(float x);"));
+        s.append(TString("vec2  floor(vec2  x);"));
+        s.append(TString("vec3  floor(vec3  x);"));
+        s.append(TString("vec4  floor(vec4  x);"));
+
+        s.append(TString("float ceil(float x);"));
+        s.append(TString("vec2  ceil(vec2  x);"));
+        s.append(TString("vec3  ceil(vec3  x);"));
+        s.append(TString("vec4  ceil(vec4  x);"));
+
+        s.append(TString("float fract(float x);"));
+        s.append(TString("vec2  fract(vec2  x);"));
+        s.append(TString("vec3  fract(vec3  x);"));
+        s.append(TString("vec4  fract(vec4  x);"));
+
+        s.append(TString("float mod(float x, float y);"));
+        s.append(TString("vec2  mod(vec2  x, float y);"));
+        s.append(TString("vec3  mod(vec3  x, float y);"));
+        s.append(TString("vec4  mod(vec4  x, float y);"));
+        s.append(TString("vec2  mod(vec2  x, vec2  y);"));
+        s.append(TString("vec3  mod(vec3  x, vec3  y);"));
+        s.append(TString("vec4  mod(vec4  x, vec4  y);"));
+
+        s.append(TString("float min(float x, float y);"));
+        s.append(TString("vec2  min(vec2  x, float y);"));
+        s.append(TString("vec3  min(vec3  x, float y);"));
+        s.append(TString("vec4  min(vec4  x, float y);"));
+        s.append(TString("vec2  min(vec2  x, vec2  y);"));
+        s.append(TString("vec3  min(vec3  x, vec3  y);"));
+        s.append(TString("vec4  min(vec4  x, vec4  y);"));
+
+        s.append(TString("float max(float x, float y);"));
+        s.append(TString("vec2  max(vec2  x, float y);"));
+        s.append(TString("vec3  max(vec3  x, float y);"));
+        s.append(TString("vec4  max(vec4  x, float y);"));
+        s.append(TString("vec2  max(vec2  x, vec2  y);"));
+        s.append(TString("vec3  max(vec3  x, vec3  y);"));
+        s.append(TString("vec4  max(vec4  x, vec4  y);"));
+
+        s.append(TString("float clamp(float x, float minVal, float maxVal);"));
+        s.append(TString("vec2  clamp(vec2  x, float minVal, float maxVal);"));
+        s.append(TString("vec3  clamp(vec3  x, float minVal, float maxVal);"));
+        s.append(TString("vec4  clamp(vec4  x, float minVal, float maxVal);"));
+        s.append(TString("vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);"));
+        s.append(TString("vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);"));
+        s.append(TString("vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);"));
+
+        s.append(TString("float mix(float x, float y, float a);"));
+        s.append(TString("vec2  mix(vec2  x, vec2  y, float a);"));
+        s.append(TString("vec3  mix(vec3  x, vec3  y, float a);"));
+        s.append(TString("vec4  mix(vec4  x, vec4  y, float a);"));
+        s.append(TString("vec2  mix(vec2  x, vec2  y, vec2  a);"));
+        s.append(TString("vec3  mix(vec3  x, vec3  y, vec3  a);"));
+        s.append(TString("vec4  mix(vec4  x, vec4  y, vec4  a);"));
+
+        s.append(TString("float step(float edge, float x);"));
+        s.append(TString("vec2  step(vec2  edge, vec2  x);"));
+        s.append(TString("vec3  step(vec3  edge, vec3  x);"));
+        s.append(TString("vec4  step(vec4  edge, vec4  x);"));
+        s.append(TString("vec2  step(float edge, vec2  x);"));
+        s.append(TString("vec3  step(float edge, vec3  x);"));
+        s.append(TString("vec4  step(float edge, vec4  x);"));
+
+        s.append(TString("float smoothstep(float edge0, float edge1, float x);"));
+        s.append(TString("vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);"));
+        s.append(TString("vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);"));
+        s.append(TString("vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);"));
+        s.append(TString("vec2  smoothstep(float edge0, float edge1, vec2  x);"));
+        s.append(TString("vec3  smoothstep(float edge0, float edge1, vec3  x);"));
+        s.append(TString("vec4  smoothstep(float edge0, float edge1, vec4  x);"));
+
+        //
+        // Geometric Functions.
+        //
+        s.append(TString("float length(float x);"));
+        s.append(TString("float length(vec2  x);"));
+        s.append(TString("float length(vec3  x);"));
+        s.append(TString("float length(vec4  x);"));
+
+        s.append(TString("float distance(float p0, float p1);"));
+        s.append(TString("float distance(vec2  p0, vec2  p1);"));
+        s.append(TString("float distance(vec3  p0, vec3  p1);"));
+        s.append(TString("float distance(vec4  p0, vec4  p1);"));
+
+        s.append(TString("float dot(float x, float y);"));
+        s.append(TString("float dot(vec2  x, vec2  y);"));
+        s.append(TString("float dot(vec3  x, vec3  y);"));
+        s.append(TString("float dot(vec4  x, vec4  y);"));
+
+        s.append(TString("vec3 cross(vec3 x, vec3 y);"));
+        s.append(TString("float normalize(float x);"));
+        s.append(TString("vec2  normalize(vec2  x);"));
+        s.append(TString("vec3  normalize(vec3  x);"));
+        s.append(TString("vec4  normalize(vec4  x);"));
+
+        s.append(TString("float faceforward(float N, float I, float Nref);"));
+        s.append(TString("vec2  faceforward(vec2  N, vec2  I, vec2  Nref);"));
+        s.append(TString("vec3  faceforward(vec3  N, vec3  I, vec3  Nref);"));
+        s.append(TString("vec4  faceforward(vec4  N, vec4  I, vec4  Nref);"));
+
+        s.append(TString("float reflect(float I, float N);"));
+        s.append(TString("vec2  reflect(vec2  I, vec2  N);"));
+        s.append(TString("vec3  reflect(vec3  I, vec3  N);"));
+        s.append(TString("vec4  reflect(vec4  I, vec4  N);"));
+
+        s.append(TString("float refract(float I, float N, float eta);"));
+        s.append(TString("vec2  refract(vec2  I, vec2  N, float eta);"));
+        s.append(TString("vec3  refract(vec3  I, vec3  N, float eta);"));
+        s.append(TString("vec4  refract(vec4  I, vec4  N, float eta);"));
+
+        //
+        // Matrix Functions.
+        //
+        s.append(TString("mat2 matrixCompMult(mat2 x, mat2 y);"));
+        s.append(TString("mat3 matrixCompMult(mat3 x, mat3 y);"));
+        s.append(TString("mat4 matrixCompMult(mat4 x, mat4 y);"));
+
+        //
+        // Vector relational functions.
+        //
+        s.append(TString("bvec2 lessThan(vec2 x, vec2 y);"));
+        s.append(TString("bvec3 lessThan(vec3 x, vec3 y);"));
+        s.append(TString("bvec4 lessThan(vec4 x, vec4 y);"));
+
+        s.append(TString("bvec2 lessThan(ivec2 x, ivec2 y);"));
+        s.append(TString("bvec3 lessThan(ivec3 x, ivec3 y);"));
+        s.append(TString("bvec4 lessThan(ivec4 x, ivec4 y);"));
+
+        s.append(TString("bvec2 lessThanEqual(vec2 x, vec2 y);"));
+        s.append(TString("bvec3 lessThanEqual(vec3 x, vec3 y);"));
+        s.append(TString("bvec4 lessThanEqual(vec4 x, vec4 y);"));
+
+        s.append(TString("bvec2 lessThanEqual(ivec2 x, ivec2 y);"));
+        s.append(TString("bvec3 lessThanEqual(ivec3 x, ivec3 y);"));
+        s.append(TString("bvec4 lessThanEqual(ivec4 x, ivec4 y);"));
+
+        s.append(TString("bvec2 greaterThan(vec2 x, vec2 y);"));
+        s.append(TString("bvec3 greaterThan(vec3 x, vec3 y);"));
+        s.append(TString("bvec4 greaterThan(vec4 x, vec4 y);"));
+
+        s.append(TString("bvec2 greaterThan(ivec2 x, ivec2 y);"));
+        s.append(TString("bvec3 greaterThan(ivec3 x, ivec3 y);"));
+        s.append(TString("bvec4 greaterThan(ivec4 x, ivec4 y);"));
+
+        s.append(TString("bvec2 greaterThanEqual(vec2 x, vec2 y);"));
+        s.append(TString("bvec3 greaterThanEqual(vec3 x, vec3 y);"));
+        s.append(TString("bvec4 greaterThanEqual(vec4 x, vec4 y);"));
+
+        s.append(TString("bvec2 greaterThanEqual(ivec2 x, ivec2 y);"));
+        s.append(TString("bvec3 greaterThanEqual(ivec3 x, ivec3 y);"));
+        s.append(TString("bvec4 greaterThanEqual(ivec4 x, ivec4 y);"));
+
+        s.append(TString("bvec2 equal(vec2 x, vec2 y);"));
+        s.append(TString("bvec3 equal(vec3 x, vec3 y);"));
+        s.append(TString("bvec4 equal(vec4 x, vec4 y);"));
+
+        s.append(TString("bvec2 equal(ivec2 x, ivec2 y);"));
+        s.append(TString("bvec3 equal(ivec3 x, ivec3 y);"));
+        s.append(TString("bvec4 equal(ivec4 x, ivec4 y);"));
+
+        s.append(TString("bvec2 equal(bvec2 x, bvec2 y);"));
+        s.append(TString("bvec3 equal(bvec3 x, bvec3 y);"));
+        s.append(TString("bvec4 equal(bvec4 x, bvec4 y);"));
+
+        s.append(TString("bvec2 notEqual(vec2 x, vec2 y);"));
+        s.append(TString("bvec3 notEqual(vec3 x, vec3 y);"));
+        s.append(TString("bvec4 notEqual(vec4 x, vec4 y);"));
+
+        s.append(TString("bvec2 notEqual(ivec2 x, ivec2 y);"));
+        s.append(TString("bvec3 notEqual(ivec3 x, ivec3 y);"));
+        s.append(TString("bvec4 notEqual(ivec4 x, ivec4 y);"));
+
+        s.append(TString("bvec2 notEqual(bvec2 x, bvec2 y);"));
+        s.append(TString("bvec3 notEqual(bvec3 x, bvec3 y);"));
+        s.append(TString("bvec4 notEqual(bvec4 x, bvec4 y);"));
+
+        s.append(TString("bool any(bvec2 x);"));
+        s.append(TString("bool any(bvec3 x);"));
+        s.append(TString("bool any(bvec4 x);"));
+
+        s.append(TString("bool all(bvec2 x);"));
+        s.append(TString("bool all(bvec3 x);"));
+        s.append(TString("bool all(bvec4 x);"));
+
+        s.append(TString("bvec2 not(bvec2 x);"));
+        s.append(TString("bvec3 not(bvec3 x);"));
+        s.append(TString("bvec4 not(bvec4 x);"));
+
+        //
+        // Texture Functions.
+        //
+        s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord);"));
+        s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord);"));
+        s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord);"));
+
+        s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord);"));
+
+        //
+        // Noise functions.
+        //
+    // s.append(TString("float noise1(float x);"));
+    // s.append(TString("float noise1(vec2  x);"));
+    // s.append(TString("float noise1(vec3  x);"));
+    // s.append(TString("float noise1(vec4  x);"));
+
+    // s.append(TString("vec2 noise2(float x);"));
+    // s.append(TString("vec2 noise2(vec2  x);"));
+    // s.append(TString("vec2 noise2(vec3  x);"));
+    // s.append(TString("vec2 noise2(vec4  x);"));
+
+    // s.append(TString("vec3 noise3(float x);"));
+    // s.append(TString("vec3 noise3(vec2  x);"));
+    // s.append(TString("vec3 noise3(vec3  x);"));
+    // s.append(TString("vec3 noise3(vec4  x);"));
+
+    // s.append(TString("vec4 noise4(float x);"));
+    // s.append(TString("vec4 noise4(vec2  x);"));
+    // s.append(TString("vec4 noise4(vec3  x);"));
+    // s.append(TString("vec4 noise4(vec4  x);"));
+
+        s.append(TString("\n"));
+    }
+    {
+        //============================================================================
+        //
+        // Prototypes for built-in functions seen by vertex shaders only.
+        //
+        //============================================================================
+
+        TString& s = BuiltInFunctionsVertex;
+
+        //
+        // Geometric Functions.
+        //
+        s.append(TString("vec4 ftransform();"));
+
+        //
+        // Texture Functions.
+        //
+        s.append(TString("vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);"));
+        s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);"));
+        s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);"));
+
+        s.append(TString("vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);"));
+
+        s.append(TString("\n"));
+    }
+    {
+        //============================================================================
+        //
+        // Prototypes for built-in functions seen by fragment shaders only.
+        //
+        //============================================================================
+
+        TString& s = BuiltInFunctionsFragment;
+
+        //
+        // Texture Functions.
+        //
+        s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord, float bias);"));
+        s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias);"));
+        s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias);"));
+
+        s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord, float bias);"));
+
+    // s.append(TString("float dFdx(float p);"));
+    // s.append(TString("vec2  dFdx(vec2  p);"));
+    // s.append(TString("vec3  dFdx(vec3  p);"));
+    // s.append(TString("vec4  dFdx(vec4  p);"));
+
+    // s.append(TString("float dFdy(float p);"));
+    // s.append(TString("vec2  dFdy(vec2  p);"));
+    // s.append(TString("vec3  dFdy(vec3  p);"));
+    // s.append(TString("vec4  dFdy(vec4  p);"));
+
+        s.append(TString("float fwidth(float p);"));
+        s.append(TString("vec2  fwidth(vec2  p);"));
+        s.append(TString("vec3  fwidth(vec3  p);"));
+        s.append(TString("vec4  fwidth(vec4  p);"));
+
+        s.append(TString("\n"));
+    }
+    {
+        //============================================================================
+        //
+        // Standard Uniforms
+        //
+        //============================================================================
+
+        TString& s = StandardUniforms;
+
+        //
+        // Depth range in window coordinates
+        //
+        s.append(TString("struct gl_DepthRangeParameters {"));
+        s.append(TString("    highp float near;"));        // n
+        s.append(TString("    highp float far;"));         // f
+        s.append(TString("    highp float diff;"));        // f - n
+        s.append(TString("};"));
+        s.append(TString("uniform gl_DepthRangeParameters gl_DepthRange;"));
+
+        s.append(TString("\n"));
+    }
+    {
+        //============================================================================
+        //
+        // Default precision for vertex shaders.
+        //
+        //============================================================================
+
+        TString& s = VertexDefaultPrecision;
+
+        s.append(TString("precision highp int;"));
+        s.append(TString("precision highp float;"));
+        s.append(TString("\n"));
+    }
+    {
+        //============================================================================
+        //
+        // Default precision for fragment shaders.
+        //
+        //============================================================================
+        
+        TString& s = FragmentDefaultPrecision;
+        
+        s.append(TString("precision mediump int;"));
+        // No default precision for float in fragment shaders
+        s.append(TString("\n"));
+    }
+
+    builtInStrings[EShLangFragment].push_back(FragmentDefaultPrecision);
+    builtInStrings[EShLangFragment].push_back(BuiltInFunctions.c_str());
+    builtInStrings[EShLangFragment].push_back(BuiltInFunctionsFragment);
+    builtInStrings[EShLangFragment].push_back(StandardUniforms);
+    
+    builtInStrings[EShLangVertex].push_back(VertexDefaultPrecision);
+    builtInStrings[EShLangVertex].push_back(BuiltInFunctions);
+    builtInStrings[EShLangVertex].push_back(BuiltInFunctionsVertex);
+    builtInStrings[EShLangVertex].push_back(StandardUniforms);
+}
+
+void TBuiltIns::initialize(const TBuiltInResource &resources)
+{
+    TStringStream builtIns;
+
+    // Implementation dependent constants
+    builtIns << "const int gl_MaxVertexAttribs = " << resources.maxVertexAttribs << ";";
+    builtIns << "const int gl_MaxVertexUniformVectors = " << resources.maxVertexUniformVectors << ";";
+
+    builtIns << "const int gl_MaxVaryingVectors = " << resources.maxVaryingVectors << ";";
+    builtIns << "const int gl_MaxVertexTextureImageUnits = " << resources.maxVertexTextureImageUnits << ";";
+    builtIns << "const int gl_MaxCombinedTextureImageUnits = " << resources.maxCombinedTextureImageUnits << ";";
+    builtIns << "const int gl_MaxTextureImageUnits = " << resources.maxTextureImageUnits << ";";
+    builtIns << "const int gl_MaxFragmentUniformVectors = " << resources.maxFragmentUniformVectors << ";";
+    builtIns << "const int gl_MaxDrawBuffers = " << resources.maxDrawBuffers << ";";
+
+    builtInStrings[EShLangFragment].push_back(builtIns.str());
+    builtInStrings[EShLangVertex].push_back(builtIns.str());
+}
+
+void IdentifyBuiltIns(EShLanguage language, TSymbolTable& symbolTable)
+{
+    //
+    // First, insert some special built-in variables that are not in 
+    // the built-in header files.
+    //
+    switch(language) {
+
+    case EShLangFragment: {
+            symbolTable.insert(*new TVariable(NewPoolTString("gl_FragCoord"),                   TType(EbtFloat, EbpMedium, EvqFragCoord,   4)));
+            symbolTable.insert(*new TVariable(NewPoolTString("gl_FrontFacing"),                 TType(EbtBool,  EbpUndefined, EvqFrontFacing, 1)));
+            symbolTable.insert(*new TVariable(NewPoolTString("gl_FragColor"),                   TType(EbtFloat, EbpMedium, EvqFragColor,   4)));
+            symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData[gl_MaxDrawBuffers]"), TType(EbtFloat, EbpMedium, EvqFragData,    4)));
+            symbolTable.insert(*new TVariable(NewPoolTString("gl_PointCoord"),                  TType(EbtFloat, EbpMedium, EvqPointCoord,  2)));
+
+        }
+        break;
+
+    case EShLangVertex:
+        symbolTable.insert(*new TVariable(NewPoolTString("gl_Position"),    TType(EbtFloat, EbpHigh, EvqPosition,    4)));
+        symbolTable.insert(*new TVariable(NewPoolTString("gl_PointSize"),   TType(EbtFloat, EbpMedium, EvqPointSize,   1)));
+        break;
+    default: break;
+    }
+
+    //
+    // Next, identify which built-ins from the already loaded headers have
+    // a mapping to an operator.  Those that are not identified as such are
+    // expected to be resolved through a library of functions, versus as
+    // operations.
+    //
+    symbolTable.relateToOperator("not",              EOpVectorLogicalNot);
+
+    symbolTable.relateToOperator("matrixCompMult",   EOpMul);
+
+    symbolTable.relateToOperator("equal",            EOpVectorEqual);
+    symbolTable.relateToOperator("notEqual",         EOpVectorNotEqual);
+    symbolTable.relateToOperator("lessThan",         EOpLessThan);
+    symbolTable.relateToOperator("greaterThan",      EOpGreaterThan);
+    symbolTable.relateToOperator("lessThanEqual",    EOpLessThanEqual);
+    symbolTable.relateToOperator("greaterThanEqual", EOpGreaterThanEqual);
+    
+    symbolTable.relateToOperator("radians",      EOpRadians);
+    symbolTable.relateToOperator("degrees",      EOpDegrees);
+    symbolTable.relateToOperator("sin",          EOpSin);
+    symbolTable.relateToOperator("cos",          EOpCos);
+    symbolTable.relateToOperator("tan",          EOpTan);
+    symbolTable.relateToOperator("asin",         EOpAsin);
+    symbolTable.relateToOperator("acos",         EOpAcos);
+    symbolTable.relateToOperator("atan",         EOpAtan);
+
+    symbolTable.relateToOperator("pow",          EOpPow);
+    symbolTable.relateToOperator("exp2",         EOpExp2);
+    symbolTable.relateToOperator("log",          EOpLog);
+    symbolTable.relateToOperator("exp",          EOpExp);
+    symbolTable.relateToOperator("log2",         EOpLog2);
+    symbolTable.relateToOperator("sqrt",         EOpSqrt);
+    symbolTable.relateToOperator("inversesqrt",  EOpInverseSqrt);
+
+    symbolTable.relateToOperator("abs",          EOpAbs);
+    symbolTable.relateToOperator("sign",         EOpSign);
+    symbolTable.relateToOperator("floor",        EOpFloor);
+    symbolTable.relateToOperator("ceil",         EOpCeil);
+    symbolTable.relateToOperator("fract",        EOpFract);
+    symbolTable.relateToOperator("mod",          EOpMod);
+    symbolTable.relateToOperator("min",          EOpMin);
+    symbolTable.relateToOperator("max",          EOpMax);
+    symbolTable.relateToOperator("clamp",        EOpClamp);
+    symbolTable.relateToOperator("mix",          EOpMix);
+    symbolTable.relateToOperator("step",         EOpStep);
+    symbolTable.relateToOperator("smoothstep",   EOpSmoothStep);
+
+    symbolTable.relateToOperator("length",       EOpLength);
+    symbolTable.relateToOperator("distance",     EOpDistance);
+    symbolTable.relateToOperator("dot",          EOpDot);
+    symbolTable.relateToOperator("cross",        EOpCross);
+    symbolTable.relateToOperator("normalize",    EOpNormalize);
+    symbolTable.relateToOperator("faceforward",  EOpFaceForward);
+    symbolTable.relateToOperator("reflect",      EOpReflect);
+    symbolTable.relateToOperator("refract",      EOpRefract);
+    
+    symbolTable.relateToOperator("any",          EOpAny);
+    symbolTable.relateToOperator("all",          EOpAll);
+
+    switch(language)
+    {
+    case EShLangVertex:
+        break;
+    case EShLangFragment:
+    // symbolTable.relateToOperator("dFdx",         EOpDPdx);     // OES_standard_derivatives extension
+    // symbolTable.relateToOperator("dFdy",         EOpDPdy);     // OES_standard_derivatives extension
+    // symbolTable.relateToOperator("fwidth",       EOpFwidth);   // OES_standard_derivatives extension
+        break;
+    default: assert(false && "Language not supported");
+    }
+}
+
+void IdentifyBuiltIns(EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources)
+{
+    //
+    // First, insert some special built-in variables that are not in 
+    // the built-in header files.
+    //
+    switch(language) {
+
+    case EShLangFragment: {
+            // Set up gl_FragData.  The array size.
+            TType fragData(EbtFloat, EbpMedium, EvqFragColor,   4, false, true);
+            fragData.setArraySize(resources.maxDrawBuffers);
+            symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"),    fragData));
+        }
+        break;
+
+    default: break;
+    }
+}
+
+const char* GetPreprocessorBuiltinString()
+{
+    static const char *PreprocessorBuiltinString = "";
+
+    return PreprocessorBuiltinString;
+}
diff --git a/ANGLE/src/compiler/Initialize.h b/ANGLE/src/compiler/Initialize.h
new file mode 100644 (file)
index 0000000..777742e
--- /dev/null
@@ -0,0 +1,36 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef _INITIALIZE_INCLUDED_
+#define _INITIALIZE_INCLUDED_
+
+#include "GLSLANG/ResourceLimits.h"
+
+#include "compiler/Common.h"
+#include "compiler/ShHandle.h"
+#include "compiler/SymbolTable.h"
+
+typedef TVector<TString> TBuiltInStrings;
+
+class TBuiltIns {
+public:
+       POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
+       void initialize();
+       void initialize(const TBuiltInResource& resources);
+       TBuiltInStrings* getBuiltInStrings() { return builtInStrings; }
+protected:
+       TBuiltInStrings builtInStrings[EShLangCount];
+};
+
+void IdentifyBuiltIns(EShLanguage, TSymbolTable&);
+void IdentifyBuiltIns(EShLanguage, TSymbolTable&, const TBuiltInResource &resources);
+bool GenerateBuiltInSymbolTable(const TBuiltInResource* resources, TInfoSink&, TSymbolTable*, EShLanguage language = EShLangCount);
+bool InitializeSymbolTable(TBuiltInStrings* BuiltInStrings, EShLanguage language, TInfoSink& infoSink, const TBuiltInResource *resources, TSymbolTable*);
+const char* GetPreprocessorBuiltinString();
+extern "C" int InitPreprocessor(void);
+extern "C" int FinalizePreprocessor(void);
+
+#endif // _INITIALIZE_INCLUDED_
diff --git a/ANGLE/src/compiler/InitializeDll.cpp b/ANGLE/src/compiler/InitializeDll.cpp
new file mode 100644 (file)
index 0000000..06f8384
--- /dev/null
@@ -0,0 +1,120 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/InitializeDll.h"
+
+#include "GLSLANG/ShaderLang.h"
+
+#include "compiler/InitializeGlobals.h"
+#include "compiler/InitializeParseContext.h"
+
+OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
+
+bool InitProcess()
+{
+    if (ThreadInitializeIndex != OS_INVALID_TLS_INDEX) {
+               //
+               // Function is re-entrant.
+               //
+        return true;
+       }
+
+    ThreadInitializeIndex = OS_AllocTLSIndex();
+
+    if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
+        assert(0 && "InitProcess(): Failed to allocate TLS area for init flag");
+        return false;
+       }
+
+
+    if (!InitializePoolIndex()) {
+        assert(0 && "InitProcess(): Failed to initalize global pool");
+        return false;
+       }
+
+    if (!InitializeParseContextIndex()) {
+        assert(0 && "InitProcess(): Failed to initalize parse context");
+        return false;
+       }
+
+       InitThread();
+    return true;
+}
+
+
+bool InitThread()
+{
+       //
+    // This function is re-entrant
+       //
+    if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) {
+               assert(0 && "InitThread(): Process hasn't been initalised.");
+        return false;
+       }
+
+    if (OS_GetTLSValue(ThreadInitializeIndex) != 0)
+        return true;
+
+       InitializeGlobalPools();
+
+       if (!InitializeGlobalParseContext())
+        return false;
+
+    if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) {
+               assert(0 && "InitThread(): Unable to set init flag.");
+        return false;
+       }
+
+    return true;
+}
+
+
+bool DetachThread()
+{
+    bool success = true;
+
+    if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
+        return true;
+
+       //
+       // Function is re-entrant and this thread may not have been initalised.
+       //
+    if (OS_GetTLSValue(ThreadInitializeIndex) != 0) {
+        if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) {
+                       assert(0 && "DetachThread(): Unable to clear init flag.");
+            success = false;
+               }
+
+               FreeGlobalPools();
+
+               if (!FreeParseContext())
+            success = false;
+       }
+
+    return success;
+}
+
+bool DetachProcess()
+{
+    bool success = true;
+
+    if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX)
+        return true;
+
+    ShFinalize();
+
+    success = DetachThread();
+
+       FreePoolIndex();
+
+       if (!FreeParseContextIndex())
+        success = false;
+
+    OS_FreeTLSIndex(ThreadInitializeIndex);
+    ThreadInitializeIndex = OS_INVALID_TLS_INDEX;
+
+    return success;
+}
diff --git a/ANGLE/src/compiler/InitializeDll.h b/ANGLE/src/compiler/InitializeDll.h
new file mode 100644 (file)
index 0000000..bb17540
--- /dev/null
@@ -0,0 +1,19 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+#ifndef __INITIALIZEDLL_H
+#define __INITIALIZEDLL_H
+
+
+#include "compiler/osinclude.h"
+
+
+bool InitProcess();
+bool InitThread();
+bool DetachThread();
+bool DetachProcess();
+
+#endif // __INITIALIZEDLL_H
+
diff --git a/ANGLE/src/compiler/InitializeGlobals.h b/ANGLE/src/compiler/InitializeGlobals.h
new file mode 100644 (file)
index 0000000..842a452
--- /dev/null
@@ -0,0 +1,15 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef __INITIALIZE_GLOBALS_INCLUDED_
+#define __INITIALIZE_GLOBALS_INCLUDED_
+
+void InitializeGlobalPools();
+void FreeGlobalPools();
+bool InitializePoolIndex();
+void FreePoolIndex();
+
+#endif // __INITIALIZE_GLOBALS_INCLUDED_
diff --git a/ANGLE/src/compiler/InitializeParseContext.h b/ANGLE/src/compiler/InitializeParseContext.h
new file mode 100644 (file)
index 0000000..68295d0
--- /dev/null
@@ -0,0 +1,17 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#ifndef __INITIALIZE_PARSE_CONTEXT_INCLUDED_
+#define __INITIALIZE_PARSE_CONTEXT_INCLUDED_
+#include "compiler/osinclude.h"
+
+bool InitializeParseContextIndex();
+bool InitializeGlobalParseContext();
+bool FreeParseContext();
+bool FreeParseContextIndex();
+
+
+#endif // __INITIALIZE_PARSE_CONTEXT_INCLUDED_
diff --git a/ANGLE/src/compiler/IntermTraverse.cpp b/ANGLE/src/compiler/IntermTraverse.cpp
new file mode 100644 (file)
index 0000000..34a6f3c
--- /dev/null
@@ -0,0 +1,293 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/intermediate.h"
+
+//
+// Traverse the intermediate representation tree, and
+// call a node type specific function for each node.
+// Done recursively through the member function Traverse().
+// Node types can be skipped if their function to call is 0,
+// but their subtree will still be traversed.
+// Nodes with children can have their whole subtree skipped
+// if preVisit is turned on and the type specific function
+// returns false.
+//
+// preVisit, postVisit, and rightToLeft control what order
+// nodes are visited in.
+//
+
+//
+// Traversal functions for terminals are straighforward....
+//
+void TIntermSymbol::traverse(TIntermTraverser* it)
+{
+       it->visitSymbol(this);
+}
+
+void TIntermConstantUnion::traverse(TIntermTraverser* it)
+{
+       it->visitConstantUnion(this);
+}
+
+//
+// Traverse a binary node.
+//
+void TIntermBinary::traverse(TIntermTraverser* it)
+{
+       bool visit = true;
+
+       //
+       // visit the node before children if pre-visiting.
+       //
+       if(it->preVisit)
+       {
+               visit = it->visitBinary(PreVisit, this);
+       }
+       
+       //
+       // Visit the children, in the right order.
+       //
+       if(visit)
+       {
+               it->incrementDepth();
+
+               if(it->rightToLeft) 
+               {
+                       if(right)
+                       {
+                               right->traverse(it);
+                       }
+                       
+                       if(it->inVisit)
+                       {
+                               visit = it->visitBinary(InVisit, this);
+                       }
+
+                       if(visit && left)
+                       {
+                               left->traverse(it);
+                       }
+               }
+               else
+               {
+                       if(left)
+                       {
+                               left->traverse(it);
+                       }
+                       
+                       if(it->inVisit)
+                       {
+                               visit = it->visitBinary(InVisit, this);
+                       }
+
+                       if(visit && right)
+                       {
+                               right->traverse(it);
+                       }
+               }
+
+               it->decrementDepth();
+       }
+
+       //
+       // Visit the node after the children, if requested and the traversal
+       // hasn't been cancelled yet.
+       //
+       if(visit && it->postVisit)
+       {
+               it->visitBinary(PostVisit, this);
+       }
+}
+
+//
+// Traverse a unary node.  Same comments in binary node apply here.
+//
+void TIntermUnary::traverse(TIntermTraverser* it)
+{
+       bool visit = true;
+
+       if (it->preVisit)
+               visit = it->visitUnary(PreVisit, this);
+
+       if (visit) {
+               it->incrementDepth();
+               operand->traverse(it);
+               it->decrementDepth();
+       }
+       
+       if (visit && it->postVisit)
+               it->visitUnary(PostVisit, this);
+}
+
+//
+// Traverse an aggregate node.  Same comments in binary node apply here.
+//
+void TIntermAggregate::traverse(TIntermTraverser* it)
+{
+       bool visit = true;
+       
+       if(it->preVisit)
+       {
+               visit = it->visitAggregate(PreVisit, this);
+       }
+       
+       if(visit)
+       {
+               it->incrementDepth();
+
+               if(it->rightToLeft)
+               {
+                       for(TIntermSequence::reverse_iterator sit = sequence.rbegin(); sit != sequence.rend(); sit++)
+                       {
+                               (*sit)->traverse(it);
+
+                               if(visit && it->inVisit)
+                               {
+                                       if(*sit != sequence.front())
+                                       {
+                                               visit = it->visitAggregate(InVisit, this);
+                                       }
+                               }
+                       }
+               }
+               else
+               {
+                       for(TIntermSequence::iterator sit = sequence.begin(); sit != sequence.end(); sit++)
+                       {
+                               (*sit)->traverse(it);
+
+                               if(visit && it->inVisit)
+                               {
+                                       if(*sit != sequence.back())
+                                       {
+                                               visit = it->visitAggregate(InVisit, this);
+                                       }
+                               }
+                       }
+               }
+               
+               it->decrementDepth();
+       }
+
+       if(visit && it->postVisit)
+       {
+               it->visitAggregate(PostVisit, this);
+       }
+}
+
+//
+// Traverse a selection node.  Same comments in binary node apply here.
+//
+void TIntermSelection::traverse(TIntermTraverser* it)
+{
+       bool visit = true;
+
+       if (it->preVisit)
+               visit = it->visitSelection(PreVisit, this);
+       
+       if (visit) {
+               it->incrementDepth();
+               if (it->rightToLeft) {
+                       if (falseBlock)
+                               falseBlock->traverse(it);
+                       if (trueBlock)
+                               trueBlock->traverse(it);
+                       condition->traverse(it);
+               } else {
+                       condition->traverse(it);
+                       if (trueBlock)
+                               trueBlock->traverse(it);
+                       if (falseBlock)
+                               falseBlock->traverse(it);
+               }
+               it->decrementDepth();
+       }
+
+       if (visit && it->postVisit)
+               it->visitSelection(PostVisit, this);
+}
+
+//
+// Traverse a loop node.  Same comments in binary node apply here.
+//
+void TIntermLoop::traverse(TIntermTraverser* it)
+{
+       bool visit = true;
+
+       if(it->preVisit)
+       {
+               visit = it->visitLoop(PreVisit, this);
+       }
+       
+       if(visit)
+       {
+               it->incrementDepth();
+
+               if(it->rightToLeft)
+               {
+                       if(terminal)
+                       {
+                               terminal->traverse(it);
+                       }
+
+                       if(body)
+                       {
+                               body->traverse(it);
+                       }
+
+                       if(test)
+                       {
+                               test->traverse(it);
+                       }
+               }
+               else
+               {
+                       if(test)
+                       {
+                               test->traverse(it);
+                       }
+
+                       if(body)
+                       {
+                               body->traverse(it);
+                       }
+
+                       if(terminal)
+                       {
+                               terminal->traverse(it);
+                       }
+               }
+
+               it->decrementDepth();
+       }
+
+       if(visit && it->postVisit)
+       {
+               it->visitLoop(PostVisit, this);
+       }
+}
+
+//
+// Traverse a branch node.  Same comments in binary node apply here.
+//
+void TIntermBranch::traverse(TIntermTraverser* it)
+{
+       bool visit = true;
+
+       if (it->preVisit)
+               visit = it->visitBranch(PreVisit, this);
+       
+       if (visit && expression) {
+               it->incrementDepth();
+               expression->traverse(it);
+               it->decrementDepth();
+       }
+
+       if (visit && it->postVisit)
+               it->visitBranch(PostVisit, this);
+}
+
diff --git a/ANGLE/src/compiler/Intermediate.cpp b/ANGLE/src/compiler/Intermediate.cpp
new file mode 100644 (file)
index 0000000..f65bc80
--- /dev/null
@@ -0,0 +1,1405 @@
+//
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+//
+// Build the intermediate representation.
+//
+
+#include <float.h>
+#include <limits.h>
+
+#include "compiler/localintermediate.h"
+#include "compiler/QualifierAlive.h"
+#include "compiler/RemoveTree.h"
+
+bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray);
+
+TPrecision GetHighestPrecision( TPrecision left, TPrecision right ){
+    return left > right ? left : right;
+}
+////////////////////////////////////////////////////////////////////////////
+//
+// First set of functions are to help build the intermediate representation.
+// These functions are not member functions of the nodes.
+// They are called from parser productions.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+//
+// Add a terminal node for an identifier in an expression.
+//
+// Returns the added node.
+//
+TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, TSourceLoc line)
+{
+    TIntermSymbol* node = new TIntermSymbol(id, name, type);
+    node->setLine(line);
+
+    return node;
+}
+
+//
+// Connect two nodes with a new parent that does a binary operation on the nodes.
+//
+// Returns the added node.
+//
+TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc line, TSymbolTable& symbolTable)
+{
+    switch (op) {
+        case EOpLessThan:
+        case EOpGreaterThan:
+        case EOpLessThanEqual:
+        case EOpGreaterThanEqual:
+            if (left->getType().isMatrix() || left->getType().isArray() || left->getType().isVector() || left->getType().getBasicType() == EbtStruct) {
+                return 0;
+            }
+            break;
+        case EOpLogicalOr:
+        case EOpLogicalXor:
+        case EOpLogicalAnd:
+            if (left->getType().getBasicType() != EbtBool || left->getType().isMatrix() || left->getType().isArray() || left->getType().isVector()) {
+                return 0;
+            }
+            break;
+        case EOpAdd:
+        case EOpSub:
+        case EOpDiv:
+        case EOpMul:
+            if (left->getType().getBasicType() == EbtStruct || left->getType().getBasicType() == EbtBool)
+                return 0;
+        default: break;
+    }
+
+    //
+    // First try converting the children to compatible types.
+    //
+
+    if (!(left->getType().getStruct() && right->getType().getStruct())) {
+        TIntermTyped* child = addConversion(op, left->getType(), right);
+        if (child)
+            right = child;
+        else {
+            child = addConversion(op, right->getType(), left);
+            if (child)
+                left = child;
+            else
+                return 0;
+        }
+    } else {
+        if (left->getType() != right->getType())
+            return 0;
+    }
+
+
+    //
+    // Need a new node holding things together then.  Make
+    // one and promote it to the right type.
+    //
+    TIntermBinary* node = new TIntermBinary(op);
+    if (line == 0)
+        line = right->getLine();
+    node->setLine(line);
+
+    node->setLeft(left);
+    node->setRight(right);
+    if (! node->promote(infoSink))
+        return 0;
+
+    TIntermConstantUnion *leftTempConstant = left->getAsConstantUnion();
+    TIntermConstantUnion *rightTempConstant = right->getAsConstantUnion();
+
+    if (leftTempConstant)
+        leftTempConstant = left->getAsConstantUnion();
+
+    if (rightTempConstant)
+        rightTempConstant = right->getAsConstantUnion();
+
+    //
+    // See if we can fold constants.
+    //
+
+    TIntermTyped* typedReturnNode = 0;
+    if ( leftTempConstant && rightTempConstant) {
+        typedReturnNode = leftTempConstant->fold(node->getOp(), rightTempConstant, infoSink);
+
+        if (typedReturnNode)
+            return typedReturnNode;
+    }
+
+    return node;
+}
+
+//
+// Connect two nodes through an assignment.
+//
+// Returns the added node.
+//
+TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc line)
+{
+    //
+    // Like adding binary math, except the conversion can only go
+    // from right to left.
+    //
+    TIntermBinary* node = new TIntermBinary(op);
+    if (line == 0)
+        line = left->getLine();
+    node->setLine(line);
+
+    TIntermTyped* child = addConversion(op, left->getType(), right);
+    if (child == 0)
+        return 0;
+
+    node->setLeft(left);
+    node->setRight(child);
+    if (! node->promote(infoSink))
+        return 0;
+
+    return node;
+}
+
+//
+// Connect two nodes through an index operator, where the left node is the base
+// of an array or struct, and the right node is a direct or indirect offset.
+//
+// Returns the added node.
+// The caller should set the type of the returned node.
+//
+TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc line)
+{
+    TIntermBinary* node = new TIntermBinary(op);
+    if (line == 0)
+        line = index->getLine();
+    node->setLine(line);
+    node->setLeft(base);
+    node->setRight(index);
+
+    // caller should set the type
+
+    return node;
+}
+
+//
+// Add one node as the parent of another that it operates on.
+//
+// Returns the added node.
+//
+TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode, TSourceLoc line, TSymbolTable& symbolTable)
+{
+    TIntermUnary* node;
+    TIntermTyped* child = childNode->getAsTyped();
+
+    if (child == 0) {
+        infoSink.info.message(EPrefixInternalError, "Bad type in AddUnaryMath", line);
+        return 0;
+    }
+
+    switch (op) {
+        case EOpLogicalNot:
+            if (child->getType().getBasicType() != EbtBool || child->getType().isMatrix() || child->getType().isArray() || child->getType().isVector()) {
+                return 0;
+            }
+            break;
+
+        case EOpPostIncrement:
+        case EOpPreIncrement:
+        case EOpPostDecrement:
+        case EOpPreDecrement:
+        case EOpNegative:
+            if (child->getType().getBasicType() == EbtStruct || child->getType().isArray())
+                return 0;
+        default: break;
+    }
+
+    //
+    // Do we need to promote the operand?
+    //
+    // Note: Implicit promotions were removed from the language.
+    //
+    TBasicType newType = EbtVoid;
+    switch (op) {
+        case EOpConstructInt:   newType = EbtInt;   break;
+        case EOpConstructBool:  newType = EbtBool;  break;
+        case EOpConstructFloat: newType = EbtFloat; break;
+        default: break;
+    }
+
+    if (newType != EbtVoid) {
+        child = addConversion(op, TType(newType, child->getPrecision(), EvqTemporary,
+            child->getNominalSize(),
+            child->isMatrix(),
+            child->isArray()),
+            child);
+        if (child == 0)
+            return 0;
+    }
+
+    //
+    // For constructors, we are now done, it's all in the conversion.
+    //
+    switch (op) {
+        case EOpConstructInt:
+        case EOpConstructBool:
+        case EOpConstructFloat:
+            return child;
+        default: break;
+    }
+
+    TIntermConstantUnion *childTempConstant = 0;
+    if (child->getAsConstantUnion())
+        childTempConstant = child->getAsConstantUnion();
+
+    //
+    // Make a new node for the operator.
+    //
+    node = new TIntermUnary(op);
+    if (line == 0)
+        line = child->getLine();
+    node->setLine(line);
+    node->setOperand(child);
+
+    if (! node->promote(infoSink))
+        return 0;
+
+    if (childTempConstant)  {
+        TIntermTyped* newChild = childTempConstant->fold(op, 0, infoSink);
+
+        if (newChild)
+            return newChild;
+    }
+
+    return node;
+}
+
+//
+// This is the safe way to change the operator on an aggregate, as it
+// does lots of error checking and fixing.  Especially for establishing
+// a function call's operation on it's set of parameters.  Sequences
+// of instructions are also aggregates, but they just direnctly set
+// their operator to EOpSequence.
+//
+// Returns an aggregate node, which could be the one passed in if
+// it was already an aggregate.
+//
+TIntermAggregate* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, TSourceLoc line)
+{
+    TIntermAggregate* aggNode;
+
+    //
+    // Make sure we have an aggregate.  If not turn it into one.
+    //
+    if (node) {
+        aggNode = node->getAsAggregate();
+        if (aggNode == 0 || aggNode->getOp() != EOpNull) {
+            //
+            // Make an aggregate containing this node.
+            //
+            aggNode = new TIntermAggregate();
+            aggNode->getSequence().push_back(node);
+            if (line == 0)
+                line = node->getLine();
+        }
+    } else
+        aggNode = new TIntermAggregate();
+
+    //
+    // Set the operator.
+    //
+    aggNode->setOperator(op);
+    if (line != 0)
+        aggNode->setLine(line);
+
+    return aggNode;
+}
+
+//
+// Convert one type to another.
+//
+// Returns the node representing the conversion, which could be the same
+// node passed in if no conversion was needed.
+//
+// Return 0 if a conversion can't be done.
+//
+TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TIntermTyped* node)
+{
+    //
+    // Does the base type allow operation?
+    //
+    switch (node->getBasicType()) {
+        case EbtVoid:
+        case EbtSampler2D:
+        case EbtSamplerCube:
+            return 0;
+        default: break;
+    }
+
+    //
+    // Otherwise, if types are identical, no problem
+    //
+    if (type == node->getType())
+        return node;
+
+    //
+    // If one's a structure, then no conversions.
+    //
+    if (type.getStruct() || node->getType().getStruct())
+        return 0;
+
+    //
+    // If one's an array, then no conversions.
+    //
+    if (type.isArray() || node->getType().isArray())
+        return 0;
+
+    TBasicType promoteTo;
+
+    switch (op) {
+        //
+        // Explicit conversions
+        //
+        case EOpConstructBool:
+            promoteTo = EbtBool;
+            break;
+        case EOpConstructFloat:
+            promoteTo = EbtFloat;
+            break;
+        case EOpConstructInt:
+            promoteTo = EbtInt;
+            break;
+        default:
+            //
+            // implicit conversions were removed from the language.
+            //
+            if (type.getBasicType() != node->getType().getBasicType())
+                return 0;
+            //
+            // Size and structure could still differ, but that's
+            // handled by operator promotion.
+            //
+            return node;
+    }
+
+    if (node->getAsConstantUnion()) {
+
+        return (promoteConstantUnion(promoteTo, node->getAsConstantUnion()));
+    } else {
+
+        //
+        // Add a new newNode for the conversion.
+        //
+        TIntermUnary* newNode = 0;
+
+        TOperator newOp = EOpNull;
+        switch (promoteTo) {
+            case EbtFloat:
+                switch (node->getBasicType()) {
+                    case EbtInt:   newOp = EOpConvIntToFloat;  break;
+                    case EbtBool:  newOp = EOpConvBoolToFloat; break;
+                    default:
+                        infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine());
+                        return 0;
+                }
+                break;
+            case EbtBool:
+                switch (node->getBasicType()) {
+                    case EbtInt:   newOp = EOpConvIntToBool;   break;
+                    case EbtFloat: newOp = EOpConvFloatToBool; break;
+                    default:
+                        infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine());
+                        return 0;
+                }
+                break;
+            case EbtInt:
+                switch (node->getBasicType()) {
+                    case EbtBool:   newOp = EOpConvBoolToInt;  break;
+                    case EbtFloat:  newOp = EOpConvFloatToInt; break;
+                    default:
+                        infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine());
+                        return 0;
+                }
+                break;
+            default:
+                infoSink.info.message(EPrefixInternalError, "Bad promotion type", node->getLine());
+                return 0;
+        }
+
+        TType type(promoteTo, node->getPrecision(), EvqTemporary, node->getNominalSize(), node->isMatrix(), node->isArray());
+        newNode = new TIntermUnary(newOp, type);
+        newNode->setLine(node->getLine());
+        newNode->setOperand(node);
+
+        return newNode;
+    }
+}
+
+//
+// Safe way to combine two nodes into an aggregate.  Works with null pointers,
+// a node that's not a aggregate yet, etc.
+//
+// Returns the resulting aggregate, unless 0 was passed in for
+// both existing nodes.
+//
+TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right, TSourceLoc line)
+{
+    if (left == 0 && right == 0)
+        return 0;
+
+    TIntermAggregate* aggNode = 0;
+    if (left)
+        aggNode = left->getAsAggregate();
+    if (!aggNode || aggNode->getOp() != EOpNull) {
+        aggNode = new TIntermAggregate;
+        if (left)
+            aggNode->getSequence().push_back(left);
+    }
+
+    if (right)
+        aggNode->getSequence().push_back(right);
+
+    if (line != 0)
+        aggNode->setLine(line);
+
+    return aggNode;
+}
+
+//
+// Turn an existing node into an aggregate.
+//
+// Returns an aggregate, unless 0 was passed in for the existing node.
+//
+TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, TSourceLoc line)
+{
+    if (node == 0)
+        return 0;
+
+    TIntermAggregate* aggNode = new TIntermAggregate;
+    aggNode->getSequence().push_back(node);
+
+    if (line != 0)
+        aggNode->setLine(line);
+    else
+        aggNode->setLine(node->getLine());
+
+    return aggNode;
+}
+
+//
+// For "if" test nodes.  There are three children; a condition,
+// a true path, and a false path.  The two paths are in the
+// nodePair.
+//
+// Returns the selection node created.
+//
+TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, TSourceLoc line)
+{
+    //
+    // For compile time constant selections, prune the code and
+    // test now.
+    //
+
+    if (cond->getAsTyped() && cond->getAsTyped()->getAsConstantUnion()) {
+        if (cond->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->getBConst())
+            return nodePair.node1;
+        else
+            return nodePair.node2;
+    }
+
+    TIntermSelection* node = new TIntermSelection(cond, nodePair.node1, nodePair.node2);
+    node->setLine(line);
+
+    return node;
+}
+
+
+TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc line)
+{
+    if (left->getType().getQualifier() == EvqConst && right->getType().getQualifier() == EvqConst) {
+        return right;
+    } else {
+        TIntermTyped *commaAggregate = growAggregate(left, right, line);
+        commaAggregate->getAsAggregate()->setOperator(EOpComma);
+        commaAggregate->setType(right->getType());
+        commaAggregate->getTypePointer()->changeQualifier(EvqTemporary);
+        return commaAggregate;
+    }
+}
+
+//
+// For "?:" test nodes.  There are three children; a condition,
+// a true path, and a false path.  The two paths are specified
+// as separate parameters.
+//
+// Returns the selection node created, or 0 if one could not be.
+//
+TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc line)
+{
+    //
+    // Get compatible types.
+    //
+    TIntermTyped* child = addConversion(EOpSequence, trueBlock->getType(), falseBlock);
+    if (child)
+        falseBlock = child;
+    else {
+        child = addConversion(EOpSequence, falseBlock->getType(), trueBlock);
+        if (child)
+            trueBlock = child;
+        else
+            return 0;
+    }
+
+    //
+    // See if all the operands are constant, then fold it otherwise not.
+    //
+
+    if (cond->getAsConstantUnion() && trueBlock->getAsConstantUnion() && falseBlock->getAsConstantUnion()) {
+        if (cond->getAsConstantUnion()->getUnionArrayPointer()->getBConst())
+            return trueBlock;
+        else
+            return falseBlock;
+    }
+
+    //
+    // Make a selection node.
+    //
+    TIntermSelection* node = new TIntermSelection(cond, trueBlock, falseBlock, trueBlock->getType());
+    node->setLine(line);
+
+    return node;
+}
+
+//
+// Constant terminal nodes.  Has a union that contains bool, float or int constants
+//
+// Returns the constant union node created.
+//
+
+TIntermConstantUnion* TIntermediate::addConstantUnion(ConstantUnion* unionArrayPointer, const TType& t, TSourceLoc line)
+{
+    TIntermConstantUnion* node = new TIntermConstantUnion(unionArrayPointer, t);
+    node->setLine(line);
+
+    return node;
+}
+
+TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, TSourceLoc line)
+{
+
+    TIntermAggregate* node = new TIntermAggregate(EOpSequence);
+
+    node->setLine(line);
+    TIntermConstantUnion* constIntNode;
+    TIntermSequence &sequenceVector = node->getSequence();
+    ConstantUnion* unionArray;
+
+    for (int i = 0; i < fields.num; i++) {
+        unionArray = new ConstantUnion[1];
+        unionArray->setIConst(fields.offsets[i]);
+        constIntNode = addConstantUnion(unionArray, TType(EbtInt, EbpUndefined, EvqConst), line);
+        sequenceVector.push_back(constIntNode);
+    }
+
+    return node;
+}
+
+//
+// Create loop nodes.
+//
+TIntermNode* TIntermediate::addLoop(TIntermNode *init, TIntermNode* body, TIntermTyped* test, TIntermTyped* terminal, bool testFirst, TSourceLoc line)
+{
+    TIntermNode* node = new TIntermLoop(init, body, test, terminal, testFirst);
+    node->setLine(line);
+
+    return node;
+}
+
+//
+// Add branches.
+//
+TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TSourceLoc line)
+{
+    return addBranch(branchOp, 0, line);
+}
+
+TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TIntermTyped* expression, TSourceLoc line)
+{
+    TIntermBranch* node = new TIntermBranch(branchOp, expression);
+    node->setLine(line);
+
+    return node;
+}
+
+//
+// This is to be executed once the final root is put on top by the parsing
+// process.
+//
+bool TIntermediate::postProcess(TIntermNode* root, EShLanguage language)
+{
+    if (root == 0)
+        return true;
+
+    //
+    // First, finish off the top level sequence, if any
+    //
+    TIntermAggregate* aggRoot = root->getAsAggregate();
+    if (aggRoot && aggRoot->getOp() == EOpNull)
+        aggRoot->setOperator(EOpSequence);
+
+    return true;
+}
+
+//
+// This deletes the tree.
+//
+void TIntermediate::remove(TIntermNode* root)
+{
+    if (root)
+        RemoveAllTreeNodes(root);
+}
+
+////////////////////////////////////////////////////////////////
+//
+// Member functions of the nodes used for building the tree.
+//
+////////////////////////////////////////////////////////////////
+
+//
+// Say whether or not an operation node changes the value of a variable.
+//
+// Returns true if state is modified.
+//
+bool TIntermOperator::modifiesState() const
+{
+    switch (op) {
+        case EOpPostIncrement:
+        case EOpPostDecrement:
+        case EOpPreIncrement:
+        case EOpPreDecrement:
+        case EOpAssign:
+        case EOpAddAssign:
+        case EOpSubAssign:
+        case EOpMulAssign:
+        case EOpVectorTimesMatrixAssign:
+        case EOpVectorTimesScalarAssign:
+        case EOpMatrixTimesScalarAssign:
+        case EOpMatrixTimesMatrixAssign:
+        case EOpDivAssign:
+            return true;
+        default:
+            return false;
+    }
+}
+
+//
+// returns true if the operator is for one of the constructors
+//
+bool TIntermOperator::isConstructor() const
+{
+    switch (op) {
+        case EOpConstructVec2:
+        case EOpConstructVec3:
+        case EOpConstructVec4:
+        case EOpConstructMat2:
+        case EOpConstructMat3:
+        case EOpConstructMat4:
+        case EOpConstructFloat:
+        case EOpConstructIVec2:
+        case EOpConstructIVec3:
+        case EOpConstructIVec4:
+        case EOpConstructInt:
+        case EOpConstructBVec2:
+        case EOpConstructBVec3:
+        case EOpConstructBVec4:
+        case EOpConstructBool:
+        case EOpConstructStruct:
+            return true;
+        default:
+            return false;
+    }
+}
+//
+// Make sure the type of a unary operator is appropriate for its
+// combination of operation and operand type.
+//
+// Returns false in nothing makes sense.
+//
+bool TIntermUnary::promote(TInfoSink&)
+{
+    switch (op) {
+        case EOpLogicalNot:
+            if (operand->getBasicType() != EbtBool)
+                return false;
+            break;
+        case EOpNegative:
+        case EOpPostIncrement:
+        case EOpPostDecrement:
+        case EOpPreIncrement:
+        case EOpPreDecrement:
+            if (operand->getBasicType() == EbtBool)
+                return false;
+            break;
+
+            // operators for built-ins are already type checked against their prototype
+        case EOpAny:
+        case EOpAll:
+        case EOpVectorLogicalNot:
+            return true;
+
+        default:
+            if (operand->getBasicType() != EbtFloat)
+                return false;
+    }
+
+    setType(operand->getType());
+
+    return true;
+}
+
+//
+// Establishes the type of the resultant operation, as well as
+// makes the operator the correct one for the operands.
+//
+// Returns false if operator can't work on operands.
+//
+bool TIntermBinary::promote(TInfoSink& infoSink)
+{
+    int size = left->getNominalSize();
+    if (right->getNominalSize() > size)
+        size = right->getNominalSize();
+
+    TBasicType type = left->getBasicType();
+
+    //
+    // Arrays have to be exact matches.
+    //
+    if ((left->isArray() || right->isArray()) && (left->getType() != right->getType()))
+        return false;
+
+    //
+    // Base assumption:  just make the type the same as the left
+    // operand.  Then only deviations from this need be coded.
+    //
+    setType(left->getType());
+
+    TPrecision highestPrecision = GetHighestPrecision(left->getPrecision(), right->getPrecision());
+    getTypePointer()->changePrecision(highestPrecision);
+
+    //
+    // Array operations.
+    //
+    if (left->isArray()) {
+
+        switch (op) {
+
+            //
+            // Promote to conditional
+            //
+            case EOpEqual:
+            case EOpNotEqual:
+                setType(TType(EbtBool, EbpUndefined));
+                break;
+
+            //
+            // Set array information.
+            //
+            case EOpAssign:
+            case EOpInitialize:
+                getTypePointer()->setArraySize(left->getType().getArraySize());
+                getTypePointer()->setArrayInformationType(left->getType().getArrayInformationType());
+                break;
+
+            default:
+                return false;
+        }
+
+        return true;
+    }
+
+    //
+    // All scalars.  Code after this test assumes this case is removed!
+    //
+    if (size == 1) {
+
+        switch (op) {
+
+            //
+            // Promote to conditional
+            //
+            case EOpEqual:
+            case EOpNotEqual:
+            case EOpLessThan:
+            case EOpGreaterThan:
+            case EOpLessThanEqual:
+            case EOpGreaterThanEqual:
+                setType(TType(EbtBool, EbpUndefined));
+                break;
+
+            //
+            // And and Or operate on conditionals
+            //
+            case EOpLogicalAnd:
+            case EOpLogicalOr:
+                if (left->getBasicType() != EbtBool || right->getBasicType() != EbtBool)
+                    return false;
+                setType(TType(EbtBool, EbpUndefined));
+                break;
+
+            //
+            // Everything else should have matching types
+            //
+            default:
+                if (left->getBasicType() != right->getBasicType() ||
+                    left->isMatrix()     != right->isMatrix())
+                    return false;
+        }
+
+        return true;
+    }
+
+    //
+    // Are the sizes compatible?
+    //
+    if ( left->getNominalSize() != size &&  left->getNominalSize() != 1 ||
+        right->getNominalSize() != size && right->getNominalSize() != 1)
+        return false;
+
+    //
+    // Can these two operands be combined?
+    //
+    switch (op) {
+        case EOpMul:
+            if (!left->isMatrix() && right->isMatrix()) {
+                if (left->isVector())
+                    op = EOpVectorTimesMatrix;
+                else {
+                    op = EOpMatrixTimesScalar;
+                    setType(TType(type, highestPrecision, EvqTemporary, size, true));
+                }
+            } else if (left->isMatrix() && !right->isMatrix()) {
+                if (right->isVector()) {
+                    op = EOpMatrixTimesVector;
+                    setType(TType(type, highestPrecision, EvqTemporary, size, false));
+                } else {
+                    op = EOpMatrixTimesScalar;
+                }
+            } else if (left->isMatrix() && right->isMatrix()) {
+                op = EOpMatrixTimesMatrix;
+            } else if (!left->isMatrix() && !right->isMatrix()) {
+                if (left->isVector() && right->isVector()) {
+                    // leave as component product
+                } else if (left->isVector() || right->isVector()) {
+                    op = EOpVectorTimesScalar;
+                    setType(TType(type, highestPrecision, EvqTemporary, size, false));
+                }
+            } else {
+                infoSink.info.message(EPrefixInternalError, "Missing elses", getLine());
+                return false;
+            }
+            break;
+        case EOpMulAssign:
+            if (!left->isMatrix() && right->isMatrix()) {
+                if (left->isVector())
+                    op = EOpVectorTimesMatrixAssign;
+                else {
+                    return false;
+                }
+            } else if (left->isMatrix() && !right->isMatrix()) {
+                if (right->isVector()) {
+                    return false;
+                } else {
+                    op = EOpMatrixTimesScalarAssign;
+                }
+            } else if (left->isMatrix() && right->isMatrix()) {
+                op = EOpMatrixTimesMatrixAssign;
+            } else if (!left->isMatrix() && !right->isMatrix()) {
+                if (left->isVector() && right->isVector()) {
+                    // leave as component product
+                } else if (left->isVector() || right->isVector()) {
+                    if (! left->isVector())
+                        return false;
+                    op = EOpVectorTimesScalarAssign;
+                    setType(TType(type, highestPrecision, EvqTemporary, size, false));
+                }
+            } else {
+                infoSink.info.message(EPrefixInternalError, "Missing elses", getLine());
+                return false;
+            }
+            break;
+        case EOpAssign:
+        case EOpInitialize:
+            if (left->getNominalSize() != right->getNominalSize())
+                return false;
+            // fall through
+        case EOpAdd:
+        case EOpSub:
+        case EOpDiv:
+        case EOpAddAssign:
+        case EOpSubAssign:
+        case EOpDivAssign:
+            if (left->isMatrix() && right->isVector() ||
+                left->isVector() && right->isMatrix() ||
+                left->getBasicType() != right->getBasicType())
+                return false;
+            setType(TType(type, highestPrecision, EvqTemporary, size, left->isMatrix() || right->isMatrix()));
+            break;
+
+        case EOpEqual:
+        case EOpNotEqual:
+        case EOpLessThan:
+        case EOpGreaterThan:
+        case EOpLessThanEqual:
+        case EOpGreaterThanEqual:
+            if (left->isMatrix() && right->isVector() ||
+                left->isVector() && right->isMatrix() ||
+                left->getBasicType() != right->getBasicType())
+                return false;
+            setType(TType(EbtBool, EbpUndefined));
+            break;
+
+        default:
+            return false;
+    }
+
+    //
+    // One more check for assignment.  The Resulting type has to match the left operand.
+    //
+    switch (op) {
+        case EOpAssign:
+        case EOpInitialize:
+        case EOpAddAssign:
+        case EOpSubAssign:
+        case EOpMulAssign:
+        case EOpDivAssign:
+            if (getType() != left->getType())
+                return false;
+            break;
+        default:
+            break;
+    }
+
+    return true;
+}
+
+bool CompareStruct(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray)
+{
+    TTypeList* fields = leftNodeType.getStruct();
+
+    size_t structSize = fields->size();
+    int index = 0;
+
+    for (size_t j = 0; j < structSize; j++) {
+        int size = (*fields)[j].type->getObjectSize();
+        for (int i = 0; i < size; i++) {
+            if ((*fields)[j].type->getBasicType() == EbtStruct) {
+                if (!CompareStructure(*(*fields)[j].type, &rightUnionArray[index], &leftUnionArray[index]))
+                    return false;
+            } else {
+                if (leftUnionArray[index] != rightUnionArray[index])
+                    return false;
+                index++;
+            }
+
+        }
+    }
+    return true;
+}
+
+bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray)
+{
+    if (leftNodeType.isArray()) {
+        TType typeWithoutArrayness = leftNodeType;
+        typeWithoutArrayness.clearArrayness();
+
+        int arraySize = leftNodeType.getArraySize();
+
+        for (int i = 0; i < arraySize; ++i) {
+            int offset = typeWithoutArrayness.getObjectSize() * i;
+            if (!CompareStruct(typeWithoutArrayness, &rightUnionArray[offset], &leftUnionArray[offset]))
+                return false;
+        }
+    } else
+        return CompareStruct(leftNodeType, rightUnionArray, leftUnionArray);
+
+    return true;
+}
+
+//
+// The fold functions see if an operation on a constant can be done in place,
+// without generating run-time code.
+//
+// Returns the node to keep using, which may or may not be the node passed in.
+//
+
+TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNode, TInfoSink& infoSink)
+{
+    ConstantUnion *unionArray = getUnionArrayPointer();
+    int objectSize = getType().getObjectSize();
+
+    if (constantNode) {  // binary operations
+        TIntermConstantUnion *node = constantNode->getAsConstantUnion();
+        ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
+        TType returnType = getType();
+
+        // for a case like float f = 1.2 + vec4(2,3,4,5);
+        if (constantNode->getType().getObjectSize() == 1 && objectSize > 1) {
+            rightUnionArray = new ConstantUnion[objectSize];
+