summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Antoine LaFayette <plafayet@codeaurora.org>2012-05-24 17:40:13 (GMT)
committerPierre-Antoine LaFayette <plafayet@codeaurora.org>2012-05-24 17:40:13 (GMT)
commitae2392db6360b41a5717f3770a9e63b1bcea45d6 (patch)
tree1194a43fdb84c10858224826feb8621fad94cba0
parent53340685236f076aeaae3d686d679a21df945781 (diff)
Update ANGLE to r1009 to fix WebGL 1.0.1 conformance test
Fixes struct-nesting-exceeds-maximum Khronos WebGL conformance test. Change-Id: I56c9e2c14cf7d8653932c0b52405f54e35e1bcb5
-rw-r--r--Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj68
-rw-r--r--Source/ThirdParty/ANGLE/Android.mk9
-rw-r--r--Source/ThirdParty/ANGLE/ChangeLog1725
-rw-r--r--Source/ThirdParty/ANGLE/Configurations/Base.xcconfig66
-rw-r--r--Source/ThirdParty/ANGLE/Configurations/CompilerVersion.xcconfig84
-rw-r--r--Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig9
-rw-r--r--Source/ThirdParty/ANGLE/include/EGL/eglext.h142
-rw-r--r--Source/ThirdParty/ANGLE/include/EGL/eglplatform.h23
-rw-r--r--Source/ThirdParty/ANGLE/include/GLES2/gl2ext.h787
-rw-r--r--Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h119
-rw-r--r--Source/ThirdParty/ANGLE/src/build_angle.xcodeproj/project.pbxproj450
-rw-r--r--Source/ThirdParty/ANGLE/src/common/RefCountObject.cpp47
-rw-r--r--Source/ThirdParty/ANGLE/src/common/RefCountObject.h65
-rw-r--r--Source/ThirdParty/ANGLE/src/common/debug.cpp147
-rw-r--r--Source/ThirdParty/ANGLE/src/common/debug.h78
-rw-r--r--Source/ThirdParty/ANGLE/src/common/version.h10
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/BaseTypes.h5
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/BuiltInFunctionEmulator.cpp437
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/BuiltInFunctionEmulator.h103
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp13
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/CodeGenHLSL.cpp10
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/Compiler.cpp97
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ConstantUnion.h68
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.cpp125
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.h60
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ExtensionBehavior.h19
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.cpp215
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.h48
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/Initialize.cpp54
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp10
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.cpp120
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.h60
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/OutputESSL.cpp22
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/OutputESSL.h22
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.cpp679
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.h36
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.cpp720
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.h54
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.cpp421
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.h23
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ParseHelper.cpp76
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ParseHelper.h61
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp11
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.h20
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ShHandle.h23
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp69
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp20
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/SymbolTable.h6
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/TranslatorESSL.cpp40
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/TranslatorESSL.h23
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/TranslatorGLSL.cpp4
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/Types.h26
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.cpp47
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.h3
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.cpp93
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.h5
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/VariableInfo.cpp24
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/VariableInfo.h9
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.cpp35
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.h6
-rwxr-xr-xSource/ThirdParty/ANGLE/src/compiler/generate_parser.sh27
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/glslang.l20
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/glslang.y185
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/glslang_lex.cpp744
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/glslang_tab.cpp1503
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/glslang_tab.h210
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/intermOut.cpp2
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/intermediate.h43
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/osinclude.h3
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/atom.c5
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/compile.h3
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/cpp.c109
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/cppstruct.c12
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/length_limits.h21
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/memory.c4
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Context.cpp139
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Context.h60
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Input.cpp165
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Input.h74
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Macro.cpp45
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Macro.h51
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Preprocessor.cpp53
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Preprocessor.h42
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Token.cpp55
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/Token.h48
-rwxr-xr-xSource/ThirdParty/ANGLE/src/compiler/preprocessor/new/generate_parser.sh27
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/pp.l181
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/pp.y225
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/pp_lex.cpp2268
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/pp_tab.cpp2072
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/pp_tab.h119
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/stl_utils.h29
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/new/token_type.h13
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/scanner.c15
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/scanner.h6
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/symbols.c4
-rw-r--r--Source/ThirdParty/ANGLE/src/compiler/preprocessor/tokens.c5
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/Config.cpp41
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/Config.h6
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/Display.cpp721
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/Display.h59
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/Surface.cpp596
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/Surface.h48
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/libEGL.cpp453
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/libEGL.rc102
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/libEGL.vcproj195
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/main.cpp20
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/main.h1
-rw-r--r--Source/ThirdParty/ANGLE/src/libEGL/resource.h14
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Blit.cpp57
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Blit.h4
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Buffer.cpp65
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Buffer.h14
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Context.cpp1926
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Context.h217
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Fence.cpp26
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Fence.h8
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Framebuffer.cpp108
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Framebuffer.h11
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/HandleAllocator.cpp63
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/HandleAllocator.h45
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/IndexDataManager.cpp473
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/IndexDataManager.h149
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp1427
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Program.h95
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Query.cpp128
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Query.h48
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Renderbuffer.cpp440
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Renderbuffer.h176
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/ResourceManager.cpp46
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/ResourceManager.h34
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Shader.cpp177
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h45
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Texture.cpp2963
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/Texture.h452
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/VertexDataManager.cpp782
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/VertexDataManager.h169
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.cpp1828
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.def19
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.rc102
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.vcproj258
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/main.cpp43
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/main.h3
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/mathutil.h55
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/resource.h14
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/utilities.cpp398
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/utilities.h47
-rw-r--r--Source/ThirdParty/ANGLE/src/libGLESv2/vertexconversion.h208
-rw-r--r--Source/WebCore/platform/graphics/ANGLEWebKitBridge.cpp12
149 files changed, 24633 insertions, 7196 deletions
diff --git a/Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj b/Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
index aa91bdb..a33c5ce 100644
--- a/Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
+++ b/Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
@@ -3,10 +3,15 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 42;
+ objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
+ 49951C0314B7AAB30060E96E /* length_limits.h in Headers */ = {isa = PBXBuildFile; fileRef = 49951C0214B7AAB30060E96E /* length_limits.h */; };
+ 49951C0914B7AAD80060E96E /* BuiltInFunctionEmulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49951C0514B7AAD70060E96E /* BuiltInFunctionEmulator.cpp */; };
+ 49951C0A14B7AAD80060E96E /* BuiltInFunctionEmulator.h in Headers */ = {isa = PBXBuildFile; fileRef = 49951C0614B7AAD80060E96E /* BuiltInFunctionEmulator.h */; };
+ 49951C0B14B7AAD80060E96E /* DetectRecursion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49951C0714B7AAD80060E96E /* DetectRecursion.cpp */; };
+ 49951C0C14B7AAD80060E96E /* DetectRecursion.h in Headers */ = {isa = PBXBuildFile; fileRef = 49951C0814B7AAD80060E96E /* DetectRecursion.h */; };
90D9B10212E11DCB002D4255 /* Compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90D9B0F912E11DCB002D4255 /* Compiler.cpp */; };
90D9B10312E11DCB002D4255 /* ExtensionBehavior.h in Headers */ = {isa = PBXBuildFile; fileRef = 90D9B0FA12E11DCB002D4255 /* ExtensionBehavior.h */; };
90D9B10412E11DCB002D4255 /* glslang_lex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90D9B0FB12E11DCB002D4255 /* glslang_lex.cpp */; };
@@ -23,6 +28,16 @@
90D9B11812E11DD6002D4255 /* VariableInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 90D9B11012E11DD6002D4255 /* VariableInfo.h */; };
90D9B11912E11DD6002D4255 /* VersionGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90D9B11112E11DD6002D4255 /* VersionGLSL.cpp */; };
90D9B11A12E11DD6002D4255 /* VersionGLSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 90D9B11212E11DD6002D4255 /* VersionGLSL.h */; };
+ A0AABE2C13AFE81000F2EBD1 /* ForLoopUnroll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0AABE2A13AFE81000F2EBD1 /* ForLoopUnroll.cpp */; };
+ A0AABE2D13AFE81000F2EBD1 /* ForLoopUnroll.h in Headers */ = {isa = PBXBuildFile; fileRef = A0AABE2B13AFE81000F2EBD1 /* ForLoopUnroll.h */; };
+ A0AABE3013AFE83000F2EBD1 /* MapLongVariableNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0AABE2E13AFE83000F2EBD1 /* MapLongVariableNames.cpp */; };
+ A0AABE3113AFE83000F2EBD1 /* MapLongVariableNames.h in Headers */ = {isa = PBXBuildFile; fileRef = A0AABE2F13AFE83000F2EBD1 /* MapLongVariableNames.h */; };
+ A0AABE3413AFE84700F2EBD1 /* OutputGLSLBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0AABE3213AFE84700F2EBD1 /* OutputGLSLBase.cpp */; };
+ A0AABE3513AFE84700F2EBD1 /* OutputGLSLBase.h in Headers */ = {isa = PBXBuildFile; fileRef = A0AABE3313AFE84700F2EBD1 /* OutputGLSLBase.h */; };
+ A0AABE4413AFE94500F2EBD1 /* OutputESSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0AABE4213AFE94500F2EBD1 /* OutputESSL.cpp */; };
+ A0AABE4513AFE94500F2EBD1 /* OutputESSL.h in Headers */ = {isa = PBXBuildFile; fileRef = A0AABE4313AFE94500F2EBD1 /* OutputESSL.h */; };
+ A0AABE4813AFE96100F2EBD1 /* TranslatorESSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A0AABE4613AFE96100F2EBD1 /* TranslatorESSL.cpp */; };
+ A0AABE4913AFE96100F2EBD1 /* TranslatorESSL.h in Headers */ = {isa = PBXBuildFile; fileRef = A0AABE4713AFE96100F2EBD1 /* TranslatorESSL.h */; };
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 */; };
@@ -53,6 +68,11 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 49951C0214B7AAB30060E96E /* length_limits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = length_limits.h; sourceTree = "<group>"; };
+ 49951C0514B7AAD70060E96E /* BuiltInFunctionEmulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltInFunctionEmulator.cpp; sourceTree = "<group>"; };
+ 49951C0614B7AAD80060E96E /* BuiltInFunctionEmulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInFunctionEmulator.h; sourceTree = "<group>"; };
+ 49951C0714B7AAD80060E96E /* DetectRecursion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetectRecursion.cpp; sourceTree = "<group>"; };
+ 49951C0814B7AAD80060E96E /* DetectRecursion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetectRecursion.h; sourceTree = "<group>"; };
5D7C59C51208C68B001C873E /* ANGLE.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ANGLE.xcconfig; sourceTree = "<group>"; };
5D7C59C61208C68B001C873E /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
@@ -73,6 +93,16 @@
90D9B11012E11DD6002D4255 /* VariableInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VariableInfo.h; sourceTree = "<group>"; };
90D9B11112E11DD6002D4255 /* VersionGLSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VersionGLSL.cpp; sourceTree = "<group>"; };
90D9B11212E11DD6002D4255 /* VersionGLSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VersionGLSL.h; sourceTree = "<group>"; };
+ A0AABE2A13AFE81000F2EBD1 /* ForLoopUnroll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ForLoopUnroll.cpp; sourceTree = "<group>"; };
+ A0AABE2B13AFE81000F2EBD1 /* ForLoopUnroll.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForLoopUnroll.h; sourceTree = "<group>"; };
+ A0AABE2E13AFE83000F2EBD1 /* MapLongVariableNames.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MapLongVariableNames.cpp; sourceTree = "<group>"; };
+ A0AABE2F13AFE83000F2EBD1 /* MapLongVariableNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapLongVariableNames.h; sourceTree = "<group>"; };
+ A0AABE3213AFE84700F2EBD1 /* OutputGLSLBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OutputGLSLBase.cpp; sourceTree = "<group>"; };
+ A0AABE3313AFE84700F2EBD1 /* OutputGLSLBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputGLSLBase.h; sourceTree = "<group>"; };
+ A0AABE4213AFE94500F2EBD1 /* OutputESSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = OutputESSL.cpp; sourceTree = "<group>"; };
+ A0AABE4313AFE94500F2EBD1 /* OutputESSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OutputESSL.h; sourceTree = "<group>"; };
+ A0AABE4613AFE96100F2EBD1 /* TranslatorESSL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorESSL.cpp; sourceTree = "<group>"; };
+ A0AABE4713AFE96100F2EBD1 /* TranslatorESSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TranslatorESSL.h; sourceTree = "<group>"; };
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>"; };
@@ -340,14 +370,28 @@
FB39D2201200F35A00088E69 /* compiler */ = {
isa = PBXGroup;
children = (
+ A0AABE3213AFE84700F2EBD1 /* OutputGLSLBase.cpp */,
+ A0AABE3313AFE84700F2EBD1 /* OutputGLSLBase.h */,
+ A0AABE4613AFE96100F2EBD1 /* TranslatorESSL.cpp */,
+ A0AABE4713AFE96100F2EBD1 /* TranslatorESSL.h */,
+ A0AABE4213AFE94500F2EBD1 /* OutputESSL.cpp */,
+ A0AABE4313AFE94500F2EBD1 /* OutputESSL.h */,
+ A0AABE2E13AFE83000F2EBD1 /* MapLongVariableNames.cpp */,
+ A0AABE2F13AFE83000F2EBD1 /* MapLongVariableNames.h */,
+ A0AABE2A13AFE81000F2EBD1 /* ForLoopUnroll.cpp */,
+ A0AABE2B13AFE81000F2EBD1 /* ForLoopUnroll.h */,
FB39D2441200F35A00088E69 /* preprocessor */,
FB39D2211200F35A00088E69 /* BaseTypes.h */,
+ 49951C0514B7AAD70060E96E /* BuiltInFunctionEmulator.cpp */,
+ 49951C0614B7AAD80060E96E /* BuiltInFunctionEmulator.h */,
FB39D2221200F35A00088E69 /* CodeGenGLSL.cpp */,
FB39D2241200F35A00088E69 /* Common.h */,
90D9B0F912E11DCB002D4255 /* Compiler.cpp */,
FB39D2251200F35A00088E69 /* ConstantUnion.h */,
FB39D2261200F35A00088E69 /* debug.cpp */,
FB39D2271200F35A00088E69 /* debug.h */,
+ 49951C0714B7AAD80060E96E /* DetectRecursion.cpp */,
+ 49951C0814B7AAD80060E96E /* DetectRecursion.h */,
90D9B0FA12E11DCB002D4255 /* ExtensionBehavior.h */,
90D9B0FB12E11DCB002D4255 /* glslang_lex.cpp */,
90D9B0FC12E11DCB002D4255 /* glslang_tab.cpp */,
@@ -415,6 +459,7 @@
FB39D2481200F35A00088E69 /* cpp.c */,
FB39D2491200F35A00088E69 /* cpp.h */,
FB39D24A1200F35A00088E69 /* cppstruct.c */,
+ 49951C0214B7AAB30060E96E /* length_limits.h */,
FB39D24B1200F35A00088E69 /* memory.c */,
FB39D24C1200F35A00088E69 /* memory.h */,
FB39D24D1200F35A00088E69 /* parser.h */,
@@ -455,6 +500,14 @@
90D9B11612E11DD6002D4255 /* ValidateLimitations.h in Headers */,
90D9B11812E11DD6002D4255 /* VariableInfo.h in Headers */,
90D9B11A12E11DD6002D4255 /* VersionGLSL.h in Headers */,
+ A0AABE2D13AFE81000F2EBD1 /* ForLoopUnroll.h in Headers */,
+ A0AABE3113AFE83000F2EBD1 /* MapLongVariableNames.h in Headers */,
+ A0AABE3513AFE84700F2EBD1 /* OutputGLSLBase.h in Headers */,
+ A0AABE4513AFE94500F2EBD1 /* OutputESSL.h in Headers */,
+ A0AABE4913AFE96100F2EBD1 /* TranslatorESSL.h in Headers */,
+ 49951C0314B7AAB30060E96E /* length_limits.h in Headers */,
+ 49951C0A14B7AAD80060E96E /* BuiltInFunctionEmulator.h in Headers */,
+ 49951C0C14B7AAD80060E96E /* DetectRecursion.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -483,8 +536,12 @@
/* Begin PBXProject section */
FB39D0701200ED9200088E69 /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0440;
+ };
buildConfigurationList = FB39D0731200ED9200088E69 /* Build configuration list for PBXProject "ANGLE" */;
- compatibilityVersion = "Xcode 2.4";
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
@@ -540,6 +597,13 @@
90D9B11512E11DD6002D4255 /* ValidateLimitations.cpp in Sources */,
90D9B11712E11DD6002D4255 /* VariableInfo.cpp in Sources */,
90D9B11912E11DD6002D4255 /* VersionGLSL.cpp in Sources */,
+ A0AABE2C13AFE81000F2EBD1 /* ForLoopUnroll.cpp in Sources */,
+ A0AABE3013AFE83000F2EBD1 /* MapLongVariableNames.cpp in Sources */,
+ A0AABE3413AFE84700F2EBD1 /* OutputGLSLBase.cpp in Sources */,
+ A0AABE4413AFE94500F2EBD1 /* OutputESSL.cpp in Sources */,
+ A0AABE4813AFE96100F2EBD1 /* TranslatorESSL.cpp in Sources */,
+ 49951C0914B7AAD80060E96E /* BuiltInFunctionEmulator.cpp in Sources */,
+ 49951C0B14B7AAD80060E96E /* DetectRecursion.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
diff --git a/Source/ThirdParty/ANGLE/Android.mk b/Source/ThirdParty/ANGLE/Android.mk
index 8469f68..e4b348b 100644
--- a/Source/ThirdParty/ANGLE/Android.mk
+++ b/Source/ThirdParty/ANGLE/Android.mk
@@ -27,12 +27,16 @@
# Compiler src
LOCAL_SRC_FILES := \
+ BuiltInFunctionEmulator.cpp \
Compiler.cpp \
+ DetectRecursion.cpp \
+ ForLoopUnroll.cpp \
InfoSink.cpp \
Initialize.cpp \
InitializeDll.cpp \
IntermTraverse.cpp \
Intermediate.cpp \
+ MapLongVariableNames.cpp \
ParseHelper.cpp \
PoolAlloc.cpp \
QualifierAlive.cpp \
@@ -50,9 +54,12 @@ LOCAL_SRC_FILES := \
# Code generator
LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
CodeGenGLSL.cpp \
+ OutputESSL.cpp \
OutputGLSL.cpp \
+ OutputGLSLBase.cpp \
+ TranslatorESSL.cpp \
TranslatorGLSL.cpp \
- VersionGLSL.cpp
+ VersionGLSL.cpp \
# Generated files
LOCAL_SRC_FILES := $(LOCAL_SRC_FILES) \
diff --git a/Source/ThirdParty/ANGLE/ChangeLog b/Source/ThirdParty/ANGLE/ChangeLog
index 374c349..5029207 100644
--- a/Source/ThirdParty/ANGLE/ChangeLog
+++ b/Source/ThirdParty/ANGLE/ChangeLog
@@ -1,3 +1,1728 @@
+2012-03-26 Dean Jackson <dino@apple.com>
+
+ Update ANGLE in WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=81717
+
+ Reviewed by Kenneth Russell.
+
+ Update angleproject to r1009. Synced the source directory
+ between the angle repository and WebKit. Ran the OS X Lion
+ version of Bison over the glslang.l input which generates
+ a slightly different output than angle provided.
+
+ * include/EGL/eglext.h:
+ * include/GLES2/gl2ext.h:
+ * include/GLSLANG/ShaderLang.h:
+ * src/common/RefCountObject.cpp: Renamed from Source/ThirdParty/ANGLE/src/libGLESv2/RefCountObject.cpp.
+ (RefCountObject::RefCountObject):
+ (RefCountObject::~RefCountObject):
+ (RefCountObject::addRef):
+ (RefCountObject::release):
+ (RefCountObjectBindingPointer::set):
+ * src/common/RefCountObject.h: Renamed from Source/ThirdParty/ANGLE/src/libGLESv2/RefCountObject.h.
+ (RefCountObject):
+ (RefCountObject::id):
+ (RefCountObjectBindingPointer):
+ (RefCountObjectBindingPointer::RefCountObjectBindingPointer):
+ (RefCountObjectBindingPointer::~RefCountObjectBindingPointer):
+ (RefCountObjectBindingPointer::get):
+ (RefCountObjectBindingPointer::id):
+ (RefCountObjectBindingPointer::operator ! ):
+ (BindingPointer):
+ (BindingPointer::set):
+ (BindingPointer::get):
+ (BindingPointer::operator -> ):
+ * src/common/debug.cpp:
+ (gl::output):
+ * src/common/version.h:
+ * src/compiler/BaseTypes.h:
+ * src/compiler/Compiler.cpp:
+ (TCompiler::TCompiler):
+ (TCompiler::~TCompiler):
+ (TCompiler::mapLongVariableNames):
+ * src/compiler/ConstantUnion.h:
+ (ConstantUnion::ConstantUnion):
+ (ConstantUnion::operator==):
+ (ConstantUnion::operator>):
+ (ConstantUnion::operator<):
+ * src/compiler/Intermediate.cpp:
+ (TIntermConstantUnion::fold):
+ * src/compiler/MapLongVariableNames.cpp:
+ (LongNameMap::LongNameMap):
+ (LongNameMap::~LongNameMap):
+ (LongNameMap::GetInstance):
+ (LongNameMap::Release):
+ (LongNameMap::Find):
+ (LongNameMap::Insert):
+ (LongNameMap::Size):
+ (MapLongVariableNames::MapLongVariableNames):
+ (MapLongVariableNames::visitSymbol):
+ (MapLongVariableNames::mapGlobalLongName):
+ * src/compiler/MapLongVariableNames.h:
+ (LongNameMap):
+ (MapLongVariableNames):
+ * src/compiler/OutputHLSL.cpp:
+ (sh::OutputHLSL::OutputHLSL):
+ (sh::OutputHLSL::header):
+ (sh::OutputHLSL::visitSymbol):
+ (sh::OutputHLSL::visitUnary):
+ (sh::OutputHLSL::visitAggregate):
+ (sh::OutputHLSL::visitLoop):
+ (sh::OutputHLSL::handleExcessiveLoop):
+ (sh::OutputHLSL::typeString):
+ (sh::OutputHLSL::addConstructor):
+ (sh::OutputHLSL::decorateUniform):
+ * src/compiler/OutputHLSL.h:
+ (OutputHLSL):
+ * src/compiler/PoolAlloc.cpp:
+ (TAllocation::checkGuardBlock):
+ * src/compiler/ShHandle.h:
+ (TCompiler):
+ * src/compiler/SymbolTable.cpp:
+ * src/compiler/SymbolTable.h:
+ (TSymbolTable):
+ (TSymbolTable::getOuterLevel):
+ * src/compiler/VariableInfo.cpp:
+ (getVariableDataType):
+ * src/compiler/glslang.l:
+ * src/compiler/glslang.y:
+ * src/compiler/glslang_lex.cpp:
+ (yy_buffer_state):
+ (yyguts_t):
+ (input):
+ (yyensure_buffer_stack):
+ (yy_scan_bytes):
+ (yyget_leng):
+ * src/compiler/glslang_tab.cpp:
+ * src/compiler/osinclude.h:
+ * src/compiler/preprocessor/cpp.c:
+ * src/compiler/preprocessor/memory.c:
+ * src/compiler/preprocessor/new/Context.cpp: Added.
+ (isMacroNameReserved):
+ (pp):
+ (pp::Context::Context):
+ (pp::Context::~Context):
+ (pp::Context::init):
+ (pp::Context::process):
+ (pp::Context::defineMacro):
+ (pp::Context::undefineMacro):
+ (pp::Context::isMacroDefined):
+ (pp::Context::reset):
+ (pp::Context::defineBuiltInMacro):
+ * src/compiler/preprocessor/new/Context.h: Added.
+ (pp):
+ (Context):
+ (pp::Context::lexer):
+ (pp::Context::output):
+ * src/compiler/preprocessor/new/Input.cpp: Added.
+ (pp):
+ (pp::Input::Input):
+ (pp::Input::eof):
+ (pp::Input::read):
+ (pp::Input::getChar):
+ (pp::Input::peekChar):
+ (pp::Input::switchToNextString):
+ (pp::Input::isStringEmpty):
+ (pp::Input::stringLength):
+ * src/compiler/preprocessor/new/Input.h: Added.
+ (pp):
+ (Input):
+ (pp::Input::error):
+ (pp::Input::stringIndex):
+ * src/compiler/preprocessor/new/Macro.cpp: Added.
+ (pp):
+ (pp::Macro::Macro):
+ (pp::Macro::~Macro):
+ * src/compiler/preprocessor/new/Macro.h: Added.
+ (pp):
+ (Macro):
+ (pp::Macro::type):
+ (pp::Macro::identifier):
+ (pp::Macro::parameters):
+ (pp::Macro::replacements):
+ * src/compiler/preprocessor/new/Preprocessor.cpp: Added.
+ (pp):
+ (pp::Preprocessor::Preprocessor):
+ (pp::Preprocessor::~Preprocessor):
+ (pp::Preprocessor::init):
+ (pp::Preprocessor::process):
+ (pp::Preprocessor::reset):
+ * src/compiler/preprocessor/new/Preprocessor.h: Added.
+ (pp):
+ (Preprocessor):
+ (pp::Preprocessor::begin):
+ (pp::Preprocessor::end):
+ * src/compiler/preprocessor/new/Token.cpp: Added.
+ (pp):
+ (pp::Token::encodeLocation):
+ (pp::Token::decodeLocation):
+ (pp::Token::Token):
+ (pp::Token::~Token):
+ (pp::operator<<):
+ * src/compiler/preprocessor/new/Token.h: Added.
+ (pp):
+ (Token):
+ (pp::Token::location):
+ (pp::Token::type):
+ (pp::Token::value):
+ * src/compiler/preprocessor/new/generate_parser.sh: Added.
+ * src/compiler/preprocessor/new/pp.l: Added.
+ * src/compiler/preprocessor/new/pp.y: Added.
+ * src/compiler/preprocessor/new/pp_lex.cpp: Added.
+ (yy_buffer_state):
+ (yy_trans_info):
+ (yyguts_t):
+ (yy_get_previous_state):
+ (yy_try_NUL_trans):
+ (input):
+ (pprestart):
+ (pp_switch_to_buffer):
+ (pp_load_buffer_state):
+ (pp_create_buffer):
+ (pp_delete_buffer):
+ (pp_init_buffer):
+ (pp_flush_buffer):
+ (pppush_buffer_state):
+ (pppop_buffer_state):
+ (ppensure_buffer_stack):
+ (pp_scan_buffer):
+ (pp_scan_string):
+ (pp_scan_bytes):
+ (yy_push_state):
+ (yy_pop_state):
+ (yy_top_state):
+ (yy_fatal_error):
+ (ppget_extra):
+ (ppget_lineno):
+ (ppget_column):
+ (ppget_in):
+ (ppget_out):
+ (ppget_leng):
+ (ppget_text):
+ (ppset_extra):
+ (ppset_lineno):
+ (ppset_column):
+ (ppset_in):
+ (ppset_out):
+ (ppget_debug):
+ (ppset_debug):
+ (ppget_lval):
+ (ppset_lval):
+ (ppget_lloc):
+ (ppset_lloc):
+ (pplex_init):
+ (pplex_init_extra):
+ (yy_init_globals):
+ (pplex_destroy):
+ (yy_flex_strncpy):
+ (yy_flex_strlen):
+ (ppalloc):
+ (pprealloc):
+ (ppfree):
+ (extractMacroName):
+ (pp):
+ (pp::Context::readInput):
+ (pp::Context::initLexer):
+ (pp::Context::destroyLexer):
+ * src/compiler/preprocessor/new/pp_tab.cpp: Added.
+ (YYLTYPE):
+ (yysyntax_error):
+ (yyerror):
+ (pushConditionalBlock):
+ (popConditionalBlock):
+ (pp::Context::parse):
+ * src/compiler/preprocessor/new/pp_tab.h: Added.
+ (YYLTYPE):
+ * src/compiler/preprocessor/new/stl_utils.h: Added.
+ (pp):
+ (Delete):
+ (pp::Delete::operator()):
+ (DeleteSecond):
+ (pp::DeleteSecond::operator()):
+ * src/compiler/preprocessor/new/token_type.h: Added.
+ * src/compiler/preprocessor/scanner.c:
+ (yylex_CPP):
+ * src/compiler/preprocessor/symbols.c:
+ * src/compiler/preprocessor/tokens.c:
+ * src/libEGL/Config.cpp:
+ (egl::ConfigSet::getConfigs):
+ * src/libEGL/Display.cpp:
+ (egl::Display::initialize):
+ (egl::Display::terminate):
+ (egl::Display::restoreLostDevice):
+ (egl::Display::sync):
+ (egl):
+ (egl::Display::allocateEventQuery):
+ (egl::Display::freeEventQuery):
+ (egl::Display::getFloat32TextureSupport):
+ (egl::Display::getFloat16TextureSupport):
+ (egl::Display::getEventQuerySupport):
+ (egl::Display::initExtensionString):
+ (egl::Display::shareHandleSupported):
+ (egl::Display::getOcclusionQuerySupport):
+ (egl::Display::getInstancingSupport):
+ * src/libEGL/Display.h:
+ (Display):
+ (egl::Display::isD3d9ExDevice):
+ * src/libEGL/Surface.cpp:
+ (egl::Surface::resetSwapChain):
+ * src/libEGL/libEGL.cpp:
+ * src/libEGL/libEGL.vcproj:
+ * src/libGLESv2/Blit.cpp:
+ (gl::Blit::setCommonBlitState):
+ * src/libGLESv2/Buffer.h:
+ (Buffer):
+ * src/libGLESv2/Context.cpp:
+ (gl::Context::Context):
+ (gl::Context::~Context):
+ (gl::Context::makeCurrent):
+ (gl::Context::getActiveQuery):
+ (gl):
+ (gl::Context::createFence):
+ (gl::Context::createQuery):
+ (gl::Context::deleteQuery):
+ (gl::Context::beginQuery):
+ (gl::Context::endQuery):
+ (gl::Context::getQuery):
+ (gl::Context::applyVertexBuffer):
+ (gl::Context::applyIndexBuffer):
+ (gl::Context::readPixels):
+ (gl::Context::clear):
+ (gl::Context::drawArrays):
+ (gl::Context::drawElements):
+ (gl::Context::sync):
+ (gl::Context::drawLineLoop):
+ (gl::Context::supportsOcclusionQueries):
+ (gl::Context::supportsInstancing):
+ (gl::Context::setVertexAttribDivisor):
+ (gl::Context::initExtensionString):
+ (gl::VertexDeclarationCache::applyDeclaration):
+ (gl::VertexDeclarationCache::markStateDirty):
+ * src/libGLESv2/Context.h:
+ (gl):
+ (gl::VertexAttribute::VertexAttribute):
+ (State):
+ (VertexDeclarationCache):
+ (Context):
+ * src/libGLESv2/Fence.cpp:
+ (gl::Fence::Fence):
+ (gl::Fence::~Fence):
+ (gl::Fence::setFence):
+ * src/libGLESv2/Fence.h:
+ (egl):
+ (Fence):
+ * src/libGLESv2/Framebuffer.cpp:
+ (gl::Framebuffer::lookupRenderbuffer):
+ (gl::Framebuffer::detachTexture):
+ (gl::Framebuffer::completeness):
+ * src/libGLESv2/Framebuffer.h:
+ * src/libGLESv2/IndexDataManager.cpp:
+ (gl::IndexDataManager::IndexDataManager):
+ (gl::IndexDataManager::~IndexDataManager):
+ (gl::computeRange):
+ (gl::IndexDataManager::prepareIndexData):
+ (gl::IndexDataManager::getCountingIndices):
+ (gl):
+ * src/libGLESv2/IndexDataManager.h:
+ (IndexDataManager):
+ * src/libGLESv2/Program.cpp:
+ (gl::Program::getUniformLocation):
+ (gl::Program::setUniform1fv):
+ (gl::Program::setUniform2fv):
+ (gl::Program::setUniform3fv):
+ (gl::Program::setUniform4fv):
+ (gl::Program::setUniform1iv):
+ (gl::Program::setUniform2iv):
+ (gl::Program::setUniform3iv):
+ (gl::Program::setUniform4iv):
+ (gl::Program::packVaryings):
+ (gl::Program::linkVaryings):
+ (gl::Program::defineUniform):
+ (gl::Program::createUniform):
+ (gl::Program::applyUniformnbv):
+ (gl::Program::applyUniform1iv):
+ (gl::Program::applyUniform2iv):
+ (gl::Program::applyUniform3iv):
+ (gl::Program::applyUniform4iv):
+ (gl::Program::getInfoLog):
+ * src/libGLESv2/Program.h:
+ (Program):
+ * src/libGLESv2/Query.cpp: Added.
+ (gl):
+ (gl::Query::Query):
+ (gl::Query::~Query):
+ (gl::Query::begin):
+ (gl::Query::end):
+ (gl::Query::getResult):
+ (gl::Query::isResultAvailable):
+ (gl::Query::getType):
+ (gl::Query::testQuery):
+ * src/libGLESv2/Query.h: Added.
+ (gl):
+ (Query):
+ * src/libGLESv2/Renderbuffer.cpp:
+ (gl):
+ (gl::RenderbufferInterface::addProxyRef):
+ (gl::RenderbufferInterface::releaseProxy):
+ (gl::RenderbufferTexture::RenderbufferTexture):
+ (gl::RenderbufferTexture::~RenderbufferTexture):
+ (gl::RenderbufferTexture::addProxyRef):
+ (gl::RenderbufferTexture::releaseProxy):
+ (gl::Renderbuffer::addRef):
+ (gl::Renderbuffer::release):
+ * src/libGLESv2/Renderbuffer.h:
+ (gl):
+ (RenderbufferInterface):
+ (RenderbufferTexture):
+ (Renderbuffer):
+ * src/libGLESv2/Shader.cpp:
+ (gl::Shader::Shader):
+ (gl::Shader::getInfoLog):
+ (gl::Shader::getSourceImpl):
+ (gl):
+ (gl::Shader::initializeCompiler):
+ (gl::Shader::parseVaryings):
+ (gl::Shader::uncompile):
+ (gl::Shader::compileToHLSL):
+ (gl::VertexShader::uncompile):
+ (gl::VertexShader::compile):
+ (gl::VertexShader::parseAttributes):
+ (gl::FragmentShader::compile):
+ * src/libGLESv2/Shader.h:
+ (Shader):
+ (VertexShader):
+ * src/libGLESv2/Texture.cpp:
+ (gl::Texture2D::Texture2D):
+ (gl::Texture2D::~Texture2D):
+ (gl):
+ (gl::Texture2D::addProxyRef):
+ (gl::Texture2D::releaseProxy):
+ (gl::Texture2D::getRenderbuffer):
+ (gl::TextureCubeMap::TextureCubeMap):
+ (gl::TextureCubeMap::~TextureCubeMap):
+ (gl::TextureCubeMap::addProxyRef):
+ (gl::TextureCubeMap::releaseProxy):
+ (gl::TextureCubeMap::isSamplerComplete):
+ (gl::TextureCubeMap::convertToRenderTarget):
+ (gl::TextureCubeMap::getRenderbuffer):
+ * src/libGLESv2/Texture.h:
+ (Texture):
+ (Texture2D):
+ (TextureCubeMap):
+ * src/libGLESv2/VertexDataManager.cpp:
+ (gl::VertexDataManager::writeAttributeData):
+ (gl::VertexDataManager::prepareVertexData):
+ (gl::VertexDataManager::spaceRequired):
+ (gl):
+ * src/libGLESv2/VertexDataManager.h:
+ (TranslatedAttribute):
+ (VertexDataManager):
+ * src/libGLESv2/libGLESv2.cpp:
+ * src/libGLESv2/libGLESv2.def:
+ * src/libGLESv2/libGLESv2.vcproj:
+ * src/libGLESv2/utilities.cpp:
+ (gl::IsInternalTextureTarget):
+ * src/libGLESv2/utilities.h:
+ (gl):
+
+2012-03-09 Ashod Nakashian <ashodnakashian@yahoo.com>
+
+ Bash scripts should support LF endings only
+ https://bugs.webkit.org/show_bug.cgi?id=79509
+
+ Reviewed by David Kilzer.
+
+ * src/compiler/generate_parser.sh: Added property svn:eol-style.
+
+2012-02-21 Sam Weinig <sam@webkit.org>
+
+ Attempt to fix the Snow Leopard build.
+
+ * Configurations/Base.xcconfig:
+
+2012-02-21 Sam Weinig <sam@webkit.org>
+
+ Use libc++ when building with Clang on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=78981
+
+ Reviewed by Dan Bernstein.
+
+ * Configurations/Base.xcconfig:
+
+2012-01-07 Chris Marrin <cmarrin@apple.com>
+
+ Fixed a warning in GTK build of ANGLE
+
+ Unreviewed.
+
+ * src/compiler/DetectRecursion.cpp:
+ (DetectRecursion::~DetectRecursion):
+
+2012-01-06 Mark Rowe <mrowe@apple.com>
+
+ Regenerate a few files with a more appropriate version of bison.
+
+ Rubber-stamped by Dan Bernstein.
+
+ * src/compiler/glslang.l: Tweak the input so that it generates code that compiles without warnings.
+ * src/compiler/glslang_lex.cpp:
+ * src/compiler/glslang_tab.cpp:
+ * src/compiler/glslang_tab.h:
+
+2012-01-06 Chris Marrin <cmarrin@apple.com>
+
+ Update ANGLE in WebKit tree
+ https://bugs.webkit.org/show_bug.cgi?id=75753
+
+ Reviewed by Simon Fraser.
+
+ Updated ANGLE to r939. Fixed a compiler error (missing case in switch statement)
+ and added 5 new files to xcodeproj. Other than that it is a straight copy of
+ the files from the ANGLE repository.
+
+ * ANGLE.xcodeproj/project.pbxproj:
+ * include/EGL/eglext.h:
+ * include/EGL/eglplatform.h:
+ * include/GLES2/gl2ext.h:
+ * include/GLSLANG/ShaderLang.h:
+ * src/common/debug.cpp:
+ (gl::output):
+ (gl::trace):
+ (gl::perfActive):
+ (gl::ScopedPerfEventHelper::ScopedPerfEventHelper):
+ (gl::ScopedPerfEventHelper::~ScopedPerfEventHelper):
+ * src/common/version.h:
+ * src/compiler/BaseTypes.h:
+ (getBasicString):
+ * src/compiler/BuiltInFunctionEmulator.cpp: Added.
+ (BuiltInFunctionEmulator::BuiltInFunctionEmulator):
+ (BuiltInFunctionEmulator::SetFunctionCalled):
+ (BuiltInFunctionEmulator::OutputEmulatedFunctionDefinition):
+ (BuiltInFunctionEmulator::IdentifyFunction):
+ (BuiltInFunctionEmulator::MarkBuiltInFunctionsForEmulation):
+ (BuiltInFunctionEmulator::Cleanup):
+ (BuiltInFunctionEmulator::GetEmulatedFunctionName):
+ * src/compiler/BuiltInFunctionEmulator.h: Added.
+ * src/compiler/Compiler.cpp:
+ (TCompiler::TCompiler):
+ (TCompiler::compile):
+ (TCompiler::clearResults):
+ (TCompiler::detectRecursion):
+ (TCompiler::getMappedNameMaxLength):
+ (TCompiler::getBuiltInFunctionEmulator):
+ * src/compiler/DetectRecursion.cpp: Added.
+ (DetectRecursion::FunctionNode::FunctionNode):
+ (DetectRecursion::FunctionNode::getName):
+ (DetectRecursion::FunctionNode::addCallee):
+ (DetectRecursion::FunctionNode::detectRecursion):
+ (DetectRecursion::DetectRecursion):
+ (DetectRecursion::~DetectRecursion):
+ (DetectRecursion::visitAggregate):
+ (DetectRecursion::detectRecursion):
+ (DetectRecursion::findFunctionByName):
+ * src/compiler/DetectRecursion.h: Added.
+ * src/compiler/ExtensionBehavior.h:
+ * src/compiler/ForLoopUnroll.cpp:
+ (ForLoopUnroll::MarkForLoopsWithIntegerIndicesForUnrolling):
+ * src/compiler/ForLoopUnroll.h:
+ * src/compiler/Initialize.cpp:
+ (BuiltInFunctionsCommon):
+ (BuiltInFunctionsVertex):
+ (BuiltInFunctionsFragment):
+ (TBuiltIns::initialize):
+ (IdentifyBuiltIns):
+ (InitExtensionBehavior):
+ * src/compiler/MapLongVariableNames.cpp:
+ (MapLongVariableNames::MapLongVariableNames):
+ (MapLongVariableNames::visitSymbol):
+ (MapLongVariableNames::mapVaryingLongName):
+ * src/compiler/MapLongVariableNames.h:
+ * src/compiler/OutputGLSLBase.cpp:
+ (TOutputGLSLBase::visitUnary):
+ (TOutputGLSLBase::visitAggregate):
+ * src/compiler/OutputHLSL.cpp:
+ (sh::OutputHLSL::OutputHLSL):
+ (sh::OutputHLSL::header):
+ (sh::OutputHLSL::visitSymbol):
+ (sh::OutputHLSL::visitAggregate):
+ (sh::OutputHLSL::visitSelection):
+ (sh::OutputHLSL::visitLoop):
+ (sh::OutputHLSL::handleExcessiveLoop):
+ (sh::OutputHLSL::addConstructor):
+ (sh::OutputHLSL::decorate):
+ (sh::OutputHLSL::decorateUniform):
+ * src/compiler/OutputHLSL.h:
+ * src/compiler/ParseHelper.cpp:
+ (TParseContext::recover):
+ (TParseContext::reservedErrorCheck):
+ (TParseContext::constructorErrorCheck):
+ (TParseContext::extensionErrorCheck):
+ (TParseContext::supportsExtension):
+ (TParseContext::enterStructDeclaration):
+ (TParseContext::exitStructDeclaration):
+ (TParseContext::structNestingErrorCheck):
+ * src/compiler/ParseHelper.h:
+ (TParseContext::TParseContext):
+ * src/compiler/PoolAlloc.h:
+ (pool_allocator::pool_allocator):
+ (pool_allocator::operator=):
+ (pool_allocator::setAllocator):
+ (pool_allocator::getAllocator):
+ * src/compiler/ShHandle.h:
+ * src/compiler/ShaderLang.cpp:
+ (checkActiveUniformAndAttribMaxLengths):
+ (checkMappedNameMaxLength):
+ (getVariableInfo):
+ (ShInitBuiltInResources):
+ (ShGetInfo):
+ * src/compiler/SymbolTable.cpp:
+ (TType::computeDeepestStructNesting):
+ * src/compiler/TranslatorESSL.cpp:
+ (TranslatorESSL::translate):
+ (TranslatorESSL::writeExtensionBehavior):
+ * src/compiler/TranslatorGLSL.cpp:
+ (TranslatorGLSL::translate):
+ * src/compiler/Types.h:
+ (TType::TType):
+ (TType::copyType):
+ (TType::setStruct):
+ (TType::getDeepestStructNesting):
+ * src/compiler/UnfoldSelect.cpp:
+ (sh::UnfoldSelect::traverse):
+ (sh::UnfoldSelect::visitSelection):
+ (sh::UnfoldSelect::visitLoop):
+ (sh::UnfoldSelect::getNextTemporaryIndex):
+ * src/compiler/UnfoldSelect.h:
+ * src/compiler/ValidateLimitations.cpp:
+ * src/compiler/ValidateLimitations.h:
+ * src/compiler/VariableInfo.cpp:
+ (getVariableDataType):
+ * src/compiler/generate_glslang_lexer.sh: Removed.
+ * src/compiler/generate_glslang_parser.sh: Removed.
+ * src/compiler/generate_parser.sh: Added.
+ * src/compiler/glslang.l:
+ * src/compiler/glslang.y:
+ * src/compiler/glslang_lex.cpp:
+ (yy_get_previous_state):
+ (yy_try_NUL_trans):
+ * src/compiler/glslang_tab.cpp:
+ * src/compiler/glslang_tab.h:
+ * src/compiler/intermOut.cpp:
+ (TOutputTraverser::visitAggregate):
+ * src/compiler/intermediate.h:
+ (TIntermUnary::TIntermUnary):
+ (TIntermUnary::setUseEmulatedFunction):
+ (TIntermUnary::getUseEmulatedFunction):
+ (TIntermAggregate::TIntermAggregate):
+ (TIntermAggregate::setUseEmulatedFunction):
+ (TIntermAggregate::getUseEmulatedFunction):
+ * src/compiler/osinclude.h:
+ * src/compiler/ossource_posix.cpp:
+ (OS_AllocTLSIndex):
+ (OS_SetTLSValue):
+ (OS_FreeTLSIndex):
+ * src/compiler/preprocessor/atom.c:
+ (GrowAtomTable):
+ * src/compiler/preprocessor/length_limits.h: Added.
+ * src/compiler/preprocessor/scanner.h:
+ * src/libEGL/Display.cpp:
+ (egl::Display::getDisplay):
+ (egl::Display::Display):
+ (egl::Display::~Display):
+ (egl::Display::initialize):
+ (egl::Display::terminate):
+ (egl::Display::startScene):
+ (egl::Display::endScene):
+ (egl::Display::createDevice):
+ (egl::Display::initializeDevice):
+ (egl::Display::resetDevice):
+ (egl::Display::createWindowSurface):
+ (egl::Display::createOffscreenSurface):
+ (egl::Display::createContext):
+ (egl::Display::restoreLostDevice):
+ (egl::Display::notifyDeviceLost):
+ (egl::Display::isDeviceLost):
+ (egl::Display::testDeviceLost):
+ (egl::Display::testDeviceResettable):
+ (egl::Display::getDXT1TextureSupport):
+ (egl::Display::getDXT3TextureSupport):
+ (egl::Display::getDXT5TextureSupport):
+ (egl::Display::getFloat32TextureSupport):
+ (egl::Display::getFloat16TextureSupport):
+ (egl::Display::getTexturePool):
+ (egl::Display::initExtensionString):
+ * src/libEGL/Display.h:
+ * src/libEGL/Surface.cpp:
+ (egl::Surface::Surface):
+ (egl::Surface::initialize):
+ (egl::Surface::resetSwapChain):
+ (egl::Surface::subclassWindow):
+ (egl::Surface::unsubclassWindow):
+ (egl::Surface::swap):
+ (egl::Surface::postSubBuffer):
+ (egl::Surface::isPostSubBufferSupported):
+ * src/libEGL/Surface.h:
+ * src/libEGL/libEGL.cpp:
+ * src/libEGL/libEGL.rc:
+ * src/libEGL/libEGL.vcproj:
+ * src/libGLESv2/Buffer.cpp:
+ (gl::Buffer::bufferSubData):
+ * src/libGLESv2/Context.cpp:
+ (gl::Context::Context):
+ (gl::Context::makeCurrent):
+ (gl::Context::markAllStateDirty):
+ (gl::Context::markContextLost):
+ (gl::Context::isContextLost):
+ (gl::Context::setPackReverseRowOrder):
+ (gl::Context::getPackReverseRowOrder):
+ (gl::Context::deleteProgram):
+ (gl::Context::getDrawFramebuffer):
+ (gl::Context::bindDrawFramebuffer):
+ (gl::Context::useProgram):
+ (gl::Context::setFramebufferZero):
+ (gl::Context::getCurrentProgram):
+ (gl::Context::getBooleanv):
+ (gl::Context::getIntegerv):
+ (gl::Context::getQueryParameterInfo):
+ (gl::Context::applyRenderTarget):
+ (gl::Context::applyState):
+ (gl::Context::applyVertexBuffer):
+ (gl::Context::applyIndexBuffer):
+ (gl::Context::applyShaders):
+ (gl::Context::applyTextures):
+ (gl::Context::readPixels):
+ (gl::Context::clear):
+ (gl::Context::drawArrays):
+ (gl::Context::drawElements):
+ (gl::Context::sync):
+ (gl::Context::drawClosingLine):
+ (gl::Context::getResetStatus):
+ (gl::Context::isResetNotificationEnabled):
+ (gl::Context::supportsDXT1Textures):
+ (gl::Context::supportsDXT3Textures):
+ (gl::Context::supportsDXT5Textures):
+ (gl::Context::supportsFloat32Textures):
+ (gl::Context::supportsFloat32LinearFilter):
+ (gl::Context::supportsFloat32RenderableTextures):
+ (gl::Context::supportsFloat16Textures):
+ (gl::Context::supportsFloat16LinearFilter):
+ (gl::Context::supportsFloat16RenderableTextures):
+ (gl::Context::initExtensionString):
+ (gl::Context::initRendererString):
+ (gl::Context::getRendererString):
+ (gl::Context::blitFramebuffer):
+ (gl::VertexDeclarationCache::applyDeclaration):
+ (gl::VertexDeclarationCache::markStateDirty):
+ * src/libGLESv2/Context.h:
+ * src/libGLESv2/Fence.cpp:
+ (gl::Fence::testFence):
+ (gl::Fence::getFenceiv):
+ * src/libGLESv2/Framebuffer.cpp:
+ (gl::Framebuffer::setColorbuffer):
+ (gl::Framebuffer::setDepthbuffer):
+ (gl::Framebuffer::setStencilbuffer):
+ (gl::Framebuffer::getColorbuffer):
+ (gl::Framebuffer::getDepthbuffer):
+ (gl::Framebuffer::getStencilbuffer):
+ (gl::Framebuffer::hasStencil):
+ (gl::Framebuffer::completeness):
+ (gl::DefaultFramebuffer::DefaultFramebuffer):
+ * src/libGLESv2/Framebuffer.h:
+ * src/libGLESv2/IndexDataManager.cpp:
+ (gl::IndexDataManager::prepareIndexData):
+ (gl::IndexBuffer::IndexBuffer):
+ (gl::IndexBuffer::getSerial):
+ (gl::IndexBuffer::issueSerial):
+ (gl::StreamingIndexBuffer::reserveSpace):
+ (gl::StaticIndexBuffer::reserveSpace):
+ (gl::StaticIndexBuffer::lookupRange):
+ (gl::StaticIndexBuffer::addRange):
+ * src/libGLESv2/IndexDataManager.h:
+ (gl::StaticIndexBuffer::IndexRange::operator<):
+ * src/libGLESv2/Program.cpp:
+ (gl::Uniform::Uniform):
+ (gl::Uniform::isArray):
+ (gl::UniformLocation::UniformLocation):
+ (gl::Program::Program):
+ (gl::Program::detachShader):
+ (gl::Program::getUsedSamplerRange):
+ (gl::Program::getSamplerMapping):
+ (gl::Program::getUniformLocation):
+ (gl::Program::setUniform1fv):
+ (gl::Program::setUniform2fv):
+ (gl::Program::setUniform3fv):
+ (gl::transposeMatrix):
+ (gl::Program::setUniformMatrix2fv):
+ (gl::Program::setUniformMatrix3fv):
+ (gl::Program::setUniformMatrix4fv):
+ (gl::Program::getUniformfv):
+ (gl::Program::getUniformiv):
+ (gl::Program::applyUniforms):
+ (gl::Program::compileToBinary):
+ (gl::Program::linkVaryings):
+ (gl::Program::link):
+ (gl::Program::defineUniform):
+ (gl::Program::createUniform):
+ (gl::Program::decorateAttribute):
+ (gl::Program::undecorateUniform):
+ (gl::Program::applyUniformnbv):
+ (gl::Program::applyUniformnfv):
+ (gl::Program::applyUniform1iv):
+ (gl::Program::applyUniform2iv):
+ (gl::Program::applyUniform3iv):
+ (gl::Program::applyUniform4iv):
+ (gl::Program::applyUniformniv):
+ (gl::Program::appendToInfoLogSanitized):
+ (gl::Program::unlink):
+ (gl::Program::getActiveUniform):
+ (gl::Program::getActiveUniformCount):
+ (gl::Program::getActiveUniformMaxLength):
+ (gl::Program::validateSamplers):
+ (gl::Program::initializeConstantHandles):
+ (gl::Program::getDxCoordLocation):
+ * src/libGLESv2/Program.h:
+ * src/libGLESv2/Renderbuffer.cpp:
+ (gl::RenderbufferInterface::RenderbufferInterface):
+ (gl::RenderbufferInterface::getRedSize):
+ (gl::RenderbufferInterface::getGreenSize):
+ (gl::RenderbufferInterface::getBlueSize):
+ (gl::RenderbufferInterface::getAlphaSize):
+ (gl::RenderbufferInterface::getDepthSize):
+ (gl::RenderbufferInterface::getStencilSize):
+ (gl::RenderbufferTexture::RenderbufferTexture):
+ (gl::RenderbufferTexture::~RenderbufferTexture):
+ (gl::RenderbufferTexture::getRenderTarget):
+ (gl::RenderbufferTexture::getDepthStencil):
+ (gl::RenderbufferTexture::getWidth):
+ (gl::RenderbufferTexture::getHeight):
+ (gl::RenderbufferTexture::getInternalFormat):
+ (gl::RenderbufferTexture::getD3DFormat):
+ (gl::RenderbufferTexture::getSamples):
+ (gl::RenderbufferTexture::getSerial):
+ (gl::Renderbuffer::Renderbuffer):
+ (gl::Renderbuffer::~Renderbuffer):
+ (gl::Renderbuffer::getRenderTarget):
+ (gl::Renderbuffer::getDepthStencil):
+ (gl::Renderbuffer::getWidth):
+ (gl::Renderbuffer::getHeight):
+ (gl::Renderbuffer::getInternalFormat):
+ (gl::Renderbuffer::getD3DFormat):
+ (gl::Renderbuffer::getRedSize):
+ (gl::Renderbuffer::getGreenSize):
+ (gl::Renderbuffer::getBlueSize):
+ (gl::Renderbuffer::getAlphaSize):
+ (gl::Renderbuffer::getDepthSize):
+ (gl::Renderbuffer::getStencilSize):
+ (gl::Renderbuffer::getSamples):
+ (gl::Renderbuffer::getSerial):
+ (gl::Renderbuffer::setStorage):
+ (gl::RenderbufferStorage::getD3DFormat):
+ (gl::RenderbufferStorage::issueCubeSerials):
+ (gl::Colorbuffer::Colorbuffer):
+ (gl::Colorbuffer::getRenderTarget):
+ (gl::Depthbuffer::Depthbuffer):
+ (gl::Stencilbuffer::Stencilbuffer):
+ * src/libGLESv2/Renderbuffer.h:
+ (gl::RenderbufferInterface::~RenderbufferInterface):
+ * src/libGLESv2/Shader.cpp:
+ (gl::Shader::getTranslatedSourceLength):
+ (gl::Shader::getSourceImpl):
+ (gl::Shader::getSource):
+ (gl::Shader::getTranslatedSource):
+ * src/libGLESv2/Shader.h:
+ * src/libGLESv2/Texture.cpp:
+ (gl::ConvertTextureFormatType):
+ (gl::IsTextureFormatRenderable):
+ (gl::Image::Image):
+ (gl::Image::~Image):
+ (gl::Image::redefine):
+ (gl::Image::createSurface):
+ (gl::Image::lock):
+ (gl::Image::unlock):
+ (gl::Image::isRenderableFormat):
+ (gl::Image::getD3DFormat):
+ (gl::Image::getSurface):
+ (gl::Image::setManagedSurface):
+ (gl::Image::updateSurface):
+ (gl::Image::loadData):
+ (gl::Image::loadAlphaData):
+ (gl::Image::loadAlphaFloatData):
+ (gl::Image::loadAlphaHalfFloatData):
+ (gl::Image::loadLuminanceData):
+ (gl::Image::loadLuminanceFloatData):
+ (gl::Image::loadLuminanceHalfFloatData):
+ (gl::Image::loadLuminanceAlphaData):
+ (gl::Image::loadLuminanceAlphaFloatData):
+ (gl::Image::loadLuminanceAlphaHalfFloatData):
+ (gl::Image::loadRGBUByteData):
+ (gl::Image::loadRGB565Data):
+ (gl::Image::loadRGBFloatData):
+ (gl::Image::loadRGBHalfFloatData):
+ (gl::Image::loadRGBAUByteDataSSE2):
+ (gl::Image::loadRGBAUByteData):
+ (gl::Image::loadRGBA4444Data):
+ (gl::Image::loadRGBA5551Data):
+ (gl::Image::loadRGBAFloatData):
+ (gl::Image::loadRGBAHalfFloatData):
+ (gl::Image::loadBGRAData):
+ (gl::Image::loadCompressedData):
+ (gl::FlipCopyDXT1BlockFull):
+ (gl::FlipCopyDXT1BlockHalf):
+ (gl::FlipCopyDXT3BlockFull):
+ (gl::FlipCopyDXT3BlockHalf):
+ (gl::FlipCopyDXT5BlockFull):
+ (gl::FlipCopyDXT5BlockHalf):
+ (gl::Image::loadDXT1Data):
+ (gl::Image::loadDXT3Data):
+ (gl::Image::loadDXT5Data):
+ (gl::Image::copy):
+ (gl::TextureStorage::TextureStorage):
+ (gl::TextureStorage::~TextureStorage):
+ (gl::TextureStorage::isRenderTarget):
+ (gl::TextureStorage::isManaged):
+ (gl::TextureStorage::getPool):
+ (gl::TextureStorage::getTextureSerial):
+ (gl::TextureStorage::issueTextureSerial):
+ (gl::Texture::Texture):
+ (gl::Texture::~Texture):
+ (gl::Texture::setMinFilter):
+ (gl::Texture::setMagFilter):
+ (gl::Texture::setWrapS):
+ (gl::Texture::setWrapT):
+ (gl::Texture::setUsage):
+ (gl::Texture::getMinFilter):
+ (gl::Texture::getMagFilter):
+ (gl::Texture::getWrapS):
+ (gl::Texture::getWrapT):
+ (gl::Texture::getUsage):
+ (gl::Texture::setImage):
+ (gl::Texture::setCompressedImage):
+ (gl::Texture::subImage):
+ (gl::Texture::subImageCompressed):
+ (gl::Texture::getTexture):
+ (gl::Texture::hasDirtyParameters):
+ (gl::Texture::hasDirtyImages):
+ (gl::Texture::resetDirty):
+ (gl::Texture::getTextureSerial):
+ (gl::Texture::getRenderTargetSerial):
+ (gl::Texture::isImmutable):
+ (gl::Texture::creationLevels):
+ (gl::Texture::getBlitter):
+ (gl::Texture::copyToRenderTarget):
+ (gl::TextureStorage2D::TextureStorage2D):
+ (gl::TextureStorage2D::~TextureStorage2D):
+ (gl::TextureStorage2D::getSurfaceLevel):
+ (gl::TextureStorage2D::getBaseTexture):
+ (gl::TextureStorage2D::getRenderTargetSerial):
+ (gl::Texture2D::Texture2D):
+ (gl::Texture2D::~Texture2D):
+ (gl::Texture2D::getWidth):
+ (gl::Texture2D::getHeight):
+ (gl::Texture2D::getInternalFormat):
+ (gl::Texture2D::getType):
+ (gl::Texture2D::redefineImage):
+ (gl::Texture2D::setImage):
+ (gl::Texture2D::bindTexImage):
+ (gl::Texture2D::releaseTexImage):
+ (gl::Texture2D::setCompressedImage):
+ (gl::Texture2D::commitRect):
+ (gl::Texture2D::copyImage):
+ (gl::Texture2D::copySubImage):
+ (gl::Texture2D::storage):
+ (gl::Texture2D::isSamplerComplete):
+ (gl::Texture2D::isMipmapComplete):
+ (gl::Texture2D::getBaseTexture):
+ (gl::Texture2D::createTexture):
+ (gl::Texture2D::updateTexture):
+ (gl::Texture2D::convertToRenderTarget):
+ (gl::Texture2D::generateMipmaps):
+ (gl::Texture2D::getRenderbuffer):
+ (gl::Texture2D::getRenderTarget):
+ (gl::Texture2D::getStorage):
+ (gl::TextureStorageCubeMap::TextureStorageCubeMap):
+ (gl::TextureStorageCubeMap::~TextureStorageCubeMap):
+ (gl::TextureStorageCubeMap::getCubeMapSurface):
+ (gl::TextureStorageCubeMap::getBaseTexture):
+ (gl::TextureStorageCubeMap::getRenderTargetSerial):
+ (gl::TextureCubeMap::TextureCubeMap):
+ (gl::TextureCubeMap::~TextureCubeMap):
+ (gl::TextureCubeMap::getWidth):
+ (gl::TextureCubeMap::getHeight):
+ (gl::TextureCubeMap::getInternalFormat):
+ (gl::TextureCubeMap::getType):
+ (gl::TextureCubeMap::setCompressedImage):
+ (gl::TextureCubeMap::commitRect):
+ (gl::TextureCubeMap::subImage):
+ (gl::TextureCubeMap::subImageCompressed):
+ (gl::TextureCubeMap::isSamplerComplete):
+ (gl::TextureCubeMap::isCubeComplete):
+ (gl::TextureCubeMap::isMipmapCubeComplete):
+ (gl::TextureCubeMap::getBaseTexture):
+ (gl::TextureCubeMap::createTexture):
+ (gl::TextureCubeMap::updateTexture):
+ (gl::TextureCubeMap::convertToRenderTarget):
+ (gl::TextureCubeMap::setImage):
+ (gl::TextureCubeMap::redefineImage):
+ (gl::TextureCubeMap::copyImage):
+ (gl::TextureCubeMap::copySubImage):
+ (gl::TextureCubeMap::storage):
+ (gl::TextureCubeMap::generateMipmaps):
+ (gl::TextureCubeMap::getRenderbuffer):
+ (gl::TextureCubeMap::getRenderTarget):
+ (gl::TextureCubeMap::getStorage):
+ * src/libGLESv2/Texture.h:
+ (gl::Image::markDirty):
+ (gl::Image::markClean):
+ (gl::Image::getWidth):
+ (gl::Image::getHeight):
+ (gl::Image::getFormat):
+ (gl::Image::getType):
+ (gl::Image::isDirty):
+ * src/libGLESv2/VertexDataManager.cpp:
+ (gl::elementsInBuffer):
+ (gl::VertexDataManager::VertexDataManager):
+ (gl::VertexDataManager::writeAttributeData):
+ (gl::VertexDataManager::prepareVertexData):
+ (gl::VertexBuffer::VertexBuffer):
+ (gl::VertexBuffer::getSerial):
+ (gl::VertexBuffer::issueSerial):
+ (gl::StreamingVertexBuffer::reserveRequiredSpace):
+ (gl::StaticVertexBuffer::map):
+ (gl::StaticVertexBuffer::reserveRequiredSpace):
+ (gl::StaticVertexBuffer::lookupAttribute):
+ * src/libGLESv2/VertexDataManager.h:
+ (gl::ArrayVertexBuffer::size):
+ * src/libGLESv2/geometry/IndexDataManager.cpp: Removed.
+ * src/libGLESv2/geometry/IndexDataManager.h: Removed.
+ * src/libGLESv2/geometry/VertexDataManager.cpp: Removed.
+ * src/libGLESv2/geometry/VertexDataManager.h: Removed.
+ * src/libGLESv2/geometry/vertexconversion.h: Removed.
+ * src/libGLESv2/libGLESv2.cpp:
+ (validateSubImageParams):
+ (validReadFormatType):
+ (Extension::glBindTexImage):
+ * src/libGLESv2/libGLESv2.def:
+ * src/libGLESv2/libGLESv2.rc:
+ * src/libGLESv2/libGLESv2.vcproj:
+ * src/libGLESv2/main.cpp:
+ (gl::getNonLostContext):
+ (gl::checkDeviceLost):
+ * src/libGLESv2/main.h:
+ * src/libGLESv2/utilities.cpp:
+ (gl::UniformExternalComponentCount):
+ (gl::UniformInternalComponentCount):
+ (gl::UniformComponentSize):
+ (gl::UniformInternalSize):
+ (gl::UniformExternalSize):
+ (gl::ComputeCompressedSize):
+ (gl::IsCompressed):
+ (gl::ExtractFormat):
+ (gl::ExtractType):
+ (dx2es::IsFloat32Format):
+ (dx2es::IsFloat16Format):
+ * src/libGLESv2/utilities.h:
+ (isDeviceLostError):
+
+2011-11-11 Darin Adler <darin@apple.com>
+
+ * ANGLE.xcodeproj/project.pbxproj: Let a newer Xcode update this file.
+ If an older Xcode downgrades this file and we have a risk of some kind of
+ oscillating commit situation, please contact me so I know not to do this again.
+
+2011-09-19 Adam Roben <aroben@apple.com>
+
+ Let Xcode 4 do its thang with ANGLE.xcodeproj
+
+ * ANGLE.xcodeproj/project.pbxproj:
+
+2011-09-13 Anders Carlsson <andersca@apple.com>
+
+ Disable C++ exceptions when building with clang
+ https://bugs.webkit.org/show_bug.cgi?id=68031
+ <rdar://problem/9556880>
+
+ Reviewed by Mark Rowe.
+
+ * Configurations/Base.xcconfig:
+
+2011-09-08 Andras Becsi <andras.becsi@nokia.com>
+
+ [Qt] Build fails with strict compiler
+ https://bugs.webkit.org/show_bug.cgi?id=67778
+
+ Reviewed by Csaba Osztrogon√°c.
+
+ * src/compiler/glslang_lex.cpp: Regenerate with generate_glslang_lexer.sh using a newer flex
+ to suppress warning and fix the build when using [-Werror=unused-result]
+
+2011-08-12 Mark Rowe <mrowe@apple.com>
+
+ Be more forward-looking in the choice of compiler.
+
+ Rubber-stamped by Jon Honeycutt.
+
+ * Configurations/CompilerVersion.xcconfig:
+
+2011-08-11 Renata Hodovan <reni@webkit.org>
+
+ [Qt]Fix warnings after r92805.
+
+ Reviewed by Csaba Osztrogon√°c.
+
+ Control reached the end non-void functions.
+
+ * src/compiler/ossource_posix.cpp:
+ (OS_AllocTLSIndex):
+ (OS_SetTLSValue):
+
+2011-08-11 Renata Hodovan <reni@webkit.org>
+
+ Build fix on Qt Windows 32-bit Release/Debug after r92805.
+
+ Unreviewed.
+
+ * src/compiler/ossource_posix.cpp:
+ (OS_FreeTLSIndex):
+
+2011-08-04 Mark Rowe <mrowe@apple.com>
+
+ Future-proof Xcode configuration settings.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/CompilerVersion.xcconfig:
+ * Configurations/DebugRelease.xcconfig:
+
+2011-06-30 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Dan Bernstein.
+
+ ANGLE shouldn't try to use internal SDKs. It doesn't need them!
+
+ * Configurations/Base.xcconfig:
+
+2011-06-20 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Update ANGLE to r696
+ https://bugs.webkit.org/show_bug.cgi?id=56396
+
+ * ANGLE.xcodeproj/project.pbxproj:
+ * include/EGL/eglext.h:
+ * include/GLSLANG/ShaderLang.h:
+ * src/build_angle.xcodeproj/project.pbxproj:
+ * src/common/debug.cpp:
+ (gl::output):
+ (gl::trace):
+ (gl::perfActive):
+ (gl::ScopedPerfEventHelper::ScopedPerfEventHelper):
+ (gl::ScopedPerfEventHelper::~ScopedPerfEventHelper):
+ * src/common/debug.h:
+ * src/common/version.h: Added.
+ * src/compiler/CodeGenGLSL.cpp:
+ (ConstructCompiler):
+ * src/compiler/CodeGenHLSL.cpp:
+ (ConstructCompiler):
+ * src/compiler/Compiler.cpp:
+ (TCompiler::compile):
+ (TCompiler::mapLongVariableNames):
+ (TCompiler::getMappedNameMaxLength):
+ (TCompiler::getExtensionBehavior):
+ * src/compiler/ConstantUnion.h:
+ (ConstantUnion::operator==):
+ (ConstantUnion::operator>):
+ (ConstantUnion::operator<):
+ * src/compiler/ExtensionBehavior.h:
+ (getBehaviorString):
+ * src/compiler/ForLoopUnroll.cpp: Added.
+ (ForLoopUnroll::FillLoopIndexInfo):
+ (ForLoopUnroll::Step):
+ (ForLoopUnroll::SatisfiesLoopCondition):
+ (ForLoopUnroll::NeedsToReplaceSymbolWithValue):
+ (ForLoopUnroll::GetLoopIndexValue):
+ (ForLoopUnroll::Push):
+ (ForLoopUnroll::Pop):
+ (ForLoopUnroll::getLoopIncrement):
+ (ForLoopUnroll::evaluateIntConstant):
+ * src/compiler/ForLoopUnroll.h: Added.
+ (ForLoopUnroll::ForLoopUnroll):
+ * src/compiler/Initialize.cpp:
+ (BuiltInFunctionsVertex):
+ * src/compiler/MapLongVariableNames.cpp: Added.
+ (MapLongVariableNames::MapLongVariableNames):
+ (MapLongVariableNames::visitSymbol):
+ (MapLongVariableNames::visitConstantUnion):
+ (MapLongVariableNames::visitBinary):
+ (MapLongVariableNames::visitUnary):
+ (MapLongVariableNames::visitSelection):
+ (MapLongVariableNames::visitAggregate):
+ (MapLongVariableNames::visitLoop):
+ (MapLongVariableNames::visitBranch):
+ (MapLongVariableNames::mapVaryingLongName):
+ * src/compiler/MapLongVariableNames.h: Added.
+ * src/compiler/OutputESSL.cpp: Added.
+ (TOutputESSL::TOutputESSL):
+ (TOutputESSL::writeVariablePrecision):
+ * src/compiler/OutputESSL.h: Added.
+ * src/compiler/OutputGLSL.cpp:
+ (TOutputGLSL::TOutputGLSL):
+ (TOutputGLSL::writeVariablePrecision):
+ * src/compiler/OutputGLSL.h:
+ * src/compiler/OutputGLSLBase.cpp: Added.
+ (TOutputGLSLBase::TOutputGLSLBase):
+ (TOutputGLSLBase::writeTriplet):
+ (TOutputGLSLBase::writeVariableType):
+ (TOutputGLSLBase::writeFunctionParameters):
+ (TOutputGLSLBase::writeConstantUnion):
+ (TOutputGLSLBase::visitSymbol):
+ (TOutputGLSLBase::visitConstantUnion):
+ (TOutputGLSLBase::visitBinary):
+ (TOutputGLSLBase::visitUnary):
+ (TOutputGLSLBase::visitSelection):
+ (TOutputGLSLBase::visitAggregate):
+ (TOutputGLSLBase::visitLoop):
+ (TOutputGLSLBase::visitBranch):
+ (TOutputGLSLBase::visitCodeBlock):
+ * src/compiler/OutputGLSLBase.h: Added.
+ (TOutputGLSLBase::objSink):
+ * src/compiler/OutputHLSL.cpp:
+ (sh::OutputHLSL::OutputHLSL):
+ (sh::OutputHLSL::header):
+ (sh::OutputHLSL::visitUnary):
+ (sh::OutputHLSL::visitAggregate):
+ (sh::OutputHLSL::visitSelection):
+ (sh::OutputHLSL::visitLoop):
+ (sh::OutputHLSL::visitBranch):
+ (sh::OutputHLSL::handleExcessiveLoop):
+ (sh::OutputHLSL::outputLineDirective):
+ * src/compiler/OutputHLSL.h:
+ * src/compiler/ParseHelper.cpp:
+ (TParseContext::precisionErrorCheck):
+ (TParseContext::constructorErrorCheck):
+ (TParseContext::nonInitErrorCheck):
+ * src/compiler/ParseHelper.h:
+ (TParseContext::TParseContext):
+ * src/compiler/ShHandle.h:
+ * src/compiler/ShaderLang.cpp:
+ (getVariableInfo):
+ (ShConstructCompiler):
+ (ShGetInfo):
+ (ShGetActiveAttrib):
+ (ShGetActiveUniform):
+ * src/compiler/TranslatorESSL.cpp: Added.
+ (TranslatorESSL::TranslatorESSL):
+ (TranslatorESSL::translate):
+ (TranslatorESSL::writeExtensionBehavior):
+ * src/compiler/TranslatorESSL.h: Added.
+ * src/compiler/ValidateLimitations.cpp:
+ (ValidateLimitations::visitBinary):
+ (ValidateLimitations::visitLoop):
+ * src/compiler/ValidateLimitations.h:
+ * src/compiler/VariableInfo.cpp:
+ (getVariableInfo):
+ (getBuiltInVariableInfo):
+ (getUserDefinedVariableInfo):
+ (CollectAttribsUniforms::visitAggregate):
+ * src/compiler/VariableInfo.h:
+ * src/compiler/VersionGLSL.cpp:
+ (TVersionGLSL::visitSymbol):
+ (TVersionGLSL::visitConstantUnion):
+ (TVersionGLSL::visitBinary):
+ (TVersionGLSL::visitUnary):
+ (TVersionGLSL::visitSelection):
+ (TVersionGLSL::visitAggregate):
+ (TVersionGLSL::visitLoop):
+ (TVersionGLSL::visitBranch):
+ * src/compiler/VersionGLSL.h:
+ * src/compiler/glslang.y:
+ * src/compiler/glslang_tab.cpp:
+ * src/compiler/glslang_tab.h:
+ * src/compiler/intermediate.h:
+ (TIntermLoop::TIntermLoop):
+ (TIntermLoop::setUnrollFlag):
+ (TIntermLoop::getUnrollFlag):
+ (TIntermSymbol::TIntermSymbol):
+ (TIntermSymbol::setId):
+ (TIntermSymbol::setSymbol):
+ (TIntermSymbol::getOriginalSymbol):
+ (TIntermAggregate::TIntermAggregate):
+ (TIntermAggregate::setEndLine):
+ (TIntermAggregate::getEndLine):
+ * src/compiler/preprocessor/atom.c:
+ (AddString):
+ * src/compiler/preprocessor/compile.h:
+ * src/compiler/preprocessor/cpp.c:
+ (CPPelse):
+ (eval):
+ (CPPif):
+ (CPPifdef):
+ (readCPPline):
+ (ChkCorrectElseNesting):
+ * src/compiler/preprocessor/cppstruct.c:
+ (ResetPreprocessor):
+ * src/compiler/preprocessor/scanner.c:
+ (byte_scan):
+ (yylex_CPP):
+ * src/compiler/preprocessor/scanner.h:
+ * src/libEGL/Config.cpp:
+ (egl::Config::Config):
+ (egl::Config::set):
+ (egl::ConfigSet::add):
+ (egl::ConfigSet::getConfigs):
+ * src/libEGL/Config.h:
+ * src/libEGL/Display.cpp:
+ (egl::Display::Display):
+ (egl::Display::initialize):
+ (egl::Display::terminate):
+ (egl::Display::getConfigAttrib):
+ (egl::Display::createDevice):
+ (egl::Display::createWindowSurface):
+ (egl::Display::createOffscreenSurface):
+ (egl::Display::createContext):
+ (egl::Display::destroyContext):
+ (egl::Display::isInitialized):
+ (egl::Display::getAdapterIdentifier):
+ (egl::Display::isDeviceLost):
+ (egl::Display::getBufferPool):
+ (egl::Display::initExtensionString):
+ (egl::Display::getExtensionString):
+ (egl::Display::getVertexTextureSupport):
+ (egl::Display::getNonPower2TextureSupport):
+ * src/libEGL/Display.h:
+ (egl::Display::isD3d9ExDevice):
+ * src/libEGL/Surface.cpp:
+ (egl::Surface::Surface):
+ (egl::Surface::initialize):
+ (egl::Surface::release):
+ (egl::Surface::resetSwapChain):
+ (egl::SurfaceWindowProc):
+ (egl::Surface::subclassWindow):
+ (egl::Surface::unsubclassWindow):
+ (egl::Surface::swap):
+ (egl::Surface::getRenderTarget):
+ (egl::Surface::getOffscreenTexture):
+ (egl::Surface::getTextureFormat):
+ (egl::Surface::getTextureTarget):
+ (egl::Surface::setBoundTexture):
+ (egl::Surface::getBoundTexture):
+ (egl::Surface::getFormat):
+ * src/libEGL/Surface.h:
+ (egl::Surface::getShareHandle):
+ * src/libEGL/libEGL.cpp:
+ (validateDisplay):
+ (validateConfig):
+ (validateContext):
+ (validateSurface):
+ * src/libEGL/libEGL.rc: Added.
+ * src/libEGL/libEGL.vcproj:
+ * src/libEGL/main.cpp:
+ (DllMain):
+ * src/libEGL/main.h:
+ * src/libEGL/resource.h: Added.
+ * src/libGLESv2/Blit.cpp:
+ (gl::Blit::initGeometry):
+ (gl::Blit::copy):
+ * src/libGLESv2/Blit.h:
+ * src/libGLESv2/Buffer.cpp:
+ (gl::Buffer::Buffer):
+ (gl::Buffer::~Buffer):
+ (gl::Buffer::bufferData):
+ (gl::Buffer::bufferSubData):
+ (gl::Buffer::getStaticVertexBuffer):
+ (gl::Buffer::getStaticIndexBuffer):
+ (gl::Buffer::invalidateStaticData):
+ (gl::Buffer::promoteStaticUsage):
+ * src/libGLESv2/Buffer.h:
+ * src/libGLESv2/Context.cpp:
+ (gl::Context::Context):
+ (gl::Context::~Context):
+ (gl::Context::makeCurrent):
+ (gl::Context::markAllStateDirty):
+ (gl::Context::setActiveSampler):
+ (gl::Context::createFramebuffer):
+ (gl::Context::createFence):
+ (gl::Context::deleteFramebuffer):
+ (gl::Context::deleteFence):
+ (gl::Context::bindTexture2D):
+ (gl::Context::bindTextureCubeMap):
+ (gl::Context::getTexture2D):
+ (gl::Context::getTextureCubeMap):
+ (gl::Context::getSamplerTexture):
+ (gl::Context::getIntegerv):
+ (gl::Context::applyRenderTarget):
+ (gl::Context::applyState):
+ (gl::Context::applyVertexBuffer):
+ (gl::Context::applyShaders):
+ (gl::Context::applyTextures):
+ (gl::Context::readPixels):
+ (gl::Context::clear):
+ (gl::Context::drawArrays):
+ (gl::Context::drawElements):
+ (gl::Context::finish):
+ (gl::Context::flush):
+ (gl::Context::drawClosingLine):
+ (gl::Context::getMaximumVertexTextureImageUnits):
+ (gl::Context::getMaximumCombinedTextureImageUnits):
+ (gl::Context::supportsNonPower2Texture):
+ (gl::Context::detachTexture):
+ (gl::Context::getIncompleteTexture):
+ (gl::Context::initExtensionString):
+ (gl::Context::blitFramebuffer):
+ (gl::VertexDeclarationCache::VertexDeclarationCache):
+ (gl::VertexDeclarationCache::~VertexDeclarationCache):
+ (gl::VertexDeclarationCache::applyDeclaration):
+ * src/libGLESv2/Context.h:
+ * src/libGLESv2/Framebuffer.cpp:
+ (gl::Framebuffer::lookupRenderbuffer):
+ (gl::Framebuffer::completeness):
+ * src/libGLESv2/Framebuffer.h:
+ * src/libGLESv2/HandleAllocator.cpp: Added.
+ (gl::HandleAllocator::HandleAllocator):
+ (gl::HandleAllocator::~HandleAllocator):
+ (gl::HandleAllocator::setBaseHandle):
+ (gl::HandleAllocator::allocate):
+ (gl::HandleAllocator::release):
+ * src/libGLESv2/HandleAllocator.h: Added.
+ * src/libGLESv2/IndexDataManager.cpp: Added.
+ (gl::IndexDataManager::IndexDataManager):
+ (gl::IndexDataManager::~IndexDataManager):
+ (gl::convertIndices):
+ (gl::computeRange):
+ (gl::IndexDataManager::prepareIndexData):
+ (gl::IndexDataManager::indexSize):
+ (gl::IndexDataManager::typeSize):
+ (gl::IndexBuffer::IndexBuffer):
+ (gl::IndexBuffer::~IndexBuffer):
+ (gl::IndexBuffer::getBuffer):
+ (gl::IndexBuffer::unmap):
+ (gl::StreamingIndexBuffer::StreamingIndexBuffer):
+ (gl::StreamingIndexBuffer::~StreamingIndexBuffer):
+ (gl::StreamingIndexBuffer::map):
+ (gl::StreamingIndexBuffer::reserveSpace):
+ (gl::StaticIndexBuffer::StaticIndexBuffer):
+ (gl::StaticIndexBuffer::~StaticIndexBuffer):
+ (gl::StaticIndexBuffer::map):
+ (gl::StaticIndexBuffer::reserveSpace):
+ (gl::StaticIndexBuffer::lookupType):
+ (gl::StaticIndexBuffer::lookupRange):
+ (gl::StaticIndexBuffer::addRange):
+ * src/libGLESv2/IndexDataManager.h: Added.
+ (gl::IndexBuffer::size):
+ * src/libGLESv2/Program.cpp:
+ (gl::Program::getSemanticIndex):
+ (gl::Program::getSamplerMapping):
+ (gl::Program::getSamplerTextureType):
+ (gl::Program::compileToBinary):
+ (gl::Program::packVaryings):
+ (gl::Program::linkVaryings):
+ (gl::Program::link):
+ (gl::Program::linkUniforms):
+ (gl::Program::defineUniform):
+ (gl::Program::applyUniform1iv):
+ (gl::Program::appendToInfoLogSanitized):
+ (gl::Program::unlink):
+ (gl::Program::getActiveUniformMaxLength):
+ (gl::Program::validate):
+ (gl::Program::validateSamplers):
+ * src/libGLESv2/Program.h:
+ * src/libGLESv2/Renderbuffer.cpp:
+ (gl::Renderbuffer::getWidth):
+ (gl::Renderbuffer::getHeight):
+ (gl::Renderbuffer::getInternalFormat):
+ (gl::Renderbuffer::getRedSize):
+ (gl::Renderbuffer::getGreenSize):
+ (gl::Renderbuffer::getBlueSize):
+ (gl::Renderbuffer::getAlphaSize):
+ (gl::Renderbuffer::getDepthSize):
+ (gl::Renderbuffer::getStencilSize):
+ (gl::Renderbuffer::getSamples):
+ (gl::RenderbufferStorage::RenderbufferStorage):
+ (gl::RenderbufferStorage::getWidth):
+ (gl::RenderbufferStorage::getHeight):
+ (gl::RenderbufferStorage::getInternalFormat):
+ (gl::RenderbufferStorage::getRedSize):
+ (gl::RenderbufferStorage::getGreenSize):
+ (gl::RenderbufferStorage::getBlueSize):
+ (gl::RenderbufferStorage::getAlphaSize):
+ (gl::RenderbufferStorage::getDepthSize):
+ (gl::RenderbufferStorage::getStencilSize):
+ (gl::RenderbufferStorage::getD3DFormat):
+ (gl::Colorbuffer::Colorbuffer):
+ (gl::Colorbuffer::getWidth):
+ (gl::Colorbuffer::getHeight):
+ (gl::Colorbuffer::getInternalFormat):
+ (gl::Colorbuffer::getType):
+ (gl::Colorbuffer::getD3DFormat):
+ (gl::Colorbuffer::isColorbuffer):
+ (gl::Colorbuffer::getRenderTarget):
+ (gl::DepthStencilbuffer::DepthStencilbuffer):
+ (gl::Depthbuffer::Depthbuffer):
+ (gl::Stencilbuffer::Stencilbuffer):
+ * src/libGLESv2/Renderbuffer.h:
+ * src/libGLESv2/ResourceManager.cpp:
+ (gl::ResourceManager::createBuffer):
+ (gl::ResourceManager::createShader):
+ (gl::ResourceManager::createProgram):
+ (gl::ResourceManager::createTexture):
+ (gl::ResourceManager::createRenderbuffer):
+ (gl::ResourceManager::deleteBuffer):
+ (gl::ResourceManager::deleteShader):
+ (gl::ResourceManager::deleteProgram):
+ (gl::ResourceManager::deleteTexture):
+ (gl::ResourceManager::deleteRenderbuffer):
+ (gl::ResourceManager::checkTextureAllocation):
+ * src/libGLESv2/ResourceManager.h:
+ * src/libGLESv2/Shader.cpp:
+ (gl::Shader::Shader):
+ (gl::Shader::compileToHLSL):
+ * src/libGLESv2/Shader.h:
+ * src/libGLESv2/Texture.cpp:
+ (gl::Texture::Image::Image):
+ (gl::Texture::Image::~Image):
+ (gl::Texture::Image::isRenderable):
+ (gl::Texture::Image::getD3DFormat):
+ (gl::Texture::Texture):
+ (gl::Texture::setMinFilter):
+ (gl::Texture::setMagFilter):
+ (gl::Texture::setWrapS):
+ (gl::Texture::setWrapT):
+ (gl::Texture::loadImageData):
+ (gl::Texture::loadAlphaImageData):
+ (gl::Texture::loadAlphaFloatImageData):
+ (gl::Texture::loadAlphaHalfFloatImageData):
+ (gl::Texture::loadLuminanceImageData):
+ (gl::Texture::loadLuminanceFloatImageData):
+ (gl::Texture::loadLuminanceHalfFloatImageData):
+ (gl::Texture::loadLuminanceAlphaImageData):
+ (gl::Texture::loadLuminanceAlphaFloatImageData):
+ (gl::Texture::loadLuminanceAlphaHalfFloatImageData):
+ (gl::Texture::loadRGBUByteImageData):
+ (gl::Texture::loadRGB565ImageData):
+ (gl::Texture::loadRGBFloatImageData):
+ (gl::Texture::loadRGBHalfFloatImageData):
+ (gl::Texture::loadRGBAUByteImageDataSSE2):
+ (gl::Texture::loadRGBAUByteImageData):
+ (gl::Texture::loadRGBA4444ImageData):
+ (gl::Texture::loadRGBA5551ImageData):
+ (gl::Texture::loadRGBAFloatImageData):
+ (gl::Texture::loadRGBAHalfFloatImageData):
+ (gl::Texture::loadBGRAImageData):
+ (gl::Texture::loadCompressedImageData):
+ (gl::Texture::createSurface):
+ (gl::Texture::setImage):
+ (gl::Texture::setCompressedImage):
+ (gl::Texture::subImage):
+ (gl::Texture::subImageCompressed):
+ (gl::Texture::copyToImage):
+ (gl::Texture::getTexture):
+ (gl::Texture::isDirtyParameter):
+ (gl::Texture::isDirtyImage):
+ (gl::Texture::resetDirty):
+ (gl::Texture::getSerial):
+ (gl::Texture::creationLevels):
+ (gl::Texture::levelCount):
+ (gl::Texture::issueSerial):
+ (gl::Texture2D::Texture2D):
+ (gl::Texture2D::~Texture2D):
+ (gl::Texture2D::getWidth):
+ (gl::Texture2D::getHeight):
+ (gl::Texture2D::getInternalFormat):
+ (gl::Texture2D::getType):
+ (gl::Texture2D::getD3DFormat):
+ (gl::Texture2D::redefineTexture):
+ (gl::Texture2D::setImage):
+ (gl::Texture2D::bindTexImage):
+ (gl::Texture2D::releaseTexImage):
+ (gl::Texture2D::setCompressedImage):
+ (gl::Texture2D::commitRect):
+ (gl::Texture2D::copyImage):
+ (gl::Texture2D::copySubImage):
+ (gl::Texture2D::isComplete):
+ (gl::Texture2D::isCompressed):
+ (gl::Texture2D::getBaseTexture):
+ (gl::Texture2D::createTexture):
+ (gl::Texture2D::updateTexture):
+ (gl::Texture2D::convertToRenderTarget):
+ (gl::Texture2D::generateMipmaps):
+ (gl::Texture2D::getRenderbuffer):
+ (gl::Texture2D::getRenderTarget):
+ (gl::TextureCubeMap::getWidth):
+ (gl::TextureCubeMap::getHeight):
+ (gl::TextureCubeMap::getInternalFormat):
+ (gl::TextureCubeMap::getType):
+ (gl::TextureCubeMap::getD3DFormat):
+ (gl::TextureCubeMap::setImagePosX):
+ (gl::TextureCubeMap::setImageNegX):
+ (gl::TextureCubeMap::setImagePosY):
+ (gl::TextureCubeMap::setImageNegY):
+ (gl::TextureCubeMap::setImagePosZ):
+ (gl::TextureCubeMap::setImageNegZ):
+ (gl::TextureCubeMap::setCompressedImage):
+ (gl::TextureCubeMap::commitRect):
+ (gl::TextureCubeMap::isComplete):
+ (gl::TextureCubeMap::isCompressed):
+ (gl::TextureCubeMap::getBaseTexture):
+ (gl::TextureCubeMap::createTexture):
+ (gl::TextureCubeMap::updateTexture):
+ (gl::TextureCubeMap::convertToRenderTarget):
+ (gl::TextureCubeMap::setImage):
+ (gl::TextureCubeMap::redefineTexture):
+ (gl::TextureCubeMap::copyImage):
+ (gl::TextureCubeMap::getCubeMapSurface):
+ (gl::TextureCubeMap::copySubImage):
+ (gl::TextureCubeMap::generateMipmaps):
+ (gl::TextureCubeMap::getRenderbuffer):
+ (gl::TextureCubeMap::getRenderTarget):
+ * src/libGLESv2/Texture.h:
+ * src/libGLESv2/VertexDataManager.cpp: Added.
+ (gl::VertexDataManager::VertexDataManager):
+ (gl::VertexDataManager::~VertexDataManager):
+ (gl::VertexDataManager::writeAttributeData):
+ (gl::VertexDataManager::prepareVertexData):
+ (gl::VertexDataManager::spaceRequired):
+ (gl::VertexDataManager::checkVertexCaps):
+ (gl::VertexDataManager::typeIndex):
+ (gl::VertexBuffer::VertexBuffer):
+ (gl::VertexBuffer::~VertexBuffer):
+ (gl::VertexBuffer::unmap):
+ (gl::VertexBuffer::getBuffer):
+ (gl::ConstantVertexBuffer::ConstantVertexBuffer):
+ (gl::ConstantVertexBuffer::~ConstantVertexBuffer):
+ (gl::ArrayVertexBuffer::ArrayVertexBuffer):
+ (gl::ArrayVertexBuffer::~ArrayVertexBuffer):
+ (gl::ArrayVertexBuffer::addRequiredSpace):
+ (gl::ArrayVertexBuffer::addRequiredSpaceFor):
+ (gl::StreamingVertexBuffer::StreamingVertexBuffer):
+ (gl::StreamingVertexBuffer::~StreamingVertexBuffer):
+ (gl::StreamingVertexBuffer::map):
+ (gl::StreamingVertexBuffer::reserveRequiredSpace):
+ (gl::StaticVertexBuffer::StaticVertexBuffer):
+ (gl::StaticVertexBuffer::~StaticVertexBuffer):
+ (gl::StaticVertexBuffer::map):
+ (gl::StaticVertexBuffer::reserveRequiredSpace):
+ (gl::StaticVertexBuffer::lookupAttribute):
+ (gl::VertexDataManager::formatConverter):
+ * src/libGLESv2/VertexDataManager.h: Added.
+ (gl::ArrayVertexBuffer::size):
+ (gl::VertexDataManager::dirtyCurrentValue):
+ * src/libGLESv2/libGLESv2.cpp:
+ (validImageSize):
+ (Extension::glBindTexImage):
+ * src/libGLESv2/libGLESv2.def:
+ * src/libGLESv2/libGLESv2.rc: Added.
+ * src/libGLESv2/libGLESv2.vcproj:
+ * src/libGLESv2/main.cpp:
+ (error):
+ * src/libGLESv2/mathutil.h:
+ (gl::clamp):
+ (gl::clamp01):
+ (gl::transformPixelRect):
+ (gl::transformPixelYOffset):
+ (gl::adjustWinding):
+ (gl::supportsSSE2):
+ * src/libGLESv2/resource.h: Added.
+ * src/libGLESv2/utilities.cpp:
+ (gl::ComputeCompressedPitch):
+ (es2dx::ConvertCubeFace):
+ (es2dx::ConvertPrimitiveType):
+ (es2dx::ConvertRenderbufferFormat):
+ (es2dx::GetMultisampleTypeFromSamples):
+ (dx2es::GetStencilSize):
+ (dx2es::GetAlphaSize):
+ (dx2es::GetRedSize):
+ (dx2es::GetGreenSize):
+ (dx2es::GetBlueSize):
+ (dx2es::GetDepthSize):
+ (getTempPath):
+ (writeFile):
+ * src/libGLESv2/utilities.h:
+ * src/libGLESv2/vertexconversion.h: Added.
+ (gl::Identity::convert):
+ (gl::Cast::convert):
+ (gl::Normalize::convert):
+ (gl::FixedToFloat::convert):
+ (gl::SimpleDefaultValues::zero):
+ (gl::SimpleDefaultValues::one):
+ (gl::NormalizedDefaultValues::zero):
+ (gl::NormalizedDefaultValues::one):
+ (gl::VertexDataConverter::convertArray):
+ (gl::VertexDataConverter::pointerAddBytes):
+ (gl::VertexDataConverter::copyComponent):
+
+2011-05-24 David Kilzer <ddkilzer@apple.com>
+
+ Part 2 of 2: <http://webkit.org/b/60805> Enable -Wnewline-eof on ANGLE
+
+ Reviewed by Adam Roben.
+
+ * Configurations/Base.xcconfig:
+ (GCC_WARN_ABOUT_MISSING_NEWLINE): Added. Set to YES.
+
+2011-05-23 David Kilzer <ddkilzer@apple.com>
+
+ Part 1 of 2: <http://webkit.org/b/60805> Enable -Wnewline-eof on ANGLE
+
+ Merge ANGLE upstream commit r653 for Issue 154.
+
+ * src/compiler/PoolAlloc.h: Added newline to end of file.
+ * src/compiler/ShHandle.h: Ditto.
+ * src/libEGL/Display.cpp: Ditto.
+
+2011-05-16 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
+ <rdar://problem/9446430>
+
+ Reviewed by Mark Rowe.
+
+ * Configurations/Base.xcconfig: Fixed typo.
+
+2011-05-04 David Kilzer <ddkilzer@apple.com>
+
+ Part 2 of 2: <http://webkit.org/b/56337> Enable -Werror on ANGLE
+
+ Reviewed by Adam Barth.
+
+ * Configurations/Base.xcconfig:
+ (GCC_TREAT_WARNINGS_AS_ERRORS): Set to YES.
+
+2011-05-04 David Kilzer <ddkilzer@apple.com>
+
+ Part 1 of 2: <http://webkit.org/b/56337> Enable -Werror on ANGLE
+
+ Merge ANGLE upstream commits r572, r573, r574, r575.
+
+ This unblocks enabling -Werror on ANGLE. Since all changes are
+ in the upstream repository, they may be safely overwritten
+ during the next ANGLE update.
+
+ * src/compiler/ConstantUnion.h:
+ (ConstantUnion::operator==): Added a default case.
+ * src/compiler/Intermediate.cpp:
+ (TIntermBinary::promote): Added parentheses.
+ * src/compiler/ParseHelper.cpp:
+ (TParseContext::precisionErrorCheck): Added a default case.
+ * src/compiler/PoolAlloc.cpp:
+ (TAllocation::checkGuardBlock): Changed '%u' to '%lu' for size_t
+ variable. Put for loop inside #ifdef GUARD_BLOCKS/#endif macros
+ to fix tautological-compare warning.
+ (TAllocation::checkAllocList): Added newline to end of file.
+
+2011-04-26 Dan Bernstein <mitz@apple.com>
+
+ Build fix.
+
+ * Configurations/CompilerVersion.xcconfig:
+
+2011-04-26 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Mark Rowe.
+
+ Choose the compiler based on the Xcode version for Snow Leopard debug builds.
+
+ * Configurations/Base.xcconfig:
+ * Configurations/CompilerVersion.xcconfig: Added.
+
2011-03-17 Jeff Miller <jeffm@apple.com>
Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
diff --git a/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig b/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig
index c26baad..505a57d 100644
--- a/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig
+++ b/Source/ThirdParty/ANGLE/Configurations/Base.xcconfig
@@ -1,7 +1,10 @@
+#include "CompilerVersion.xcconfig"
+
DEAD_CODE_STRIPPING = YES;
-DEBUG_INFORMATION_FORMAT = dwarf;
+DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DEBUGGING_SYMBOLS = default;
+GCC_ENABLE_CPP_EXCEPTIONS = NO;
GCC_ENABLE_CPP_RTTI = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_ENABLE_OBJC_GC = supported;
@@ -14,51 +17,36 @@ GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_THREADSAFE_STATICS = NO;
-GCC_TREAT_WARNINGS_AS_ERRORS = NO;
+GCC_TREAT_WARNINGS_AS_ERRORS = YES;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
LINKER_DISPLAYS_MANGLED_NAMES = YES;
PREBINDING = NO;
STRIP_INSTALLED_PRODUCT = NO;
+CLANG_CXX_LIBRARY = $(CLANG_CXX_LIBRARY_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+CLANG_CXX_LIBRARY_1060 = libstdc++;
+CLANG_CXX_LIBRARY_1070 = libc++;
+CLANG_CXX_LIBRARY_1080 = libc++;
+CLANG_CXX_LIBRARY_1090 = libc++;
-TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR);
-
-
-// Use GCC 4.2 with Xcode 3.1, which includes GCC 4.2 but defaults to GCC 4.0.
-// Note that Xcode versions as new as 3.1.2 use XCODE_VERSION_ACTUAL for the minor version
-// number. Newer versions of Xcode use XCODE_VERSION_MINOR for the minor version, and
-// XCODE_VERSION_ACTUAL for the full version number.
-TARGET_GCC_VERSION = $(TARGET_GCC_VERSION_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-TARGET_GCC_VERSION_ = $(TARGET_GCC_VERSION_1040);
-TARGET_GCC_VERSION_1040 = GCC_40;
-TARGET_GCC_VERSION_1050 = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_MINOR));
-TARGET_GCC_VERSION_1050_ = $(TARGET_GCC_VERSION_1050_$(XCODE_VERSION_ACTUAL));
-TARGET_GCC_VERSION_1050_0310 = GCC_42;
-TARGET_GCC_VERSION_1050_0320 = GCC_42;
-TARGET_GCC_VERSION_1060 = GCC_42;
-TARGET_GCC_VERSION_1070 = $(TARGET_GCC_VERSION_1070_$(CONFIGURATION));
-TARGET_GCC_VERSION_1070_Debug = LLVM_COMPILER;
-TARGET_GCC_VERSION_1070_Release = LLVM_GCC_42;
-TARGET_GCC_VERSION_1070_Production = LLVM_GCC_42;
-
-GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION));
-GCC_VERSION_GCC_40 = 4.0;
-GCC_VERSION_GCC_42 = 4.2;
-GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42;
-GCC_VERSION_LLVM_COMPILER = com.apple.compilers.llvm.clang.1_0;
+REAL_PLATFORM_NAME = $(REAL_PLATFORM_NAME_$(PLATFORM_NAME));
+REAL_PLATFORM_NAME_ = $(REAL_PLATFORM_NAME_macosx);
+REAL_PLATFORM_NAME_iphoneos = iphoneos;
+REAL_PLATFORM_NAME_iphonesimulator = iphonesimulator;
+REAL_PLATFORM_NAME_macosx = macosx;
-// FIXME: Disable C++ exceptions in the LLVM Compiler once it supports enabling Obj-C exceptions without C++ exceptions.
-GCC_ENABLE_CPP_EXCEPTIONS = $(GCC_ENABLE_CPP_EXCEPTIONS_$(TARGET_GCC_VERSION));
-GCC_ENABLE_CPP_EXCEPTIONS_GCC_40 = NO;
-GCC_ENABLE_CPP_EXCEPTIONS_GCC_42 = NO;
-GCC_ENABLE_CPP_EXCEPTIONS_LLVM_GCC = NO;
-GCC_ENABLE_CPP_EXCEPTIONS_LLVM_COMPILER = YES;
+TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR);
// If the target Mac OS X version does not match the current Mac OS X version then we'll want to build using the target version's SDK.
SDKROOT = $(SDKROOT_$(MAC_OS_X_VERSION_MAJOR)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-SDKROOT_1050_1040 = macosx10.4internal;
-SDKROOT_1060_1040 = macosx10.4internal;
-SDKROOT_1060_1050 = macosx10.5internal;
-SDKROOT_1070_1040 = macosx10.4internal;
-SDKROOT_1070_1050 = macosx10.5internal;
-SDKROOT_1070_1060 = macosx10.6internal;
+SDKROOT_1060_1050 = macosx10.5;
+SDKROOT_1070_1050 = macosx10.5;
+SDKROOT_1080_1050 = macosx10.5;
+SDKROOT_1090_1050 = macosx10.5;
+SDKROOT_1070_1060 = macosx10.6;
+SDKROOT_1080_1060 = macosx10.6;
+SDKROOT_1090_1060 = macosx10.6;
+SDKROOT_1080_1070 = macosx10.7;
+SDKROOT_1090_1070 = macosx10.7;
+SDKROOT_1090_1080 = macosx10.8;
diff --git a/Source/ThirdParty/ANGLE/Configurations/CompilerVersion.xcconfig b/Source/ThirdParty/ANGLE/Configurations/CompilerVersion.xcconfig
new file mode 100644
index 0000000..a8c7f75
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/Configurations/CompilerVersion.xcconfig
@@ -0,0 +1,84 @@
+// Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+IS_XCODE_0400 = $(IS_XCODE_0400_$(XCODE_VERSION_MINOR));
+IS_XCODE_0400_0400 = YES;
+
+IS_XCODE_0400_OR_0410 = $(IS_XCODE_0400_OR_0410_$(XCODE_VERSION_MINOR));
+IS_XCODE_0400_OR_0410_0400 = YES;
+IS_XCODE_0400_OR_0410_0410 = YES;
+
+// The version of the LLVM Compiler in Xcode 4.0 and earlier have difficulty compiling our code.
+LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS = $(LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_$(XCODE_VERSION_MAJOR));
+LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_0300 = YES;
+LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_0400 = $(LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_IS_XCODE_0400_$(IS_XCODE_0400));
+LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_IS_XCODE_0400_YES = YES;
+
+// The version of the LLVM Compiler in Xcode 4.1 and earlier do not generate fast enough code.
+LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS = $(LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_$(XCODE_VERSION_MAJOR));
+LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_0300 = YES;
+LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_0400 = $(LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_IS_XCODE_0400_OR_0410_$(IS_XCODE_0400_OR_0410));
+LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_IS_XCODE_0400_OR_0410_YES = YES;
+
+LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS = $(LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS_$(LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS));
+LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS_ = YES;
+LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS_YES = NO;
+
+LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS = $(LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS_$(LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS));
+LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS_ = YES;
+LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS_YES = NO;
+
+
+// Use GCC 4.2 with Xcode 3.1, which includes GCC 4.2 but defaults to GCC 4.0.
+// Note that Xcode versions as new as 3.1.2 use XCODE_VERSION_ACTUAL for the minor version
+// number. Newer versions of Xcode use XCODE_VERSION_MINOR for the minor version, and
+// XCODE_VERSION_ACTUAL for the full version number.
+TARGET_GCC_VERSION = $(TARGET_GCC_VERSION_$(REAL_PLATFORM_NAME));
+TARGET_GCC_VERSION_iphoneos = LLVM_GCC_42;
+TARGET_GCC_VERSION_iphonesimulator = GCC_42;
+TARGET_GCC_VERSION_macosx = $(TARGET_GCC_VERSION_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+
+TARGET_GCC_VERSION_macosx_1050 = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSION_MINOR));
+TARGET_GCC_VERSION_macosx_1050_ = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSION_ACTUAL));
+TARGET_GCC_VERSION_macosx_1050_0310 = GCC_42;
+TARGET_GCC_VERSION_macosx_1050_0320 = GCC_42;
+
+TARGET_GCC_VERSION_macosx_1060 = $(TARGET_GCC_VERSION_macosx_1060_AND_1070_$(CONFIGURATION));
+TARGET_GCC_VERSION_macosx_1070 = $(TARGET_GCC_VERSION_macosx_1060_AND_1070_$(CONFIGURATION));
+TARGET_GCC_VERSION_macosx_1060_AND_1070_Debug = $(TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_$(LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS));
+TARGET_GCC_VERSION_macosx_1060_AND_1070_Release = $(TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_$(LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS));
+TARGET_GCC_VERSION_macosx_1060_AND_1070_Production = $(TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_$(LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS));
+TARGET_GCC_VERSION_macosx_1060_NON_LLVM_FALLBACK = GCC_42;
+TARGET_GCC_VERSION_macosx_1070_NON_LLVM_FALLBACK = LLVM_GCC_42;
+
+TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_YES = LLVM_COMPILER;
+TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_NO = $(TARGET_GCC_VERSION_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)_NON_LLVM_FALLBACK);
+
+TARGET_GCC_VERSION_macosx_1080 = LLVM_COMPILER;
+TARGET_GCC_VERSION_macosx_1090 = LLVM_COMPILER;
+
+GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION));
+GCC_VERSION_GCC_40 = 4.0;
+GCC_VERSION_GCC_42 = 4.2;
+GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42;
+GCC_VERSION_LLVM_COMPILER = com.apple.compilers.llvm.clang.1_0;
diff --git a/Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig b/Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig
index 2d92931..be088b8 100644
--- a/Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig
+++ b/Source/ThirdParty/ANGLE/Configurations/DebugRelease.xcconfig
@@ -1,19 +1,20 @@
#include "Base.xcconfig"
ARCHS = $(ARCHS_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-ARCHS_ = $(ARCHS_1040);
-ARCHS_1040 = $(NATIVE_ARCH);
ARCHS_1050 = $(NATIVE_ARCH);
ARCHS_1060 = $(ARCHS_STANDARD_32_64_BIT);
ARCHS_1070 = $(ARCHS_STANDARD_32_64_BIT);
+ARCHS_1080 = $(ARCHS_STANDARD_32_64_BIT);
+ARCHS_1090 = $(ARCHS_STANDARD_32_64_BIT);
ONLY_ACTIVE_ARCH = YES;
MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(TARGET_MAC_OS_X_VERSION_MAJOR));
-MACOSX_DEPLOYMENT_TARGET_ = 10.4;
-MACOSX_DEPLOYMENT_TARGET_1040 = 10.4;
MACOSX_DEPLOYMENT_TARGET_1050 = 10.5;
MACOSX_DEPLOYMENT_TARGET_1060 = 10.6;
MACOSX_DEPLOYMENT_TARGET_1070 = 10.7;
+MACOSX_DEPLOYMENT_TARGET_1080 = 10.8;
+MACOSX_DEPLOYMENT_TARGET_1090 = 10.9;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+DEBUG_INFORMATION_FORMAT = dwarf;
diff --git a/Source/ThirdParty/ANGLE/include/EGL/eglext.h b/Source/ThirdParty/ANGLE/include/EGL/eglext.h
index 638e336..b670840 100644
--- a/Source/ThirdParty/ANGLE/include/EGL/eglext.h
+++ b/Source/ThirdParty/ANGLE/include/EGL/eglext.h
@@ -6,7 +6,7 @@ extern "C" {
#endif
/*
-** Copyright (c) 2007-2009 The Khronos Group Inc.
+** Copyright (c) 2007-2012 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
@@ -34,8 +34,8 @@ extern "C" {
/* 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
+/* $Revision: 16473 $ on $Date: 2012-01-04 02:20:48 -0800 (Wed, 04 Jan 2012) $ */
+#define EGL_EGLEXT_VERSION 11
#ifndef EGL_KHR_config_attribs
#define EGL_KHR_config_attribs 1
@@ -120,6 +120,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
#endif
+#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
#ifndef EGL_KHR_reusable_sync
#define EGL_KHR_reusable_sync 1
@@ -149,6 +150,7 @@ typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSy
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
#endif
+#endif
#ifndef EGL_KHR_image_base
#define EGL_KHR_image_base 1
@@ -169,19 +171,25 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
#endif
+#ifndef EGL_KHR_lock_surface2
+#define EGL_KHR_lock_surface2 1
+#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
+#endif
+
#ifndef EGL_NV_coverage_sample
#define EGL_NV_coverage_sample 1
-#define EGL_COVERAGE_BUFFERS_NV 0x30E0
-#define EGL_COVERAGE_SAMPLES_NV 0x30E1
+#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_NV 0x30E2
#define EGL_DEPTH_ENCODING_NONE_NV 0
-#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
+#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
#endif
+#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */
#ifndef EGL_NV_sync
#define EGL_NV_sync 1
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
@@ -198,7 +206,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
#define EGL_SYNC_FENCE_NV 0x30EF
#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
typedef void* EGLSyncNV;
-typedef unsigned long long EGLTimeNV;
+typedef khronos_utime_nanoseconds_t EGLTimeNV;
#ifdef EGL_EGLEXT_PROTOTYPES
EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
@@ -214,6 +222,124 @@ typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
#endif
+#endif
+
+#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */
+#ifndef EGL_KHR_fence_sync
+#define EGL_KHR_fence_sync 1
+/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
+#define EGL_SYNC_CONDITION_KHR 0x30F8
+#define EGL_SYNC_FENCE_KHR 0x30F9
+#endif
+#endif
+
+#ifndef EGL_HI_clientpixmap
+#define EGL_HI_clientpixmap 1
+
+/* Surface Attribute */
+#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74
+/*
+ * Structure representing a client pixmap
+ * (pixmap's data is in client-space memory).
+ */
+struct EGLClientPixmapHI
+{
+ void* pData;
+ EGLint iWidth;
+ EGLint iHeight;
+ EGLint iStride;
+};
+
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
+#endif /* EGL_HI_clientpixmap */
+
+#ifndef EGL_HI_colorformats
+#define EGL_HI_colorformats 1
+/* Config Attribute */
+#define EGL_COLOR_FORMAT_HI 0x8F70
+/* Color Formats */
+#define EGL_COLOR_RGB_HI 0x8F71
+#define EGL_COLOR_RGBA_HI 0x8F72
+#define EGL_COLOR_ARGB_HI 0x8F73
+#endif /* EGL_HI_colorformats */
+
+#ifndef EGL_MESA_drm_image
+#define EGL_MESA_drm_image 1
+#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */
+#define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */
+#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */
+#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */
+#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
+#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */
+#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 /* EGL_DRM_BUFFER_USE_MESA bits */
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
+#endif
+
+#ifndef EGL_NV_post_sub_buffer
+#define EGL_NV_post_sub_buffer 1
+#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
+#endif
+
+#ifndef EGL_ANGLE_query_surface_pointer
+#define EGL_ANGLE_query_surface_pointer 1
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
+#endif
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value);
+#endif
+
+#ifndef EGL_ANGLE_software_display
+#define EGL_ANGLE_software_display 1
+#define EGL_SOFTWARE_DISPLAY_ANGLE ((EGLNativeDisplayType)-1)
+#endif
+
+#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
+#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
+#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
+#endif
+
+#ifndef EGL_NV_coverage_sample_resolve
+#define EGL_NV_coverage_sample_resolve 1
+#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131
+#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
+#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
+#endif
+
+#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
+#ifndef EGL_NV_system_time
+#define EGL_NV_system_time 1
+
+typedef khronos_utime_nanoseconds_t EGLuint64NV;
+
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
+#endif
+#endif
+
+#ifndef EGL_EXT_create_context_robustness
+#define EGL_EXT_create_context_robustness 1
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
+#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
+#endif
#ifdef __cplusplus
}
diff --git a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h
index 22e855f..34283f2 100644
--- a/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h
+++ b/Source/ThirdParty/ANGLE/include/EGL/eglplatform.h
@@ -25,7 +25,7 @@
*/
/* Platform-specific types and definitions for egl.h
- * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
+ * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
*
* 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
@@ -60,6 +60,11 @@
* 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".
+ *
+ * Khronos STRONGLY RECOMMENDS that you use the default definitions
+ * provided below, since these changes affect both binary and source
+ * portability of applications using EGL running on different EGL
+ * implementations.
*/
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
@@ -78,7 +83,13 @@ typedef int EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;
-#elif defined(__unix__)
+#elif defined(WL_EGL_PLATFORM)
+
+typedef struct wl_display *EGLNativeDisplayType;
+typedef struct wl_egl_pixmap *EGLNativePixmapType;
+typedef struct wl_egl_window *EGLNativeWindowType;
+
+#elif defined(__unix__) && !defined(ANDROID)
/* X11 (tentative) */
#include <X11/Xlib.h>
@@ -88,6 +99,14 @@ typedef Display *EGLNativeDisplayType;
typedef Pixmap EGLNativePixmapType;
typedef Window EGLNativeWindowType;
+#elif defined(ANDROID)
+
+struct egl_native_pixmap_t;
+
+typedef struct ANativeWindow* EGLNativeWindowType;
+typedef struct egl_native_pixmap_t* EGLNativePixmapType;
+typedef void* EGLNativeDisplayType;
+
#else
#error "Platform not recognized"
#endif
diff --git a/Source/ThirdParty/ANGLE/include/GLES2/gl2ext.h b/Source/ThirdParty/ANGLE/include/GLES2/gl2ext.h
index 01844de..a124014 100644
--- a/Source/ThirdParty/ANGLE/include/GLES2/gl2ext.h
+++ b/Source/ThirdParty/ANGLE/include/GLES2/gl2ext.h
@@ -1,7 +1,7 @@
#ifndef __gl2ext_h_
#define __gl2ext_h_
-/* $Revision: 10798 $ on $Date:: 2010-03-19 17:34:30 -0700 #$ */
+/* $Revision: 16482 $ on $Date:: 2012-01-04 13:44:55 -0500 #$ */
#ifdef __cplusplus
extern "C" {
@@ -57,6 +57,15 @@ extern "C" {
typedef void* GLeglImageOES;
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+/* GLeglImageOES defined in GL_OES_EGL_image already. */
+#define GL_TEXTURE_EXTERNAL_OES 0x8D65
+#define GL_SAMPLER_EXTERNAL_OES 0x8D66
+#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_UNSIGNED_INT 0x1405
@@ -180,6 +189,100 @@ typedef void* GLeglImageOES;
#endif
/*------------------------------------------------------------------------*
+ * ANGLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
+#define GL_MAX_SAMPLES_ANGLE 0x8D57
+#endif
+
+/* GL_ANGLE_pack_reverse_row_order */
+#ifndef GL_ANGLE_pack_reverse_row_order
+#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
+#endif
+
+/* GL_ANGLE_texture_compression_dxt3 */
+#ifndef GL_ANGLE_texture_compression_dxt3
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
+#endif
+
+/* GL_ANGLE_texture_compression_dxt5 */
+#ifndef GL_ANGLE_texture_compression_dxt5
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
+#endif
+
+/* GL_ANGLE_translated_shader_source */
+#ifndef GL_ANGLE_translated_shader_source
+#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
+#endif
+
+/* GL_ANGLE_texture_usage */
+#ifndef GL_ANGLE_texture_usage
+#define GL_TEXTURE_USAGE_ANGLE 0x93A2
+#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
+#endif
+
+/* GL_ANGLE_instanced_arrays */
+#ifndef GL_ANGLE_instanced_arrays
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE 0x88FE
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_RGB_422_APPLE 0x8A1F
+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
+#define GL_MAX_SAMPLES_APPLE 0x8D57
+#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_BGRA_EXT 0x80E1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_MALI_SHADER_BINARY_ARM 0x8F60
+#endif
+
+/* GL_ARM_rgba8 */
+/* No new tokens introduced by this extension. */
+
+/*------------------------------------------------------------------------*
* EXT extension tokens
*------------------------------------------------------------------------*/
@@ -189,6 +292,29 @@ typedef void* GLeglImageOES;
#define GL_MAX_EXT 0x8008
#endif
+/* GL_EXT_color_buffer_half_float */
+#ifndef GL_EXT_color_buffer_half_float
+#define GL_RGBA16F_EXT 0x881A
+#define GL_RGB16F_EXT 0x881B
+#define GL_RG16F_EXT 0x822F
+#define GL_R16F_EXT 0x822D
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
+#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
+#endif
+
+/* GL_EXT_debug_label */
+#ifndef GL_EXT_debug_label
+#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
+#define GL_PROGRAM_OBJECT_EXT 0x8B40
+#define GL_SHADER_OBJECT_EXT 0x8B48
+#define GL_BUFFER_OBJECT_EXT 0x9151
+#define GL_QUERY_OBJECT_EXT 0x9153
+#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
+#endif
+
+/* GL_EXT_debug_marker */
+/* No new tokens introduced by this extension. */
+
/* GL_EXT_discard_framebuffer */
#ifndef GL_EXT_discard_framebuffer
#define GL_COLOR_EXT 0x1800
@@ -196,9 +322,26 @@ typedef void* GLeglImageOES;
#define GL_STENCIL_EXT 0x1802
#endif
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
+#define GL_RENDERBUFFER_SAMPLES_EXT 0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x9134
+#define GL_MAX_SAMPLES_EXT 0x9135
+#endif
+
/* GL_EXT_multi_draw_arrays */
/* No new tokens introduced by this extension. */
+/* GL_EXT_occlusion_query_boolean */
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
+#define GL_CURRENT_QUERY_EXT 0x8865
+#define GL_QUERY_RESULT_EXT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
+#endif
+
/* GL_EXT_read_format_bgra */
#ifndef GL_EXT_read_format_bgra
#define GL_BGRA_EXT 0x80E1
@@ -206,6 +349,52 @@ typedef void* GLeglImageOES;
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
#endif
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+/* reuse GL_NO_ERROR */
+#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
+#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
+#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
+#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
+#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
+#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
+#endif
+
+/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_separate_shader_objects
+#define GL_VERTEX_SHADER_BIT_EXT 0x00000001
+#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
+#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
+#define GL_PROGRAM_SEPARABLE_EXT 0x8258
+#define GL_ACTIVE_PROGRAM_EXT 0x8259
+#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
+#endif
+
+/* GL_EXT_shader_texture_lod */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_shadow_samplers */
+#ifndef GL_EXT_shadow_samplers
+#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
+#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
+#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_SRGB_EXT 0x8C40
+#define GL_SRGB_ALPHA_EXT 0x8C42
+#define GL_SRGB8_ALPHA8_EXT 0x8C43
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
@@ -217,15 +406,54 @@ typedef void* GLeglImageOES;
#define GL_BGRA_EXT 0x80E1
#endif
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_RED_EXT 0x1903
+#define GL_RG_EXT 0x8227
+#define GL_R8_EXT 0x8229
+#define GL_RG8_EXT 0x822B
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
+#define GL_ALPHA8_EXT 0x803C
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#define GL_RGBA32F_EXT 0x8814
+#define GL_RGB32F_EXT 0x8815
+#define GL_ALPHA32F_EXT 0x8816
+#define GL_LUMINANCE32F_EXT 0x8818
+#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
+/* reuse GL_RGBA16F_EXT */
+#define GL_RGB16F_EXT 0x881B
+#define GL_ALPHA16F_EXT 0x881C
+#define GL_LUMINANCE16F_EXT 0x881E
+#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
+#define GL_RGB10_A2_EXT 0x8059
+#define GL_RGB10_EXT 0x8052
+#define GL_BGRA8_EXT 0x93A1
+#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
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_SHADER_BINARY_DMP 0x9250
#endif
/*------------------------------------------------------------------------*
@@ -256,17 +484,18 @@ typedef void* GLeglImageOES;
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#endif
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
+#define GL_MAX_SAMPLES_IMG 0x9135
+#define GL_TEXTURE_SAMPLES_IMG 0x9136
+#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
@@ -285,10 +514,90 @@ typedef void* GLeglImageOES;
#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
#endif
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_NV 0x8824
+#define GL_DRAW_BUFFER0_NV 0x8825
+#define GL_DRAW_BUFFER1_NV 0x8826
+#define GL_DRAW_BUFFER2_NV 0x8827
+#define GL_DRAW_BUFFER3_NV 0x8828
+#define GL_DRAW_BUFFER4_NV 0x8829
+#define GL_DRAW_BUFFER5_NV 0x882A
+#define GL_DRAW_BUFFER6_NV 0x882B
+#define GL_DRAW_BUFFER7_NV 0x882C
+#define GL_DRAW_BUFFER8_NV 0x882D
+#define GL_DRAW_BUFFER9_NV 0x882E
+#define GL_DRAW_BUFFER10_NV 0x882F
+#define GL_DRAW_BUFFER11_NV 0x8830
+#define GL_DRAW_BUFFER12_NV 0x8831
+#define GL_DRAW_BUFFER13_NV 0x8832
+#define GL_DRAW_BUFFER14_NV 0x8833
+#define GL_DRAW_BUFFER15_NV 0x8834
+#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
+#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
+#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
+#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
+#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
+#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
+#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
+#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
+#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
+#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
+#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
+#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
+#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
+#define GL_COLOR_ATTACHMENT13_NV 0x8CED
+#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
+#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
+/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
+#endif
+
+/* 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_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_READ_BUFFER_NV 0x0C02
+#endif
+
+/* GL_NV_read_buffer_front */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_compression_s3tc_update */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_npot_2D_mipmap */
+/* No new tokens introduced by this extension. */
+
/*------------------------------------------------------------------------*
* QCOM extension tokens
*------------------------------------------------------------------------*/
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_ALPHA_TEST_QCOM 0x0BC0
+#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
+#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
+#endif
+
/* GL_QCOM_driver_control */
/* No new tokens introduced by this extension. */
@@ -357,22 +666,12 @@ typedef void* GLeglImageOES;
#endif
/*------------------------------------------------------------------------*
- * ANGLE extension tokens
+ * VIV extension tokens
*------------------------------------------------------------------------*/
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 // alias GL_FRAMEBUFFER_BINDING
-#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
-#define GL_MAX_SAMPLES_ANGLE 0x8D57
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_SHADER_BINARY_VIV 0x8FC4
#endif
/*------------------------------------------------------------------------*
@@ -419,6 +718,12 @@ typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target,
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_OES_EGL_image_external 1
+/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_OES_element_index_uint 1
@@ -601,6 +906,114 @@ typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monito
#endif
/*------------------------------------------------------------------------*
+ * ANGLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_ANGLE_framebuffer_blit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_ANGLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+/* GL_ANGLE_pack_reverse_row_order */
+#ifndef GL_ANGLE_pack_reverse_row_order
+#define GL_ANGLE_pack_reverse_row_order 1
+#endif
+
+/* GL_ANGLE_texture_compression_dxt3 */
+#ifndef GL_ANGLE_texture_compression_dxt3
+#define GL_ANGLE_texture_compression_dxt3 1
+#endif
+
+/* GL_ANGLE_texture_compression_dxt5 */
+#ifndef GL_ANGLE_texture_compression_dxt5
+#define GL_ANGLE_texture_compression_dxt5 1
+#endif
+
+/* GL_ANGLE_translated_shader_source */
+#ifndef GL_ANGLE_translated_shader_source
+#define GL_ANGLE_translated_shader_source 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+#endif
+
+/* GL_ANGLE_texture_usage */
+#ifndef GL_ANGLE_texture_usage
+#define GL_ANGLE_texture_usage 1
+#endif
+
+/* GL_ANGLE_instanced_arrays */
+#ifndef GL_ANGLE_instanced_arrays
+#define GL_ANGLE_instanced_arrays 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glVertexAttribDivisorANGLE(GLuint index, GLuint divisor);
+GL_APICALL void GL_APIENTRY glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+GL_APICALL void GL_APIENTRY glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORANGLEPROC) (GLuint index, GLuint divisor);
+typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDANGLEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount);
+typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDANGLEPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount);
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_APPLE_rgb_422 1
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_APPLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_APPLE_texture_format_BGRA8888 1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_APPLE_texture_max_level 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_ARM_mali_shader_binary 1
+#endif
+
+/* GL_ARM_rgba8 */
+#ifndef GL_ARM_rgba8
+#define GL_ARM_rgba8 1
+#endif
+
+/*------------------------------------------------------------------------*
* EXT extension functions
*------------------------------------------------------------------------*/
@@ -609,6 +1022,35 @@ typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monito
#define GL_EXT_blend_minmax 1
#endif
+/* GL_EXT_color_buffer_half_float */
+#ifndef GL_EXT_color_buffer_half_float
+#define GL_EXT_color_buffer_half_float 1
+#endif
+
+/* GL_EXT_debug_label */
+#ifndef GL_EXT_debug_label
+#define GL_EXT_debug_label 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+
+/* GL_EXT_debug_marker */
+#ifndef GL_EXT_debug_marker
+#define GL_EXT_debug_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
+#endif
+typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
+#endif
+
/* GL_EXT_discard_framebuffer */
#ifndef GL_EXT_discard_framebuffer
#define GL_EXT_discard_framebuffer 1
@@ -618,6 +1060,17 @@ GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numA
typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
#endif
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_EXT_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
#ifndef GL_EXT_multi_draw_arrays
#define GL_EXT_multi_draw_arrays 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -628,11 +1081,134 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *fir
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
#endif
+/* GL_EXT_occlusion_query_boolean */
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_EXT_occlusion_query_boolean 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
+GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
+GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
+GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
+#endif
+typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
+typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
+typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
/* GL_EXT_read_format_bgra */
#ifndef GL_EXT_read_format_bgra
#define GL_EXT_read_format_bgra 1
#endif
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+#define GL_EXT_robustness 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
+GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
+GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+
+/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_separate_shader_objects
+#define GL_EXT_separate_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
+GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
+GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
+GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
+GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
+GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
+GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
+GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
+GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
+typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
+typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
+typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
+typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+
+/* GL_EXT_shader_texture_lod */
+#ifndef GL_EXT_shader_texture_lod
+#define GL_EXT_shader_texture_lod 1
+#endif
+
+/* GL_EXT_shadow_samplers */
+#ifndef GL_EXT_shadow_samplers
+#define GL_EXT_shadow_samplers 1
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_EXT_sRGB 1
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_EXT_texture_compression_dxt1 1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_EXT_texture_filter_anisotropic 1
@@ -643,14 +1219,47 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL
#define GL_EXT_texture_format_BGRA8888 1
#endif
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_EXT_texture_rg 1
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_EXT_texture_storage 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#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
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_EXT_unpack_subimage 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_DMP_shader_binary 1
#endif
/*------------------------------------------------------------------------*
@@ -677,10 +1286,51 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL
#define GL_IMG_texture_compression_pvrtc 1
#endif
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_IMG_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
/*------------------------------------------------------------------------*
* NV extension functions
*------------------------------------------------------------------------*/
+/* 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
+
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_NV_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
+#endif
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_NV_fbo_color_attachments 1
+#endif
+
/* GL_NV_fence */
#ifndef GL_NV_fence
#define GL_NV_fence 1
@@ -702,26 +1352,58 @@ 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
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_NV_read_buffer 1
#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
#endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
#endif
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
+/* GL_NV_read_buffer_front */
+#ifndef GL_NV_read_buffer_front
+#define GL_NV_read_buffer_front 1
+#endif
+
+/* GL_NV_read_depth */
+#ifndef GL_NV_read_depth
+#define GL_NV_read_depth 1
+#endif
+
+/* GL_NV_read_depth_stencil */
+#ifndef GL_NV_read_depth_stencil
+#define GL_NV_read_depth_stencil 1
+#endif
+
+/* GL_NV_read_stencil */
+#ifndef GL_NV_read_stencil
+#define GL_NV_read_stencil 1
+#endif
+
+/* GL_NV_texture_compression_s3tc_update */
+#ifndef GL_NV_texture_compression_s3tc_update
+#define GL_NV_texture_compression_s3tc_update 1
+#endif
+
+/* GL_NV_texture_npot_2D_mipmap */
+#ifndef GL_NV_texture_npot_2D_mipmap
+#define GL_NV_texture_npot_2D_mipmap 1
#endif
/*------------------------------------------------------------------------*
* QCOM extension functions
*------------------------------------------------------------------------*/
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_QCOM_alpha_test 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
+#endif
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
+#endif
+
/* GL_QCOM_driver_control */
#ifndef GL_QCOM_driver_control
#define GL_QCOM_driver_control 1
@@ -797,31 +1479,12 @@ typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
#endif
/*------------------------------------------------------------------------*
- * ANGLE extension functions
+ * VIV extension tokens
*------------------------------------------------------------------------*/
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_ANGLE_framebuffer_blit 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
- GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
- GLbitfield mask, GLenum filter);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
- GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
- GLbitfield mask, GLenum filter);
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_ANGLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat,
- GLsizei width, GLsizei height);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat,
- GLsizei width, GLsizei height);
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_VIV_shader_binary 1
#endif
#ifdef __cplusplus
diff --git a/Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h b/Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h
index d0664e4..a3fc935 100644
--- a/Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h
+++ b/Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h
@@ -6,6 +6,23 @@
#ifndef _COMPILER_INTERFACE_INCLUDED_
#define _COMPILER_INTERFACE_INCLUDED_
+#if defined(COMPONENT_BUILD)
+#if defined(_WIN32) || defined(_WIN64)
+
+#if defined(COMPILER_IMPLEMENTATION)
+#define COMPILER_EXPORT __declspec(dllexport)
+#else
+#define COMPILER_EXPORT __declspec(dllimport)
+#endif // defined(COMPILER_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#define COMPILER_EXPORT __attribute__((visibility("default")))
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define COMPILER_EXPORT
+#endif
+
//
// This is the platform independent interface between an OGL driver
// and the shading language compiler.
@@ -17,7 +34,7 @@ extern "C" {
// Version number for shader translation API.
// It is incremented everytime the API changes.
-#define SH_VERSION 103
+#define SH_VERSION 105
//
// The names of the following enums have been derived by replacing GL prefix
@@ -36,6 +53,12 @@ typedef enum {
} ShShaderSpec;
typedef enum {
+ SH_ESSL_OUTPUT = 0x8B45,
+ SH_GLSL_OUTPUT = 0x8B46,
+ SH_HLSL_OUTPUT = 0x8B47
+} ShShaderOutput;
+
+typedef enum {
SH_NONE = 0,
SH_INT = 0x1404,
SH_FLOAT = 0x1406,
@@ -53,7 +76,9 @@ typedef enum {
SH_FLOAT_MAT3 = 0x8B5B,
SH_FLOAT_MAT4 = 0x8B5C,
SH_SAMPLER_2D = 0x8B5E,
- SH_SAMPLER_CUBE = 0x8B60
+ SH_SAMPLER_CUBE = 0x8B60,
+ SH_SAMPLER_2D_RECT_ARB = 0x8B63,
+ SH_SAMPLER_EXTERNAL_OES = 0x8D66
} ShDataType;
typedef enum {
@@ -62,16 +87,24 @@ typedef enum {
SH_ACTIVE_UNIFORMS = 0x8B86,
SH_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87,
SH_ACTIVE_ATTRIBUTES = 0x8B89,
- SH_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A
+ SH_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A,
+ SH_MAPPED_NAME_MAX_LENGTH = 0x8B8B
} ShShaderInfo;
// Compile options.
typedef enum {
- SH_VALIDATE = 0,
- SH_VALIDATE_LOOP_INDEXING = 0x0001,
- SH_INTERMEDIATE_TREE = 0x0002,
- SH_OBJECT_CODE = 0x0004,
- SH_ATTRIBUTES_UNIFORMS = 0x0008
+ SH_VALIDATE = 0,
+ SH_VALIDATE_LOOP_INDEXING = 0x0001,
+ SH_INTERMEDIATE_TREE = 0x0002,
+ SH_OBJECT_CODE = 0x0004,
+ SH_ATTRIBUTES_UNIFORMS = 0x0008,
+ SH_LINE_DIRECTIVES = 0x0010,
+ SH_SOURCE_PATH = 0x0020,
+ SH_MAP_LONG_VARIABLE_NAMES = 0x0040,
+ SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX = 0x0080,
+
+ // This is needed only as a workaround for certain OpenGL driver bugs.
+ SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100
} ShCompileOptions;
//
@@ -79,12 +112,12 @@ typedef enum {
// compiler operations.
// If the function succeeds, the return value is nonzero, else zero.
//
-int ShInitialize();
+COMPILER_EXPORT int ShInitialize();
//
// Driver should call this at shutdown.
// If the function succeeds, the return value is nonzero, else zero.
//
-int ShFinalize();
+COMPILER_EXPORT int ShFinalize();
//
// Implementation dependent built-in resources (constants and extensions).
@@ -105,12 +138,14 @@ typedef struct
// Extensions.
// Set to 1 to enable the extension, else 0.
int OES_standard_derivatives;
+ int OES_EGL_image_external;
+ int ARB_texture_rectangle;
} ShBuiltInResources;
//
// Initialize built-in resources with minimum expected values.
//
-void ShInitBuiltInResources(ShBuiltInResources* resources);
+COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources* resources);
//
// ShHandle held by but opaque to the driver. It is allocated,
@@ -124,15 +159,21 @@ typedef void* ShHandle;
//
// Driver calls these to create and destroy compiler objects.
//
-// Returns the handle of constructed compiler.
+// Returns the handle of constructed compiler, null if the requested compiler is
+// not supported.
// Parameters:
// type: Specifies the type of shader - SH_FRAGMENT_SHADER or SH_VERTEX_SHADER.
// spec: Specifies the language spec the compiler must conform to -
// SH_GLES2_SPEC or SH_WEBGL_SPEC.
+// output: Specifies the output code type - SH_ESSL_OUTPUT, SH_GLSL_OUTPUT,
+// or SH_HLSL_OUTPUT.
// resources: Specifies the built-in resources.
-ShHandle ShConstructCompiler(ShShaderType type, ShShaderSpec spec,
- const ShBuiltInResources* resources);
-void ShDestruct(ShHandle handle);
+COMPILER_EXPORT ShHandle ShConstructCompiler(
+ ShShaderType type,
+ ShShaderSpec spec,
+ ShShaderOutput output,
+ const ShBuiltInResources* resources);
+COMPILER_EXPORT void ShDestruct(ShHandle handle);
//
// Compiles the given shader source.
@@ -159,7 +200,7 @@ void ShDestruct(ShHandle handle);
// Can be queried by calling ShGetActiveAttrib() and
// ShGetActiveUniform().
//
-int ShCompile(
+COMPILER_EXPORT int ShCompile(
const ShHandle handle,
const char* const shaderStrings[],
const int numStrings,
@@ -183,9 +224,13 @@ int ShCompile(
// SH_ACTIVE_UNIFORM_MAX_LENGTH: the length of the longest active uniform
// variable name including the null
// termination character.
+// SH_MAPPED_NAME_MAX_LENGTH: the length of the mapped variable name including
+// the null termination character.
//
// params: Requested parameter
-void ShGetInfo(const ShHandle handle, ShShaderInfo pname, int* params);
+COMPILER_EXPORT void ShGetInfo(const ShHandle handle,
+ ShShaderInfo pname,
+ int* params);
// Returns nul-terminated information log for a compiled shader.
// Parameters:
@@ -195,7 +240,7 @@ void ShGetInfo(const ShHandle handle, ShShaderInfo pname, int* params);
// to accomodate the information log. The size of the buffer required
// to store the returned information log can be obtained by calling
// ShGetInfo with SH_INFO_LOG_LENGTH.
-void ShGetInfoLog(const ShHandle handle, char* infoLog);
+COMPILER_EXPORT void ShGetInfoLog(const ShHandle handle, char* infoLog);
// Returns null-terminated object code for a compiled shader.
// Parameters:
@@ -205,7 +250,7 @@ void ShGetInfoLog(const ShHandle handle, char* infoLog);
// accomodate the object code. The size of the buffer required to
// store the returned object code can be obtained by calling
// ShGetInfo with SH_OBJECT_CODE_LENGTH.
-void ShGetObjectCode(const ShHandle handle, char* objCode);
+COMPILER_EXPORT void ShGetObjectCode(const ShHandle handle, char* objCode);
// Returns information about an active attribute variable.
// Parameters:
@@ -221,12 +266,18 @@ void ShGetObjectCode(const ShHandle handle, char* objCode);
// accomodate the attribute variable name. The size of the buffer
// required to store the attribute variable name can be obtained by
// calling ShGetInfo with SH_ACTIVE_ATTRIBUTE_MAX_LENGTH.
-void ShGetActiveAttrib(const ShHandle handle,
- int index,
- int* length,
- int* size,
- ShDataType* type,
- char* name);
+// mappedName: Returns a null terminated string containing the mapped name of
+// the attribute variable, It is assumed that mappedName has enough
+// memory (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care
+// about the mapped name. If the name is not mapped, then name and
+// mappedName are the same.
+COMPILER_EXPORT void ShGetActiveAttrib(const ShHandle handle,
+ int index,
+ int* length,
+ int* size,
+ ShDataType* type,
+ char* name,
+ char* mappedName);
// Returns information about an active uniform variable.
// Parameters:
@@ -242,12 +293,18 @@ void ShGetActiveAttrib(const ShHandle handle,
// accomodate the uniform variable name. The size of the buffer required
// to store the uniform variable name can be obtained by calling
// ShGetInfo with SH_ACTIVE_UNIFORMS_MAX_LENGTH.
-void ShGetActiveUniform(const ShHandle handle,
- int index,
- int* length,
- int* size,
- ShDataType* type,
- char* name);
+// mappedName: Returns a null terminated string containing the mapped name of
+// the uniform variable, It is assumed that mappedName has enough
+// memory (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care
+// about the mapped name. If the name is not mapped, then name and
+// mappedName are the same.
+COMPILER_EXPORT void ShGetActiveUniform(const ShHandle handle,
+ int index,
+ int* length,
+ int* size,
+ ShDataType* type,
+ char* name,
+ char* mappedName);
#ifdef __cplusplus
}
diff --git a/Source/ThirdParty/ANGLE/src/build_angle.xcodeproj/project.pbxproj b/Source/ThirdParty/ANGLE/src/build_angle.xcodeproj/project.pbxproj
index 67f7e29..409b622 100644
--- a/Source/ThirdParty/ANGLE/src/build_angle.xcodeproj/project.pbxproj
+++ b/Source/ThirdParty/ANGLE/src/build_angle.xcodeproj/project.pbxproj
@@ -13,136 +13,132 @@
buildPhases = (
);
dependencies = (
- FB3C506411F792970081F5BA /* PBXTargetDependency */,
+ A15E78BECDFF20BC3FFF040A /* PBXTargetDependency */,
+ BA246CA19435A9FA8AC69146 /* PBXTargetDependency */,
+ E4A3D33CA49D013550B8BA5F /* 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 */; };
+ 08A7933BD2F78A86B90200F6 /* Compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A118E5003E5C0E253C53839 /* Compiler.cpp */; };
0A216949103E1E228F9C12F0 /* InitializeDll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 60C3998C9CE66DE0C5B0FD99 /* InitializeDll.cpp */; };
+ 0AC1897E461A0D4758E3DCE3 /* VersionGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F727AEC906712EC238041464 /* VersionGLSL.cpp */; };
+ 0E9456F464E16392D1CCD030 /* ValidateLimitations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B148D967B8D288A8267BFF3A /* ValidateLimitations.cpp */; };
+ 0EC09B3B254829F8F1D952D3 /* ForLoopUnroll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DC9B647E10F65F66142ECC1 /* ForLoopUnroll.cpp */; };
+ 1ED1D2C7C74C6B625AFB1CCF /* VariableInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 27C11EE10FED2979931FFC11 /* VariableInfo.cpp */; };
+ 296466566D8C0F023A553760 /* SearchSymbol.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 228A6DEDDF08DB370394A7AD /* SearchSymbol.cpp */; };
+ 2E7C0D3804B8308A493D9B4B /* glslang_tab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F68A6AA811495718A6938C0 /* glslang_tab.cpp */; };
+ 3021E0BF1BC8442FF1F2F2B4 /* glslang_lex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 73A57C6D413773AEBA3C47A6 /* glslang_lex.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 */; };
+ 3F18389BCB89370A930667F4 /* TranslatorGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6FB70DC74A21FBCD665ABDF9 /* TranslatorGLSL.cpp */; };
40FC189B8A246EDF14C2FDE3 /* intermOut.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DEAF6F3126C2EC4397785C3F /* intermOut.cpp */; };
+ 4B4BDE7AD6266B39ED43C2D4 /* CodeGenHLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C49549DCCAF450EB761520E1 /* CodeGenHLSL.cpp */; };
50DF00005CC4212F6FB1291D /* Intermediate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3F7C486C370A72938FE8160F /* Intermediate.cpp */; };
+ 55CBD87573B803A173AC9129 /* util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EE7215A7AB4EF71C97D2545 /* util.cpp */; };
+ 5F7B52A54DCE8155ED94ECF8 /* OutputHLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9A5B5BB2526802479E19F993 /* OutputHLSL.cpp */; };
6F9F875017A68ABE5D39FF19 /* ParseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 976C831A75EBE009A9861796 /* ParseHelper.cpp */; };
888F1382498E2D74AF2801C8 /* debug.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ABA230FEA3654B030E4C4FB /* debug.cpp */; };
+ 896B720BD21F6749A7D83F30 /* MapLongVariableNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 57CF1F83E842901C42D44825 /* MapLongVariableNames.cpp */; };
+ 93A41AF036E5EF87B366B563 /* TranslatorESSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0A3A260F5379A7E2655D40F3 /* TranslatorESSL.cpp */; };
+ 9886BCD5D0DD69B6FDE09DD8 /* UnfoldSelect.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3711A48A0BF16B1CBD77AC9 /* UnfoldSelect.cpp */; };
+ 9B111B83FB636FD5CDEC32A0 /* OutputGLSLBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCDF01F002ADE9DB8A3EF4FE /* OutputGLSLBase.cpp */; };
9E8DFE1CCEF038BF2B65428C /* parseConst.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D2C9C8EB4A7EFF5B67FF9DBF /* parseConst.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 */; };
+ C4AAB2BB4594C0DA318DCB1C /* OutputESSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DB2917C5B624712364DE4A75 /* OutputESSL.cpp */; };
+ C75EB9292A0DDA45592A8ACF /* OutputGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 48B7402CC07A059FEF5EC351 /* OutputGLSL.cpp */; };
CB7F0EF0D6A89FA8C4DF5513 /* cpp.c in Sources */ = {isa = PBXBuildFile; fileRef = B75707B393B7EAB7DD9999CB /* cpp.c */; };
+ D56F7D00E9B162E416D37DF0 /* CodeGenGLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B7B1127C75B576FC00D74AED /* CodeGenGLSL.cpp */; };
E1C7C5DFF0B2DFEC09387F4E /* PoolAlloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B64EABE738FC666A5E4E2F42 /* PoolAlloc.cpp */; };
E8C727AA8E9DC5E7B58857DF /* tokens.c in Sources */ = {isa = PBXBuildFile; fileRef = 2D00745DA9914FDE274D03D5 /* tokens.c */; };
+ E99D6D80DBF05ECE7108B26D /* TranslatorHLSL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3DAFF6BF12BB7F4784D6C7E /* TranslatorHLSL.cpp */; };
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 */; };
- 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 */ = {
+ 1F7242496103EDF29CC25D87 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA188D8C6BF8073122539131 /* Project object */;
proxyType = 1;
- remoteGlobalIDString = 31349D665FAE642AEB49135E;
- remoteInfo = "translator_common Support";
+ remoteGlobalIDString = A838E9574B3FF14791DBDAB1;
+ remoteInfo = translator_hlsl;
};
- FB3C506311F792970081F5BA /* PBXContainerItemProxy */ = {
+ 55D5F9BF727E4A3B6637802B /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA188D8C6BF8073122539131 /* Project object */;
proxyType = 1;
- remoteGlobalIDString = FB3C505511F7924A0081F5BA;
- remoteInfo = angle;
+ remoteGlobalIDString = 6F4FD35CB3DFC89D70ECD432;
+ remoteInfo = translator_common;
};
- FB3C50D011F79CCC0081F5BA /* PBXContainerItemProxy */ = {
+ 60D3546AC27B094D6CA04CD6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA188D8C6BF8073122539131 /* Project object */;
proxyType = 1;
- remoteGlobalIDString = 31349D665FAE642AEB49135E;
- remoteInfo = "ANGLE Support";
+ remoteGlobalIDString = 5892C7A3695330437AFE5714;
+ remoteInfo = translator_glsl;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
056FEADC7D95C6D4C9CF1113 /* scanner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = scanner.h; sourceTree = "<group>"; };
+ 0A118E5003E5C0E253C53839 /* Compiler.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Compiler.cpp; sourceTree = "<group>"; };
+ 0A3A260F5379A7E2655D40F3 /* TranslatorESSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TranslatorESSL.cpp; sourceTree = "<group>"; };
0C9B4616A65A5ABEF91FD6DC /* atom.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = atom.c; sourceTree = "<group>"; };
+ 120AD0A3B7642FB5A9AE3A56 /* VersionGLSL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VersionGLSL.h; 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>"; };
+ 182BAD50D4E58B884F5EB9F3 /* ForLoopUnroll.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ForLoopUnroll.h; sourceTree = "<group>"; };
+ 228A6DEDDF08DB370394A7AD /* SearchSymbol.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = SearchSymbol.cpp; sourceTree = "<group>"; };
+ 27C11EE10FED2979931FFC11 /* VariableInfo.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = VariableInfo.cpp; 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; };
+ 3EE7215A7AB4EF71C97D2545 /* util.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = util.cpp; sourceTree = "<group>"; };
+ 3F68A6AA811495718A6938C0 /* glslang_tab.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = glslang_tab.cpp; sourceTree = "<group>"; };
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>"; };
+ 497C5C24EEF466FB4B50A259 /* glslang.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = glslang.h; sourceTree = "<group>"; };
4ABA230FEA3654B030E4C4FB /* debug.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = debug.cpp; sourceTree = "<group>"; };
+ 4FCF32CB2D8A42C930A66B00 /* glslang_tab.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = glslang_tab.h; 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>"; };
+ 57CF1F83E842901C42D44825 /* MapLongVariableNames.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MapLongVariableNames.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>"; };
+ 5D99354C4D8187D384C81207 /* VariableInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = VariableInfo.h; sourceTree = "<group>"; };
+ 5DC9B647E10F65F66142ECC1 /* ForLoopUnroll.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ForLoopUnroll.cpp; sourceTree = "<group>"; };
60C3998C9CE66DE0C5B0FD99 /* InitializeDll.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InitializeDll.cpp; sourceTree = "<group>"; };
+ 6BB66AB5873868E23675B6DB /* OutputESSL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OutputESSL.h; sourceTree = "<group>"; };
6BBC8224B9D8E234D117FA0C /* preprocess.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = preprocess.h; sourceTree = "<group>"; };
- 6E02565112E6934D00B3431F /* glslang_lex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = glslang_lex.cpp; sourceTree = "<group>"; };
- 6E02565212E6934D00B3431F /* glslang_tab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = glslang_tab.cpp; sourceTree = "<group>"; };
- 6E02565312E6934D00B3431F /* glslang_tab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glslang_tab.h; sourceTree = "<group>"; };
- 6E02565412E6934D00B3431F /* glslang.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = glslang.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>"; };
+ 73A57C6D413773AEBA3C47A6 /* glslang_lex.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = glslang_lex.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>"; };
+ 81CC4245A8E5AB5584D336F3 /* MapLongVariableNames.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MapLongVariableNames.h; 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>"; };
+ 90254842D72975672C2E9A93 /* ValidateLimitations.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ValidateLimitations.h; 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>"; };
@@ -150,16 +146,22 @@
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>"; };
+ A1644B00E9304C407FDC5F47 /* libtranslator_glsl.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libtranslator_glsl.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ A447F75F33DA4C4C123AC952 /* libtranslator_hlsl.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libtranslator_hlsl.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ A51C728B615B41E1D59E9902 /* util.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = util.h; 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>"; };
+ B148D967B8D288A8267BFF3A /* ValidateLimitations.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ValidateLimitations.cpp; 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>"; };
+ B55B359CF7E486DBC49BBF0A /* OutputGLSLBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OutputGLSLBase.h; 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>"; };
+ BCDF01F002ADE9DB8A3EF4FE /* OutputGLSLBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OutputGLSLBase.cpp; 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>"; };
@@ -171,15 +173,19 @@
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>"; };
+ D53DDD0CDF15EE1DD01F1A20 /* TranslatorESSL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TranslatorESSL.h; sourceTree = "<group>"; };
+ DB2917C5B624712364DE4A75 /* OutputESSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = OutputESSL.cpp; 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>"; };
+ F3E09DC8E1BF5D2958AACEDE /* SearchSymbol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchSymbol.h; sourceTree = "<group>"; };
+ F727AEC906712EC238041464 /* VersionGLSL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = VersionGLSL.cpp; 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; };
+ F99E737D3FFD30CA5E354150 /* common.gypi */ = {isa = PBXFileReference; lastKnownFileType = text; name = common.gypi; path = ../build/common.gypi; sourceTree = "<group>"; };
FF3AA694DF9A4455A813234D /* scanner.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = scanner.c; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -191,7 +197,14 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
- FB3C505A11F7924A0081F5BA /* Frameworks */ = {
+ CA71CBA633EFC63166BEC9F3 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ FE3679A0955B25EB7BF116E6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -228,16 +241,15 @@
196DB6AB006BB83503C7D786 /* Source */ = {
isa = PBXGroup;
children = (
- 6E02565112E6934D00B3431F /* glslang_lex.cpp */,
- 6E02565212E6934D00B3431F /* glslang_tab.cpp */,
- 6E02565312E6934D00B3431F /* glslang_tab.h */,
- 6E02565412E6934D00B3431F /* glslang.h */,
0E8D65F584FDB84DAABD3969 /* preprocessor */,
27E4C7ED0B82E18DCBEDF1C9 /* BaseTypes.h */,
B7B1127C75B576FC00D74AED /* CodeGenGLSL.cpp */,
C49549DCCAF450EB761520E1 /* CodeGenHLSL.cpp */,
F74618F18FE5448115017C44 /* Common.h */,
+ 0A118E5003E5C0E253C53839 /* Compiler.cpp */,
B2F5CA11EEA92DF2384EFD93 /* ConstantUnion.h */,
+ 5DC9B647E10F65F66142ECC1 /* ForLoopUnroll.cpp */,
+ 182BAD50D4E58B884F5EB9F3 /* ForLoopUnroll.h */,
6E6927BE5D3C2C82F86111DF /* InfoSink.cpp */,
F7B2971D4EB3836B94B7ECAF /* InfoSink.h */,
A54F2ED0D82D7BBCA4E9EEEA /* Initialize.cpp */,
@@ -249,8 +261,14 @@
C4FE988EF9A293867E5C771B /* IntermTraverse.cpp */,
3F7C486C370A72938FE8160F /* Intermediate.cpp */,
DEEAFC618A3B33F1FBFE3536 /* MMap.h */,
+ 57CF1F83E842901C42D44825 /* MapLongVariableNames.cpp */,
+ 81CC4245A8E5AB5584D336F3 /* MapLongVariableNames.h */,
+ DB2917C5B624712364DE4A75 /* OutputESSL.cpp */,
+ 6BB66AB5873868E23675B6DB /* OutputESSL.h */,
48B7402CC07A059FEF5EC351 /* OutputGLSL.cpp */,
93D61CB0BCE54E069D71F920 /* OutputGLSL.h */,
+ BCDF01F002ADE9DB8A3EF4FE /* OutputGLSLBase.cpp */,
+ B55B359CF7E486DBC49BBF0A /* OutputGLSLBase.h */,
9A5B5BB2526802479E19F993 /* OutputHLSL.cpp */,
5A21599C59BC1A75A7FABA34 /* OutputHLSL.h */,
976C831A75EBE009A9861796 /* ParseHelper.cpp */,
@@ -261,10 +279,14 @@
9D47B1AC82E4EE859AC54243 /* QualifierAlive.h */,
B436EFF06913FCB19C3522A7 /* RemoveTree.cpp */,
D40F78CB9BA0C89921FA319D /* RemoveTree.h */,
+ 228A6DEDDF08DB370394A7AD /* SearchSymbol.cpp */,
+ F3E09DC8E1BF5D2958AACEDE /* SearchSymbol.h */,
AE65E139AE10DE9EFAD8D5B1 /* ShHandle.h */,
56C7E99BA500A84C35216FE0 /* ShaderLang.cpp */,
B7E5B0F04635E6090F0DE8EF /* SymbolTable.cpp */,
7C6BB12AB099556CF379D78F /* SymbolTable.h */,
+ 0A3A260F5379A7E2655D40F3 /* TranslatorESSL.cpp */,
+ D53DDD0CDF15EE1DD01F1A20 /* TranslatorESSL.h */,
6FB70DC74A21FBCD665ABDF9 /* TranslatorGLSL.cpp */,
DDD3B7E3B7B35A0B8469AB87 /* TranslatorGLSL.h */,
C3DAFF6BF12BB7F4784D6C7E /* TranslatorHLSL.cpp */,
@@ -272,8 +294,18 @@
AA53B6632C76F905DF08E564 /* Types.h */,
E3711A48A0BF16B1CBD77AC9 /* UnfoldSelect.cpp */,
2A765B86CBAF0D4A3E69DCA7 /* UnfoldSelect.h */,
+ B148D967B8D288A8267BFF3A /* ValidateLimitations.cpp */,
+ 90254842D72975672C2E9A93 /* ValidateLimitations.h */,
+ 27C11EE10FED2979931FFC11 /* VariableInfo.cpp */,
+ 5D99354C4D8187D384C81207 /* VariableInfo.h */,
+ F727AEC906712EC238041464 /* VersionGLSL.cpp */,
+ 120AD0A3B7642FB5A9AE3A56 /* VersionGLSL.h */,
4ABA230FEA3654B030E4C4FB /* debug.cpp */,
95276AA6B36FC1B1D913FCE4 /* debug.h */,
+ 497C5C24EEF466FB4B50A259 /* glslang.h */,
+ 73A57C6D413773AEBA3C47A6 /* glslang_lex.cpp */,
+ 3F68A6AA811495718A6938C0 /* glslang_tab.cpp */,
+ 4FCF32CB2D8A42C930A66B00 /* glslang_tab.h */,
DEAF6F3126C2EC4397785C3F /* intermOut.cpp */,
799DC9611EE2EA3BA7CF5477 /* intermediate.h */,
153BF06BF12C6F50496C6156 /* localintermediate.h */,
@@ -281,6 +313,8 @@
BE258486005F6696CC031622 /* ossource_posix.cpp */,
D2C9C8EB4A7EFF5B67FF9DBF /* parseConst.cpp */,
AE7674C52BDDDB28AF5FFD9F /* unistd.h */,
+ 3EE7215A7AB4EF71C97D2545 /* util.cpp */,
+ A51C728B615B41E1D59E9902 /* util.h */,
);
name = Source;
path = compiler;
@@ -299,6 +333,7 @@
isa = PBXGroup;
children = (
CF2B62E0820C831AF812D000 /* build_angle.gyp */,
+ F99E737D3FFD30CA5E354150 /* common.gypi */,
);
name = Build;
sourceTree = "<group>";
@@ -307,7 +342,8 @@
isa = PBXGroup;
children = (
3DDDC77216202A4DE1808BDB /* libtranslator_common.a */,
- FB3C505D11F7924A0081F5BA /* libangle.a */,
+ A1644B00E9304C407FDC5F47 /* libtranslator_glsl.a */,
+ A447F75F33DA4C4C123AC952 /* libtranslator_hlsl.a */,
);
name = Products;
sourceTree = "<group>";
@@ -315,6 +351,22 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
+ 5892C7A3695330437AFE5714 /* translator_glsl */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 8B8815CA2EFE60FD0C0361BF /* Build configuration list for PBXNativeTarget "translator_glsl" */;
+ buildPhases = (
+ BABCE721106B5C1527EFEF0D /* Sources */,
+ CA71CBA633EFC63166BEC9F3 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = translator_glsl;
+ productName = translator_glsl;
+ productReference = A1644B00E9304C407FDC5F47 /* libtranslator_glsl.a */;
+ productType = "com.apple.product-type.library.static";
+ };
6F4FD35CB3DFC89D70ECD432 /* translator_common */ = {
isa = PBXNativeTarget;
buildConfigurationList = 34BB38E3A74418B2A063B49E /* Build configuration list for PBXNativeTarget "translator_common" */;
@@ -325,28 +377,26 @@
buildRules = (
);
dependencies = (
- 291EE04202EC7967835FCC38 /* PBXTargetDependency */,
);
name = translator_common;
productName = translator_common;
productReference = 3DDDC77216202A4DE1808BDB /* libtranslator_common.a */;
productType = "com.apple.product-type.library.static";
};
- FB3C505511F7924A0081F5BA /* angle */ = {
+ A838E9574B3FF14791DBDAB1 /* translator_hlsl */ = {
isa = PBXNativeTarget;
- buildConfigurationList = FB3C505B11F7924A0081F5BA /* Build configuration list for PBXNativeTarget "angle" */;
+ buildConfigurationList = C71E79C7829FD796CF621B44 /* Build configuration list for PBXNativeTarget "translator_hlsl" */;
buildPhases = (
- FB3C505611F7924A0081F5BA /* Sources */,
- FB3C505A11F7924A0081F5BA /* Frameworks */,
+ 05F3BCA9518770BE3F1E0A38 /* Sources */,
+ FE3679A0955B25EB7BF116E6 /* Frameworks */,
);
buildRules = (
);
dependencies = (
- FB3C50D111F79CCC0081F5BA /* PBXTargetDependency */,
);
- name = angle;
- productName = translator_glsl;
- productReference = FB3C505D11F7924A0081F5BA /* libangle.a */;
+ name = translator_hlsl;
+ productName = translator_hlsl;
+ productReference = A447F75F33DA4C4C123AC952 /* libtranslator_hlsl.a */;
productType = "com.apple.product-type.library.static";
};
/* End PBXNativeTarget section */
@@ -360,74 +410,61 @@
buildConfigurationList = 0E59F8FE4A8099E8DDCA4CE7 /* Build configuration list for PBXProject "build_angle" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
- knownRegions = (
- English,
- Japanese,
- French,
- German,
- );
mainGroup = 5BBEFF9B91738297B95C568D;
projectDirPath = "";
projectRoot = "";
targets = (
1563D9916BFDAD853032CE1A /* All */,
6F4FD35CB3DFC89D70ECD432 /* translator_common */,
- 31349D665FAE642AEB49135E /* ANGLE Support */,
- FB3C505511F7924A0081F5BA /* angle */,
+ 5892C7A3695330437AFE5714 /* translator_glsl */,
+ A838E9574B3FF14791DBDAB1 /* translator_hlsl */,
);
};
/* End PBXProject section */
-/* Begin PBXShellScriptBuildPhase section */
- 0D513F8B923949C156DB02C5 /* Action "bison_glslang" */ = {
- isa = PBXShellScriptBuildPhase;
+/* Begin PBXSourcesBuildPhase section */
+ 05F3BCA9518770BE3F1E0A38 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- );
- inputPaths = (
- compiler/glslang.y,
- );
- name = "Action \"bison_glslang\"";
- outputPaths = (
- "$(INTERMEDIATE_DIR)/glslang_tab.cpp",
- "$(INTERMEDIATE_DIR)/glslang_tab.h",
+ 4B4BDE7AD6266B39ED43C2D4 /* CodeGenHLSL.cpp in Sources */,
+ 5F7B52A54DCE8155ED94ECF8 /* OutputHLSL.cpp in Sources */,
+ E99D6D80DBF05ECE7108B26D /* TranslatorHLSL.cpp in Sources */,
+ 9886BCD5D0DD69B6FDE09DD8 /* UnfoldSelect.cpp in Sources */,
+ 296466566D8C0F023A553760 /* SearchSymbol.cpp in Sources */,
);
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;
+ BABCE721106B5C1527EFEF0D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- );
- inputPaths = (
- compiler/glslang.l,
- );
- name = "Action \"flex_glslang\"";
- outputPaths = (
- "$(INTERMEDIATE_DIR)/glslang.cpp",
+ D56F7D00E9B162E416D37DF0 /* CodeGenGLSL.cpp in Sources */,
+ 0EC09B3B254829F8F1D952D3 /* ForLoopUnroll.cpp in Sources */,
+ C4AAB2BB4594C0DA318DCB1C /* OutputESSL.cpp in Sources */,
+ 9B111B83FB636FD5CDEC32A0 /* OutputGLSLBase.cpp in Sources */,
+ C75EB9292A0DDA45592A8ACF /* OutputGLSL.cpp in Sources */,
+ 93A41AF036E5EF87B366B563 /* TranslatorESSL.cpp in Sources */,
+ 3F18389BCB89370A930667F4 /* TranslatorGLSL.cpp in Sources */,
+ 0AC1897E461A0D4758E3DCE3 /* VersionGLSL.cpp in Sources */,
);
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 = (
+ 08A7933BD2F78A86B90200F6 /* Compiler.cpp in Sources */,
888F1382498E2D74AF2801C8 /* debug.cpp in Sources */,
+ 3021E0BF1BC8442FF1F2F2B4 /* glslang_lex.cpp in Sources */,
+ 2E7C0D3804B8308A493D9B4B /* glslang_tab.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 */,
+ 896B720BD21F6749A7D83F30 /* MapLongVariableNames.cpp in Sources */,
9E8DFE1CCEF038BF2B65428C /* parseConst.cpp in Sources */,
6F9F875017A68ABE5D39FF19 /* ParseHelper.cpp in Sources */,
E1C7C5DFF0B2DFEC09387F4E /* PoolAlloc.cpp in Sources */,
@@ -435,6 +472,9 @@
AC23F58FDD3C55F5CA18EED7 /* RemoveTree.cpp in Sources */,
B8BD2685A16B188CCDFB052B /* ShaderLang.cpp in Sources */,
F6ABD58F8CAB7641D8BFE935 /* SymbolTable.cpp in Sources */,
+ 55CBD87573B803A173AC9129 /* util.cpp in Sources */,
+ 0E9456F464E16392D1CCD030 /* ValidateLimitations.cpp in Sources */,
+ 1ED1D2C7C74C6B625AFB1CCF /* VariableInfo.cpp in Sources */,
32B1DBCD6B83F2146D787A62 /* atom.c in Sources */,
CB7F0EF0D6A89FA8C4DF5513 /* cpp.c in Sources */,
35BE1BBEE6135A1CB0608EA8 /* cppstruct.c in Sources */,
@@ -446,154 +486,200 @@
);
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 */,
- 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 */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- 291EE04202EC7967835FCC38 /* PBXTargetDependency */ = {
+ A15E78BECDFF20BC3FFF040A /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = 31349D665FAE642AEB49135E /* ANGLE Support */;
- targetProxy = E69BFBE2D1272620E46C3F8A /* PBXContainerItemProxy */;
+ target = 6F4FD35CB3DFC89D70ECD432 /* translator_common */;
+ targetProxy = 55D5F9BF727E4A3B6637802B /* PBXContainerItemProxy */;
};
- FB3C506411F792970081F5BA /* PBXTargetDependency */ = {
+ BA246CA19435A9FA8AC69146 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = FB3C505511F7924A0081F5BA /* angle */;
- targetProxy = FB3C506311F792970081F5BA /* PBXContainerItemProxy */;
+ target = 5892C7A3695330437AFE5714 /* translator_glsl */;
+ targetProxy = 60D3546AC27B094D6CA04CD6 /* PBXContainerItemProxy */;
};
- FB3C50D111F79CCC0081F5BA /* PBXTargetDependency */ = {
+ E4A3D33CA49D013550B8BA5F /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
- target = 31349D665FAE642AEB49135E /* ANGLE Support */;
- targetProxy = FB3C50D011F79CCC0081F5BA /* PBXContainerItemProxy */;
+ target = A838E9574B3FF14791DBDAB1 /* translator_hlsl */;
+ targetProxy = 1F7242496103EDF29CC25D87 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin XCBuildConfiguration section */
- 00BF2EBCBDF5678F4BA2FA92 /* Default */ = {
+ 322A8C62423B595E11BAD42D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- PRODUCT_NAME = "translator_common Support";
+ PRODUCT_NAME = All;
};
- name = Default;
+ name = Debug;
};
- 1A12AA5D65ACDE71AE089EE3 /* Default */ = {
+ 4DA42A78D3B855C9CD8F658D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ EXECUTABLE_PREFIX = lib;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "\"ANGLE_DISABLE_TRACE\"",
+ "\"ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0\"",
+ );
+ HEADER_SEARCH_PATHS = (
+ .,
+ ../include,
+ );
+ PRODUCT_NAME = translator_common;
+ };
+ name = Release;
+ };
+ 4F851F5BA5FA43E9E0B9CB86 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
PRODUCT_NAME = All;
};
- name = Default;
+ name = Release;
};
- 1F3F1218B5135FBB067DE809 /* Default */ = {
+ 88ADC9285519A668808B51EE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "\"ANGLE_DISABLE_TRACE\"",
+ "\"ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0\"",
+ );
HEADER_SEARCH_PATHS = (
.,
../include,
);
- PRODUCT_NAME = translator_common;
+ PRODUCT_NAME = translator_glsl;
+ };
+ name = Debug;
+ };
+ 9DC66E1FF9349CDCC8D52C46 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ INTERMEDIATE_DIR = "$(PROJECT_DERIVED_FILE_DIR)/$(CONFIGURATION)";
+ SHARED_INTERMEDIATE_DIR = "$(SYMROOT)/DerivedSources/$(CONFIGURATION)";
+ };
+ name = Debug;
+ };
+ AF7C2CD10C6FEA076B141E6E /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ EXECUTABLE_PREFIX = lib;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "\"ANGLE_DISABLE_TRACE\"",
+ "\"ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0\"",
+ );
+ HEADER_SEARCH_PATHS = (
+ .,
+ ../include,
+ );
+ PRODUCT_NAME = translator_glsl;
+ };
+ name = Release;
+ };
+ B096FAF032DB19AB637D38F0 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ EXECUTABLE_PREFIX = lib;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "\"ANGLE_DISABLE_TRACE\"",
+ "\"ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0\"",
+ );
+ HEADER_SEARCH_PATHS = (
+ .,
+ ../include,
+ );
+ PRODUCT_NAME = translator_hlsl;
};
- name = Default;
+ name = Release;
};
- BC5793C9A1FF021A81C66559 /* Default */ = {
+ C4546B14B0EB5EB8C5D39DC2 /* Release */ = {
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;
+ name = Release;
+ };
+ F029E0D369FAFEA46BDAFCEE /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ EXECUTABLE_PREFIX = lib;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "\"ANGLE_DISABLE_TRACE\"",
+ "\"ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0\"",
+ );
+ HEADER_SEARCH_PATHS = (
+ .,
+ ../include,
+ );
+ PRODUCT_NAME = translator_hlsl;
+ };
+ name = Debug;
};
- FB3C505C11F7924A0081F5BA /* Default */ = {
+ FF01CDF4594E0FF9E581B319 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
EXECUTABLE_PREFIX = lib;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "\"ANGLE_DISABLE_TRACE\"",
+ "\"ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL0\"",
+ );
HEADER_SEARCH_PATHS = (
.,
../include,
);
- PRODUCT_NAME = angle;
+ PRODUCT_NAME = translator_common;
};
- name = Default;
+ name = Debug;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
- 0AA54825BF5DF0A3FBA92B60 /* Build configuration list for PBXAggregateTarget "ANGLE Support" */ = {
+ 0E59F8FE4A8099E8DDCA4CE7 /* Build configuration list for PBXProject "build_angle" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- 00BF2EBCBDF5678F4BA2FA92 /* Default */,
+ 9DC66E1FF9349CDCC8D52C46 /* Debug */,
+ C4546B14B0EB5EB8C5D39DC2 /* Release */,
);
defaultConfigurationIsVisible = 1;
- defaultConfigurationName = Default;
+ defaultConfigurationName = Debug;
};
- 0E59F8FE4A8099E8DDCA4CE7 /* Build configuration list for PBXProject "build_angle" */ = {
+ 34BB38E3A74418B2A063B49E /* Build configuration list for PBXNativeTarget "translator_common" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- BC5793C9A1FF021A81C66559 /* Default */,
+ FF01CDF4594E0FF9E581B319 /* Debug */,
+ 4DA42A78D3B855C9CD8F658D /* Release */,
);
defaultConfigurationIsVisible = 1;
- defaultConfigurationName = Default;
+ defaultConfigurationName = Debug;
};
- 34BB38E3A74418B2A063B49E /* Build configuration list for PBXNativeTarget "translator_common" */ = {
+ 77CEFB7B40F05B0A804E6B2B /* Build configuration list for PBXAggregateTarget "All" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- 1F3F1218B5135FBB067DE809 /* Default */,
+ 322A8C62423B595E11BAD42D /* Debug */,
+ 4F851F5BA5FA43E9E0B9CB86 /* Release */,
);
defaultConfigurationIsVisible = 1;
- defaultConfigurationName = Default;
+ defaultConfigurationName = Debug;
};
- 77CEFB7B40F05B0A804E6B2B /* Build configuration list for PBXAggregateTarget "All" */ = {
+ 8B8815CA2EFE60FD0C0361BF /* Build configuration list for PBXNativeTarget "translator_glsl" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- 1A12AA5D65ACDE71AE089EE3 /* Default */,
+ 88ADC9285519A668808B51EE /* Debug */,
+ AF7C2CD10C6FEA076B141E6E /* Release */,
);
defaultConfigurationIsVisible = 1;
- defaultConfigurationName = Default;
+ defaultConfigurationName = Debug;
};
- FB3C505B11F7924A0081F5BA /* Build configuration list for PBXNativeTarget "angle" */ = {
+ C71E79C7829FD796CF621B44 /* Build configuration list for PBXNativeTarget "translator_hlsl" */ = {
isa = XCConfigurationList;
buildConfigurations = (
- FB3C505C11F7924A0081F5BA /* Default */,
+ F029E0D369FAFEA46BDAFCEE /* Debug */,
+ B096FAF032DB19AB637D38F0 /* Release */,
);
defaultConfigurationIsVisible = 1;
- defaultConfigurationName = Default;
+ defaultConfigurationName = Debug;
};
/* End XCConfigurationList section */
};
diff --git a/Source/ThirdParty/ANGLE/src/common/RefCountObject.cpp b/Source/ThirdParty/ANGLE/src/common/RefCountObject.cpp
new file mode 100644
index 0000000..c1ef90c
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/common/RefCountObject.cpp
@@ -0,0 +1,47 @@
+//
+// 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.
+//
+
+// RefCountObject.cpp: Defines the gl::RefCountObject base class that provides
+// lifecycle support for GL objects using the traditional BindObject scheme, but
+// that need to be reference counted for correct cross-context deletion.
+// (Concretely, textures, buffers and renderbuffers.)
+
+#include "RefCountObject.h"
+
+RefCountObject::RefCountObject(GLuint id)
+{
+ mId = id;
+ mRefCount = 0;
+}
+
+RefCountObject::~RefCountObject()
+{
+ ASSERT(mRefCount == 0);
+}
+
+void RefCountObject::addRef() const
+{
+ mRefCount++;
+}
+
+void RefCountObject::release() const
+{
+ ASSERT(mRefCount > 0);
+
+ if (--mRefCount == 0)
+ {
+ delete this;
+ }
+}
+
+void RefCountObjectBindingPointer::set(RefCountObject *newObject)
+{
+ // addRef first in case newObject == mObject and this is the last reference to it.
+ if (newObject != NULL) newObject->addRef();
+ if (mObject != NULL) mObject->release();
+
+ mObject = newObject;
+}
diff --git a/Source/ThirdParty/ANGLE/src/common/RefCountObject.h b/Source/ThirdParty/ANGLE/src/common/RefCountObject.h
new file mode 100644
index 0000000..727c71c
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/common/RefCountObject.h
@@ -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.
+//
+
+// RefCountObject.h: Defines the gl::RefCountObject base class that provides
+// lifecycle support for GL objects using the traditional BindObject scheme, but
+// that need to be reference counted for correct cross-context deletion.
+// (Concretely, textures, buffers and renderbuffers.)
+
+#ifndef COMMON_REFCOUNTOBJECT_H_
+#define COMMON_REFCOUNTOBJECT_H_
+
+#include <cstddef>
+
+#define GL_APICALL
+#include <GLES2/gl2.h>
+
+#include "common/debug.h"
+
+class RefCountObject
+{
+ public:
+ explicit RefCountObject(GLuint id);
+ virtual ~RefCountObject();
+
+ virtual void addRef() const;
+ virtual void release() const;
+
+ GLuint id() const { return mId; }
+
+ private:
+ GLuint mId;
+
+ mutable std::size_t mRefCount;
+};
+
+class RefCountObjectBindingPointer
+{
+ protected:
+ RefCountObjectBindingPointer() : mObject(NULL) { }
+ ~RefCountObjectBindingPointer() { ASSERT(mObject == NULL); } // Objects have to be released before the resource manager is destroyed, so they must be explicitly cleaned up.
+
+ void set(RefCountObject *newObject);
+ RefCountObject *get() const { return mObject; }
+
+ public:
+ GLuint id() const { return (mObject != NULL) ? mObject->id() : 0; }
+ bool operator ! () const { return (get() == NULL); }
+
+ private:
+ RefCountObject *mObject;
+};
+
+template <class ObjectType>
+class BindingPointer : public RefCountObjectBindingPointer
+{
+ public:
+ void set(ObjectType *newObject) { RefCountObjectBindingPointer::set(newObject); }
+ ObjectType *get() const { return static_cast<ObjectType*>(RefCountObjectBindingPointer::get()); }
+ ObjectType *operator -> () const { return get(); }
+};
+
+#endif // COMMON_REFCOUNTOBJECT_H_
diff --git a/Source/ThirdParty/ANGLE/src/common/debug.cpp b/Source/ThirdParty/ANGLE/src/common/debug.cpp
index 3de5d4e..845d258 100644
--- a/Source/ThirdParty/ANGLE/src/common/debug.cpp
+++ b/Source/ThirdParty/ANGLE/src/common/debug.cpp
@@ -1,44 +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.
-//
-
-// debug.cpp: Debugging utilities.
-
-#include "common/debug.h"
-
-#include <stdio.h>
-#include <stdarg.h>
-
-#ifndef TRACE_OUTPUT_FILE
-#define TRACE_OUTPUT_FILE "debug.txt"
-#endif
-
-static bool trace_on = true;
-
-namespace gl
-{
-void trace(const char *format, ...)
-{
-#if !defined(ANGLE_DISABLE_TRACE)
- if (trace_on)
- {
- if (format)
- {
- FILE *file = fopen(TRACE_OUTPUT_FILE, "a");
-
- if (file)
- {
- va_list vararg;
- va_start(vararg, format);
- vfprintf(file, format, vararg);
- va_end(vararg);
-
- fclose(file);
- }
- }
- }
-#endif // !defined(ANGLE_DISABLE_TRACE)
-}
-}
+//
+// 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>
+#include <d3d9.h>
+#include <windows.h>
+
+namespace gl
+{
+
+typedef void (WINAPI *PerfOutputFunction)(D3DCOLOR, LPCWSTR);
+
+static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg)
+{
+#if !defined(ANGLE_DISABLE_PERF)
+ if (perfActive())
+ {
+ char message[32768];
+ int len = vsprintf_s(message, format, vararg);
+ if (len < 0)
+ {
+ return;
+ }
+
+ // There are no ASCII variants of these D3DPERF functions.
+ wchar_t wideMessage[32768];
+ for (int i = 0; i < len; ++i)
+ {
+ wideMessage[i] = message[i];
+ }
+ wideMessage[len] = 0;
+
+ perfFunc(0, wideMessage);
+ }
+#endif
+
+#if !defined(ANGLE_DISABLE_TRACE)
+#if defined(NDEBUG)
+ if (traceFileDebugOnly)
+ {
+ return;
+ }
+#endif
+
+ FILE* file = fopen(TRACE_OUTPUT_FILE, "a");
+ if (file)
+ {
+ vfprintf(file, format, vararg);
+ fclose(file);
+ }
+#endif
+}
+
+void trace(bool traceFileDebugOnly, const char *format, ...)
+{
+ va_list vararg;
+ va_start(vararg, format);
+#if defined(ANGLE_DISABLE_PERF)
+ output(traceFileDebugOnly, NULL, format, vararg);
+#else
+ output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg);
+#endif
+ va_end(vararg);
+}
+
+bool perfActive()
+{
+#if defined(ANGLE_DISABLE_PERF)
+ return false;
+#else
+ static bool active = D3DPERF_GetStatus() != 0;
+ return active;
+#endif
+}
+
+ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
+{
+#if !defined(ANGLE_DISABLE_PERF)
+ va_list vararg;
+ va_start(vararg, format);
+ output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);
+ va_end(vararg);
+#endif
+}
+
+ScopedPerfEventHelper::~ScopedPerfEventHelper()
+{
+#if !defined(ANGLE_DISABLE_PERF)
+ if (perfActive())
+ {
+ D3DPERF_EndEvent();
+ }
+#endif
+}
+}
diff --git a/Source/ThirdParty/ANGLE/src/common/debug.h b/Source/ThirdParty/ANGLE/src/common/debug.h
index 2c4ec70..9828ecf 100644
--- a/Source/ThirdParty/ANGLE/src/common/debug.h
+++ b/Source/ThirdParty/ANGLE/src/common/debug.h
@@ -12,49 +12,87 @@
#include <stdio.h>
#include <assert.h>
+#include "common/angleutils.h"
+
+#if !defined(TRACE_OUTPUT_FILE)
+#define TRACE_OUTPUT_FILE "debug.txt"
+#endif
+
namespace gl
{
// Outputs text to the debugging log
- void trace(const char *format, ...);
+ void trace(bool traceFileDebugOnly, const char *format, ...);
+
+ // Returns whether D3DPERF is active.
+ bool perfActive();
+
+ // Pairs a D3D begin event with an end event.
+ class ScopedPerfEventHelper
+ {
+ public:
+ ScopedPerfEventHelper(const char* format, ...);
+ ~ScopedPerfEventHelper();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ScopedPerfEventHelper);
+ };
}
// A macro to output a trace of a function call and its arguments to the debugging log
-#if !defined(NDEBUG) && !defined(ANGLE_DISABLE_TRACE)
- #define TRACE(message, ...) gl::trace("trace: %s"message"\n", __FUNCTION__, __VA_ARGS__)
+#if defined(ANGLE_DISABLE_TRACE) && defined(ANGLE_DISABLE_PERF)
+#define TRACE(message, ...) (void(0))
+#else
+#define TRACE(message, ...) gl::trace(true, "trace: %s(%d): "message"\n", __FUNCTION__, __LINE__, __VA_ARGS__)
+#endif
+
+// A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing.
+#if defined(ANGLE_DISABLE_TRACE) && defined(ANGLE_DISABLE_PERF)
+#define FIXME(message, ...) (void(0))
#else
- #define TRACE(...) ((void)0)
+#define FIXME(message, ...) gl::trace(false, "fixme: %s(%d): "message"\n", __FUNCTION__, __LINE__, __VA_ARGS__)
#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.
+#if defined(ANGLE_DISABLE_TRACE) && defined(ANGLE_DISABLE_PERF)
+#define ERR(message, ...) (void(0))
+#else
+#define ERR(message, ...) gl::trace(false, "err: %s(%d): "message"\n", __FUNCTION__, __LINE__, __VA_ARGS__)
+#endif
-// 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 to log a performance event around a scope.
+#if defined(ANGLE_DISABLE_TRACE) && defined(ANGLE_DISABLE_PERF)
+#define EVENT(message, ...) (void(0))
+#else
+#define EVENT(message, ...) gl::ScopedPerfEventHelper scopedPerfEventHelper ## __LINE__(__FUNCTION__ message "\n", __VA_ARGS__);
+#endif
// A macro asserting a condition and outputting failures to the debug log
+#if !defined(NDEBUG)
#define ASSERT(expression) do { \
if(!(expression)) \
ERR("\t! Assert failed in %s(%d): "#expression"\n", __FUNCTION__, __LINE__); \
- assert(expression); \
+ assert(expression); \
} while(0)
-
+#else
+#define ASSERT(expression) (void(0))
+#endif
// A macro to indicate unimplemented functionality
-#ifndef NDEBUG
- #define UNIMPLEMENTED() do { \
- FIXME("\t! Unimplemented: %s(%d)\n", __FUNCTION__, __LINE__); \
- assert(false); \
- } while(0)
+#if !defined(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)
+#if !defined(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
diff --git a/Source/ThirdParty/ANGLE/src/common/version.h b/Source/ThirdParty/ANGLE/src/common/version.h
new file mode 100644
index 0000000..203c421
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/common/version.h
@@ -0,0 +1,10 @@
+#define MAJOR_VERSION 1
+#define MINOR_VERSION 0
+#define BUILD_VERSION 0
+#define BUILD_REVISION 1009
+
+#define STRINGIFY(x) #x
+#define MACRO_STRINGIFY(x) STRINGIFY(x)
+
+#define REVISION_STRING MACRO_STRINGIFY(BUILD_REVISION)
+#define VERSION_STRING MACRO_STRINGIFY(MAJOR_VERSION) "." MACRO_STRINGIFY(MINOR_VERSION) "." MACRO_STRINGIFY(BUILD_VERSION) "." MACRO_STRINGIFY(BUILD_REVISION)
diff --git a/Source/ThirdParty/ANGLE/src/compiler/BaseTypes.h b/Source/ThirdParty/ANGLE/src/compiler/BaseTypes.h
index 9f4a860..5f83185 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/BaseTypes.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/BaseTypes.h
@@ -42,9 +42,12 @@ enum TBasicType
EbtGuardSamplerBegin, // non type: see implementation of IsSampler()
EbtSampler2D,
EbtSamplerCube,
+ EbtSamplerExternalOES, // Only valid if OES_EGL_image_external exists.
+ EbtSampler2DRect, // Only valid if GL_ARB_texture_rectangle exists.
EbtGuardSamplerEnd, // non type: see implementation of IsSampler()
EbtStruct,
EbtAddress, // should be deprecated??
+ EbtInvariant, // used as a type when qualifying a previously declared variable as being invariant
};
inline const char* getBasicString(TBasicType t)
@@ -57,6 +60,8 @@ inline const char* getBasicString(TBasicType t)
case EbtBool: return "bool"; break;
case EbtSampler2D: return "sampler2D"; break;
case EbtSamplerCube: return "samplerCube"; break;
+ case EbtSamplerExternalOES: return "samplerExternalOES"; break;
+ case EbtSampler2DRect: return "sampler2DRect"; break;
case EbtStruct: return "structure"; break;
default: return "unknown type";
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/BuiltInFunctionEmulator.cpp b/Source/ThirdParty/ANGLE/src/compiler/BuiltInFunctionEmulator.cpp
new file mode 100644
index 0000000..3cd3927
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/BuiltInFunctionEmulator.cpp
@@ -0,0 +1,437 @@
+//
+// Copyright (c) 2002-2011 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/BuiltInFunctionEmulator.h"
+
+#include "compiler/SymbolTable.h"
+
+namespace {
+
+// we use macros here instead of function definitions to work around more GLSL
+// compiler bugs, in particular on NVIDIA hardware on Mac OSX. Macros are
+// problematic because if the argument has side-effects they will be repeatedly
+// evaluated. This is unlikely to show up in real shaders, but is something to
+// consider.
+const char* kFunctionEmulationVertexSource[] = {
+ "#error no emulation for atan(float, float)",
+ "vec2 webgl_atan_emu(vec2 y, vec2 x) { return vec2(atan(y[0], x[0]), atan(y[1], x[1])); }",
+ "vec3 webgl_atan_emu(vec3 y, vec3 x) { return vec3(atan(y[0], x[0]), atan(y[1], x[1]), atan(y[2], x[2])); }",
+ "vec4 webgl_atan_emu(vec4 y, vec4 x) { return vec4(atan(y[0], x[0]), atan(y[1], x[1]), atan(y[2], x[2]), atan(y[3], x[3])); }",
+
+ "#error no emulation for cos(float)",
+ "#error no emulation for cos(vec2)",
+ "#error no emulation for cos(vec3)",
+ "#error no emulation for cos(vec4)",
+
+ "#define webgl_distance_emu(x, y) ((x) >= (y) ? (x) - (y) : (y) - (x))",
+ "#error no emulation for distance(vec2, vec2)",
+ "#error no emulation for distance(vec3, vec3)",
+ "#error no emulation for distance(vec4, vec4)",
+
+ "#define webgl_dot_emu(x, y) ((x) * (y))",
+ "#error no emulation for dot(vec2, vec2)",
+ "#error no emulation for dot(vec3, vec3)",
+ "#error no emulation for dot(vec4, vec4)",
+
+ "#define webgl_length_emu(x) ((x) >= 0.0 ? (x) : -(x))",
+ "#error no emulation for length(vec2)",
+ "#error no emulation for length(vec3)",
+ "#error no emulation for length(vec4)",
+
+ "#error no emulation for mod(float, float)",
+ "vec2 webgl_mod_emu(vec2 x, vec2 y) { return vec2(mod(x[0], y[0]), mod(x[1], y[1])); }",
+ "vec3 webgl_mod_emu(vec3 x, vec3 y) { return vec3(mod(x[0], y[0]), mod(x[1], y[1]), mod(x[2], y[2])); }",
+ "vec4 webgl_mod_emu(vec4 x, vec4 y) { return vec4(mod(x[0], y[0]), mod(x[1], y[1]), mod(x[2], y[2]), mod(x[3], y[3])); }",
+
+ "#define webgl_normalize_emu(x) ((x) == 0.0 ? 0.0 : ((x) > 0.0 ? 1.0 : -1.0))",
+ "#error no emulation for normalize(vec2)",
+ "#error no emulation for normalize(vec3)",
+ "#error no emulation for normalize(vec4)",
+
+ "#define webgl_reflect_emu(I, N) ((I) - 2.0 * (N) * (I) * (N))",
+ "#error no emulation for reflect(vec2, vec2)",
+ "#error no emulation for reflect(vec3, vec3)",
+ "#error no emulation for reflect(vec4, vec4)"
+};
+
+const char* kFunctionEmulationFragmentSource[] = {
+ "#error no emulation for atan(float, float)",
+ "#error no emulation for atan(vec2, vec2)",
+ "#error no emulation for atan(vec3, vec3)",
+ "#error no emulation for atan(vec4, vec4)",
+
+ "webgl_emu_precision float webgl_cos_emu(webgl_emu_precision float a) { return cos(a); }",
+ "webgl_emu_precision vec2 webgl_cos_emu(webgl_emu_precision vec2 a) { return cos(a); }",
+ "webgl_emu_precision vec3 webgl_cos_emu(webgl_emu_precision vec3 a) { return cos(a); }",
+ "webgl_emu_precision vec4 webgl_cos_emu(webgl_emu_precision vec4 a) { return cos(a); }",
+
+ "#error no emulation for distance(float, float)",
+ "#error no emulation for distance(vec2, vec2)",
+ "#error no emulation for distance(vec3, vec3)",
+ "#error no emulation for distance(vec4, vec4)",
+
+ "#error no emulation for dot(float, float)",
+ "#error no emulation for dot(vec2, vec2)",
+ "#error no emulation for dot(vec3, vec3)",
+ "#error no emulation for dot(vec4, vec4)",
+
+ "#error no emulation for length(float)",
+ "#error no emulation for length(vec2)",
+ "#error no emulation for length(vec3)",
+ "#error no emulation for length(vec4)",
+
+ "#error no emulation for mod(float, float)",
+ "#error no emulation for mod(vec2, vec2)",
+ "#error no emulation for mod(vec3, vec3)",
+ "#error no emulation for mod(vec4, vec4)",
+
+ "#error no emulation for normalize(float)",
+ "#error no emulation for normalize(vec2)",
+ "#error no emulation for normalize(vec3)",
+ "#error no emulation for normalize(vec4)",
+
+ "#error no emulation for reflect(float, float)",
+ "#error no emulation for reflect(vec2, vec2)",
+ "#error no emulation for reflect(vec3, vec3)",
+ "#error no emulation for reflect(vec4, vec4)"
+};
+
+const bool kFunctionEmulationVertexMask[] = {
+#if defined(__APPLE__)
+ // Work around ATI driver bugs in Mac.
+ false, // TFunctionAtan1_1
+ false, // TFunctionAtan2_2
+ false, // TFunctionAtan3_3
+ false, // TFunctionAtan4_4
+ false, // TFunctionCos1
+ false, // TFunctionCos2
+ false, // TFunctionCos3
+ false, // TFunctionCos4
+ true, // TFunctionDistance1_1
+ false, // TFunctionDistance2_2
+ false, // TFunctionDistance3_3
+ false, // TFunctionDistance4_4
+ true, // TFunctionDot1_1
+ false, // TFunctionDot2_2
+ false, // TFunctionDot3_3
+ false, // TFunctionDot4_4
+ true, // TFunctionLength1
+ false, // TFunctionLength2
+ false, // TFunctionLength3
+ false, // TFunctionLength4
+ false, // TFunctionMod1_1
+ false, // TFunctionMod2_2
+ false, // TFunctionMod3_3
+ false, // TFunctionMod4_4
+ true, // TFunctionNormalize1
+ false, // TFunctionNormalize2
+ false, // TFunctionNormalize3
+ false, // TFunctionNormalize4
+ true, // TFunctionReflect1_1
+ false, // TFunctionReflect2_2
+ false, // TFunctionReflect3_3
+ false, // TFunctionReflect4_4
+#else
+ // Work around D3D driver bug in Win.
+ false, // TFunctionAtan1_1
+ true, // TFunctionAtan2_2
+ true, // TFunctionAtan3_3
+ true, // TFunctionAtan4_4
+ false, // TFunctionCos1
+ false, // TFunctionCos2
+ false, // TFunctionCos3
+ false, // TFunctionCos4
+ false, // TFunctionDistance1_1
+ false, // TFunctionDistance2_2
+ false, // TFunctionDistance3_3
+ false, // TFunctionDistance4_4
+ false, // TFunctionDot1_1
+ false, // TFunctionDot2_2
+ false, // TFunctionDot3_3
+ false, // TFunctionDot4_4
+ false, // TFunctionLength1
+ false, // TFunctionLength2
+ false, // TFunctionLength3
+ false, // TFunctionLength4
+ false, // TFunctionMod1_1
+ true, // TFunctionMod2_2
+ true, // TFunctionMod3_3
+ true, // TFunctionMod4_4
+ false, // TFunctionNormalize1
+ false, // TFunctionNormalize2
+ false, // TFunctionNormalize3
+ false, // TFunctionNormalize4
+ false, // TFunctionReflect1_1
+ false, // TFunctionReflect2_2
+ false, // TFunctionReflect3_3
+ false, // TFunctionReflect4_4
+#endif
+ false // TFunctionUnknown
+};
+
+const bool kFunctionEmulationFragmentMask[] = {
+ false, // TFunctionAtan1_1
+ false, // TFunctionAtan2_2
+ false, // TFunctionAtan3_3
+ false, // TFunctionAtan4_4
+#if defined(__APPLE__)
+ // Work around a ATI driver bug in Mac that causes crashes.
+ true, // TFunctionCos1
+ true, // TFunctionCos2
+ true, // TFunctionCos3
+ true, // TFunctionCos4
+#else
+ false, // TFunctionCos1
+ false, // TFunctionCos2
+ false, // TFunctionCos3
+ false, // TFunctionCos4
+#endif
+ false, // TFunctionDistance1_1
+ false, // TFunctionDistance2_2
+ false, // TFunctionDistance3_3
+ false, // TFunctionDistance4_4
+ false, // TFunctionDot1_1
+ false, // TFunctionDot2_2
+ false, // TFunctionDot3_3
+ false, // TFunctionDot4_4
+ false, // TFunctionLength1
+ false, // TFunctionLength2
+ false, // TFunctionLength3
+ false, // TFunctionLength4
+ false, // TFunctionMod1_1
+ false, // TFunctionMod2_2
+ false, // TFunctionMod3_3
+ false, // TFunctionMod4_4
+ false, // TFunctionNormalize1
+ false, // TFunctionNormalize2
+ false, // TFunctionNormalize3
+ false, // TFunctionNormalize4
+ false, // TFunctionReflect1_1
+ false, // TFunctionReflect2_2
+ false, // TFunctionReflect3_3
+ false, // TFunctionReflect4_4
+ false // TFunctionUnknown
+};
+
+class BuiltInFunctionEmulationMarker : public TIntermTraverser {
+public:
+ BuiltInFunctionEmulationMarker(BuiltInFunctionEmulator& emulator)
+ : mEmulator(emulator)
+ {
+ }
+
+ virtual ~BuiltInFunctionEmulationMarker() {}
+
+ virtual bool visitUnary(Visit visit, TIntermUnary* node)
+ {
+ if (visit == PreVisit) {
+ bool needToEmulate = mEmulator.SetFunctionCalled(
+ node->getOp(), node->getOperand()->getType());
+ if (needToEmulate)
+ node->setUseEmulatedFunction();
+ }
+ return true;
+ }
+
+ virtual bool visitAggregate(Visit visit, TIntermAggregate* node)
+ {
+ if (visit == PreVisit) {
+ // Here we handle all the built-in functions instead of the ones we
+ // currently identified as problematic.
+ switch (node->getOp()) {
+ case EOpLessThan:
+ case EOpGreaterThan:
+ case EOpLessThanEqual:
+ case EOpGreaterThanEqual:
+ case EOpVectorEqual:
+ case EOpVectorNotEqual:
+ case EOpMod:
+ case EOpPow:
+ case EOpAtan:
+ case EOpMin:
+ case EOpMax:
+ case EOpClamp:
+ case EOpMix:
+ case EOpStep:
+ case EOpSmoothStep:
+ case EOpDistance:
+ case EOpDot:
+ case EOpCross:
+ case EOpFaceForward:
+ case EOpReflect:
+ case EOpRefract:
+ case EOpMul:
+ break;
+ default:
+ return true;
+ };
+ const TIntermSequence& sequence = node->getSequence();
+ // Right now we only handle built-in functions with two parameters.
+ if (sequence.size() != 2)
+ return true;
+ TIntermTyped* param1 = sequence[0]->getAsTyped();
+ TIntermTyped* param2 = sequence[1]->getAsTyped();
+ if (!param1 || !param2)
+ return true;
+ bool needToEmulate = mEmulator.SetFunctionCalled(
+ node->getOp(), param1->getType(), param2->getType());
+ if (needToEmulate)
+ node->setUseEmulatedFunction();
+ }
+ return true;
+ }
+
+private:
+ BuiltInFunctionEmulator& mEmulator;
+};
+
+} // anonymous namepsace
+
+BuiltInFunctionEmulator::BuiltInFunctionEmulator(ShShaderType shaderType)
+{
+ if (shaderType == SH_FRAGMENT_SHADER) {
+ mFunctionMask = kFunctionEmulationFragmentMask;
+ mFunctionSource = kFunctionEmulationFragmentSource;
+ } else {
+ mFunctionMask = kFunctionEmulationVertexMask;
+ mFunctionSource = kFunctionEmulationVertexSource;
+ }
+}
+
+bool BuiltInFunctionEmulator::SetFunctionCalled(
+ TOperator op, const TType& param)
+{
+ TBuiltInFunction function = IdentifyFunction(op, param);
+ return SetFunctionCalled(function);
+}
+
+bool BuiltInFunctionEmulator::SetFunctionCalled(
+ TOperator op, const TType& param1, const TType& param2)
+{
+ TBuiltInFunction function = IdentifyFunction(op, param1, param2);
+ return SetFunctionCalled(function);
+}
+
+bool BuiltInFunctionEmulator::SetFunctionCalled(
+ BuiltInFunctionEmulator::TBuiltInFunction function) {
+ if (function == TFunctionUnknown || mFunctionMask[function] == false)
+ return false;
+ for (size_t i = 0; i < mFunctions.size(); ++i) {
+ if (mFunctions[i] == function)
+ return true;
+ }
+ mFunctions.push_back(function);
+ return true;
+}
+
+void BuiltInFunctionEmulator::OutputEmulatedFunctionDefinition(
+ TInfoSinkBase& out, bool withPrecision) const
+{
+ if (mFunctions.size() == 0)
+ return;
+ out << "// BEGIN: Generated code for built-in function emulation\n\n";
+ if (withPrecision) {
+ out << "#if defined(GL_FRAGMENT_PRECISION_HIGH)\n"
+ << "#define webgl_emu_precision highp\n"
+ << "#else\n"
+ << "#define webgl_emu_precision mediump\n"
+ << "#endif\n\n";
+ } else {
+ out << "#define webgl_emu_precision\n\n";
+ }
+ for (size_t i = 0; i < mFunctions.size(); ++i) {
+ out << mFunctionSource[mFunctions[i]] << "\n\n";
+ }
+ out << "// END: Generated code for built-in function emulation\n\n";
+}
+
+BuiltInFunctionEmulator::TBuiltInFunction
+BuiltInFunctionEmulator::IdentifyFunction(
+ TOperator op, const TType& param)
+{
+ if (param.getNominalSize() > 4)
+ return TFunctionUnknown;
+ unsigned int function = TFunctionUnknown;
+ switch (op) {
+ case EOpCos:
+ function = TFunctionCos1;
+ break;
+ case EOpLength:
+ function = TFunctionLength1;
+ break;
+ case EOpNormalize:
+ function = TFunctionNormalize1;
+ break;
+ default:
+ break;
+ }
+ if (function == TFunctionUnknown)
+ return TFunctionUnknown;
+ if (param.isVector())
+ function += param.getNominalSize() - 1;
+ return static_cast<TBuiltInFunction>(function);
+}
+
+BuiltInFunctionEmulator::TBuiltInFunction
+BuiltInFunctionEmulator::IdentifyFunction(
+ TOperator op, const TType& param1, const TType& param2)
+{
+ // Right now for all the emulated functions with two parameters, the two
+ // parameters have the same type.
+ if (param1.isVector() != param2.isVector() ||
+ param1.getNominalSize() != param2.getNominalSize() ||
+ param1.getNominalSize() > 4)
+ return TFunctionUnknown;
+
+ unsigned int function = TFunctionUnknown;
+ switch (op) {
+ case EOpAtan:
+ function = TFunctionAtan1_1;
+ break;
+ case EOpDistance:
+ function = TFunctionDistance1_1;
+ break;
+ case EOpDot:
+ function = TFunctionDot1_1;
+ break;
+ case EOpMod:
+ function = TFunctionMod1_1;
+ break;
+ case EOpReflect:
+ function = TFunctionReflect1_1;
+ break;
+ default:
+ break;
+ }
+ if (function == TFunctionUnknown)
+ return TFunctionUnknown;
+ if (param1.isVector())
+ function += param1.getNominalSize() - 1;
+ return static_cast<TBuiltInFunction>(function);
+}
+
+void BuiltInFunctionEmulator::MarkBuiltInFunctionsForEmulation(
+ TIntermNode* root)
+{
+ ASSERT(root);
+
+ BuiltInFunctionEmulationMarker marker(*this);
+ root->traverse(&marker);
+}
+
+void BuiltInFunctionEmulator::Cleanup()
+{
+ mFunctions.clear();
+}
+
+//static
+TString BuiltInFunctionEmulator::GetEmulatedFunctionName(
+ const TString& name)
+{
+ ASSERT(name[name.length() - 1] == '(');
+ return "webgl_" + name.substr(0, name.length() - 1) + "_emu(";
+}
+
diff --git a/Source/ThirdParty/ANGLE/src/compiler/BuiltInFunctionEmulator.h b/Source/ThirdParty/ANGLE/src/compiler/BuiltInFunctionEmulator.h
new file mode 100644
index 0000000..b37b665
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/BuiltInFunctionEmulator.h
@@ -0,0 +1,103 @@
+//
+// Copyright (c) 2011 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 COMPILIER_BUILT_IN_FUNCTION_EMULATOR_H_
+#define COMPILIER_BUILT_IN_FUNCTION_EMULATOR_H_
+
+#include "GLSLANG/ShaderLang.h"
+
+#include "compiler/InfoSink.h"
+#include "compiler/intermediate.h"
+
+//
+// This class decides which built-in functions need to be replaced with the
+// emulated ones.
+// It's only a workaround for OpenGL driver bugs, and isn't needed in general.
+//
+class BuiltInFunctionEmulator {
+public:
+ BuiltInFunctionEmulator(ShShaderType shaderType);
+ // Records that a function is called by the shader and might needs to be
+ // emulated. If the function's group is not in mFunctionGroupFilter, this
+ // becomes an no-op.
+ // Returns true if the function call needs to be replaced with an emulated
+ // one.
+ bool SetFunctionCalled(TOperator op, const TType& param);
+ bool SetFunctionCalled(
+ TOperator op, const TType& param1, const TType& param2);
+
+ // Output function emulation definition. This should be before any other
+ // shader source.
+ void OutputEmulatedFunctionDefinition(TInfoSinkBase& out, bool withPrecision) const;
+
+ void MarkBuiltInFunctionsForEmulation(TIntermNode* root);
+
+ void Cleanup();
+
+ // "name(" becomes "webgl_name_emu(".
+ static TString GetEmulatedFunctionName(const TString& name);
+
+private:
+ //
+ // Built-in functions.
+ //
+ enum TBuiltInFunction {
+ TFunctionAtan1_1 = 0, // float atan(float, float);
+ TFunctionAtan2_2, // vec2 atan(vec2, vec2);
+ TFunctionAtan3_3, // vec3 atan(vec3, vec2);
+ TFunctionAtan4_4, // vec4 atan(vec4, vec2);
+
+ TFunctionCos1, // float cos(float);
+ TFunctionCos2, // vec2 cos(vec2);
+ TFunctionCos3, // vec3 cos(vec3);
+ TFunctionCos4, // vec4 cos(vec4);
+
+ TFunctionDistance1_1, // float distance(float, float);
+ TFunctionDistance2_2, // vec2 distance(vec2, vec2);
+ TFunctionDistance3_3, // vec3 distance(vec3, vec3);
+ TFunctionDistance4_4, // vec4 distance(vec4, vec4);
+
+ TFunctionDot1_1, // float dot(float, float);
+ TFunctionDot2_2, // vec2 dot(vec2, vec2);
+ TFunctionDot3_3, // vec3 dot(vec3, vec3);
+ TFunctionDot4_4, // vec4 dot(vec4, vec4);
+
+ TFunctionLength1, // float length(float);
+ TFunctionLength2, // float length(vec2);
+ TFunctionLength3, // float length(vec3);
+ TFunctionLength4, // float length(vec4);
+
+ TFunctionMod1_1, // float mod(float, float);
+ TFunctionMod2_2, // vec2 mod(vec2, vec2);
+ TFunctionMod3_3, // vec3 mod(vec3, vec3);
+ TFunctionMod4_4, // vec4 mod(vec4, vec4);
+
+ TFunctionNormalize1, // float normalize(float);
+ TFunctionNormalize2, // vec2 normalize(vec2);
+ TFunctionNormalize3, // vec3 normalize(vec3);
+ TFunctionNormalize4, // vec4 normalize(vec4);
+
+ TFunctionReflect1_1, // float reflect(float, float);
+ TFunctionReflect2_2, // vec2 reflect(vec2, vec2);
+ TFunctionReflect3_3, // vec3 reflect(vec3, vec3);
+ TFunctionReflect4_4, // vec4 reflect(vec4, vec4);
+
+ TFunctionUnknown
+ };
+
+ TBuiltInFunction IdentifyFunction(TOperator op, const TType& param);
+ TBuiltInFunction IdentifyFunction(
+ TOperator op, const TType& param1, const TType& param2);
+
+ bool SetFunctionCalled(TBuiltInFunction function);
+
+ std::vector<TBuiltInFunction> mFunctions;
+
+ const bool* mFunctionMask; // a boolean flag for each function.
+ const char** mFunctionSource;
+};
+
+#endif // COMPILIER_BUILT_IN_FUNCTION_EMULATOR_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp
index d140b37..226bf8f 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/CodeGenGLSL.cpp
@@ -5,15 +5,24 @@
//
#include "compiler/TranslatorGLSL.h"
+#include "compiler/TranslatorESSL.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(ShShaderType type, ShShaderSpec spec)
+TCompiler* ConstructCompiler(
+ ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
{
- return new TranslatorGLSL(type, spec);
+ switch (output) {
+ case SH_GLSL_OUTPUT:
+ return new TranslatorGLSL(type, spec);
+ case SH_ESSL_OUTPUT:
+ return new TranslatorESSL(type, spec);
+ default:
+ return NULL;
+ }
}
//
diff --git a/Source/ThirdParty/ANGLE/src/compiler/CodeGenHLSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/CodeGenHLSL.cpp
index e04e789..f46ff66 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/CodeGenHLSL.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/CodeGenHLSL.cpp
@@ -11,9 +11,15 @@
// compile object used by higher level code. It returns
// a subclass of TCompiler.
//
-TCompiler* ConstructCompiler(ShShaderType type, ShShaderSpec spec)
+TCompiler* ConstructCompiler(
+ ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
{
- return new TranslatorHLSL(type, spec);
+ switch (output) {
+ case SH_HLSL_OUTPUT:
+ return new TranslatorHLSL(type, spec);
+ default:
+ return NULL;
+ }
}
//
diff --git a/Source/ThirdParty/ANGLE/src/compiler/Compiler.cpp b/Source/ThirdParty/ANGLE/src/compiler/Compiler.cpp
index 649b457..f27cb75 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/Compiler.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/Compiler.cpp
@@ -1,10 +1,14 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 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/BuiltInFunctionEmulator.h"
+#include "compiler/DetectRecursion.h"
+#include "compiler/ForLoopUnroll.h"
#include "compiler/Initialize.h"
+#include "compiler/MapLongVariableNames.h"
#include "compiler/ParseHelper.h"
#include "compiler/ShHandle.h"
#include "compiler/ValidateLimitations.h"
@@ -17,7 +21,10 @@ bool InitializeSymbolTable(
{
TIntermediate intermediate(infoSink);
TExtensionBehavior extBehavior;
- TParseContext parseContext(symbolTable, extBehavior, intermediate, type, spec, infoSink);
+ InitExtensionBehavior(resources, extBehavior);
+ // The builtins deliberately don't specify precisions for the function
+ // arguments and return types. For that reason we don't try to check them.
+ TParseContext parseContext(symbolTable, extBehavior, intermediate, type, spec, 0, false, NULL, infoSink);
GlobalParseContext = &parseContext;
@@ -81,12 +88,16 @@ TShHandleBase::~TShHandleBase() {
TCompiler::TCompiler(ShShaderType type, ShShaderSpec spec)
: shaderType(type),
- shaderSpec(spec)
+ shaderSpec(spec),
+ builtInFunctionEmulator(type)
{
+ longNameMap = LongNameMap::GetInstance();
}
TCompiler::~TCompiler()
{
+ ASSERT(longNameMap);
+ longNameMap->Release();
}
bool TCompiler::Init(const ShBuiltInResources& resources)
@@ -115,9 +126,19 @@ bool TCompiler::compile(const char* const shaderStrings[],
if (shaderSpec == SH_WEBGL_SPEC)
compileOptions |= SH_VALIDATE_LOOP_INDEXING;
+ // First string is path of source file if flag is set. The actual source follows.
+ const char* sourcePath = NULL;
+ int firstSource = 0;
+ if (compileOptions & SH_SOURCE_PATH)
+ {
+ sourcePath = shaderStrings[0];
+ ++firstSource;
+ }
+
TIntermediate intermediate(infoSink);
TParseContext parseContext(symbolTable, extensionBehavior, intermediate,
- shaderType, shaderSpec, infoSink);
+ shaderType, shaderSpec, compileOptions, true,
+ sourcePath, infoSink);
GlobalParseContext = &parseContext;
// We preserve symbols at the built-in level from compile-to-compile.
@@ -128,23 +149,40 @@ bool TCompiler::compile(const char* const shaderStrings[],
// Parse shader.
bool success =
- (PaParseStrings(numStrings, shaderStrings, NULL, &parseContext) == 0) &&
+ (PaParseStrings(numStrings - firstSource, &shaderStrings[firstSource], NULL, &parseContext) == 0) &&
(parseContext.treeRoot != NULL);
if (success) {
TIntermNode* root = parseContext.treeRoot;
success = intermediate.postProcess(root);
+ if (success)
+ success = detectRecursion(root);
+
if (success && (compileOptions & SH_VALIDATE_LOOP_INDEXING))
success = validateLimitations(root);
+ // Unroll for-loop markup needs to happen after validateLimitations pass.
+ if (success && (compileOptions & SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX))
+ ForLoopUnroll::MarkForLoopsWithIntegerIndicesForUnrolling(root);
+
+ // Built-in function emulation needs to happen after validateLimitations pass.
+ if (success && (compileOptions & SH_EMULATE_BUILT_IN_FUNCTIONS))
+ builtInFunctionEmulator.MarkBuiltInFunctionsForEmulation(root);
+
+ // Call mapLongVariableNames() before collectAttribsUniforms() so in
+ // collectAttribsUniforms() we already have the mapped symbol names and
+ // we could composite mapped and original variable names.
+ if (success && (compileOptions & SH_MAP_LONG_VARIABLE_NAMES))
+ mapLongVariableNames(root);
+
+ if (success && (compileOptions & SH_ATTRIBUTES_UNIFORMS))
+ collectAttribsUniforms(root);
+
if (success && (compileOptions & SH_INTERMEDIATE_TREE))
intermediate.outputTree(root);
if (success && (compileOptions & SH_OBJECT_CODE))
translate(root);
-
- if (success && (compileOptions & SH_ATTRIBUTES_UNIFORMS))
- collectAttribsUniforms(root);
}
// Cleanup memory.
@@ -174,6 +212,27 @@ void TCompiler::clearResults()
attribs.clear();
uniforms.clear();
+
+ builtInFunctionEmulator.Cleanup();
+}
+
+bool TCompiler::detectRecursion(TIntermNode* root)
+{
+ DetectRecursion detect;
+ root->traverse(&detect);
+ switch (detect.detectRecursion()) {
+ case DetectRecursion::kErrorNone:
+ return true;
+ case DetectRecursion::kErrorMissingMain:
+ infoSink.info.message(EPrefixError, "Missing main()");
+ return false;
+ case DetectRecursion::kErrorRecursion:
+ infoSink.info.message(EPrefixError, "Function recursion detected");
+ return false;
+ default:
+ UNREACHABLE();
+ return false;
+ }
}
bool TCompiler::validateLimitations(TIntermNode* root) {
@@ -187,3 +246,25 @@ void TCompiler::collectAttribsUniforms(TIntermNode* root)
CollectAttribsUniforms collect(attribs, uniforms);
root->traverse(&collect);
}
+
+void TCompiler::mapLongVariableNames(TIntermNode* root)
+{
+ ASSERT(longNameMap);
+ MapLongVariableNames map(longNameMap);
+ root->traverse(&map);
+}
+
+int TCompiler::getMappedNameMaxLength() const
+{
+ return MAX_SHORTENED_IDENTIFIER_SIZE + 1;
+}
+
+const TExtensionBehavior& TCompiler::getExtensionBehavior() const
+{
+ return extensionBehavior;
+}
+
+const BuiltInFunctionEmulator& TCompiler::getBuiltInFunctionEmulator() const
+{
+ return builtInFunctionEmulator;
+}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ConstantUnion.h b/Source/ThirdParty/ANGLE/src/compiler/ConstantUnion.h
index cf531ea..fd9d94d 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ConstantUnion.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/ConstantUnion.h
@@ -11,6 +11,10 @@
class ConstantUnion {
public:
+ ConstantUnion()
+ {
+ iConst = 0;
+ }
POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
void setIConst(int i) {iConst = i; type = EbtInt; }
@@ -26,26 +30,17 @@ public:
bool operator==(const int i) const
{
- if (i == iConst)
- return true;
-
- return false;
+ return i == iConst;
}
bool operator==(const float f) const
{
- if (f == fConst)
- return true;
-
- return false;
+ return f == fConst;
}
bool operator==(const bool b) const
{
- if (b == bConst)
- return true;
-
- return false;
+ return b == bConst;
}
bool operator==(const ConstantUnion& constant) const
@@ -55,23 +50,14 @@ public:
switch (type) {
case EbtInt:
- if (constant.iConst == iConst)
- return true;
-
- break;
+ return constant.iConst == iConst;
case EbtFloat:
- if (constant.fConst == fConst)
- return true;
-
- break;
+ return constant.fConst == fConst;
case EbtBool:
- if (constant.bConst == bConst)
- return true;
-
- break;
+ return constant.bConst == bConst;
+ default:
+ return false;
}
-
- return false;
}
bool operator!=(const int i) const
@@ -99,21 +85,12 @@ public:
assert(type == constant.type);
switch (type) {
case EbtInt:
- if (iConst > constant.iConst)
- return true;
-
- return false;
+ return iConst > constant.iConst;
case EbtFloat:
- if (fConst > constant.fConst)
- return true;
-
- return false;
+ return fConst > constant.fConst;
default:
- assert(false && "Default missing");
- return false;
+ return false; // Invalid operation, handled at semantic analysis
}
-
- return false;
}
bool operator<(const ConstantUnion& constant) const
@@ -121,21 +98,12 @@ public:
assert(type == constant.type);
switch (type) {
case EbtInt:
- if (iConst < constant.iConst)
- return true;
-
- return false;
+ return iConst < constant.iConst;
case EbtFloat:
- if (fConst < constant.fConst)
- return true;
-
- return false;
+ return fConst < constant.fConst;
default:
- assert(false && "Default missing");
- return false;
+ return false; // Invalid operation, handled at semantic analysis
}
-
- return false;
}
ConstantUnion operator+(const ConstantUnion& constant) const
diff --git a/Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.cpp b/Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.cpp
new file mode 100644
index 0000000..c09780d
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.cpp
@@ -0,0 +1,125 @@
+//
+// Copyright (c) 2002-2011 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/DetectRecursion.h"
+
+DetectRecursion::FunctionNode::FunctionNode(const TString& fname)
+ : name(fname),
+ visit(PreVisit)
+{
+}
+
+const TString& DetectRecursion::FunctionNode::getName() const
+{
+ return name;
+}
+
+void DetectRecursion::FunctionNode::addCallee(
+ DetectRecursion::FunctionNode* callee)
+{
+ for (size_t i = 0; i < callees.size(); ++i) {
+ if (callees[i] == callee)
+ return;
+ }
+ callees.push_back(callee);
+}
+
+bool DetectRecursion::FunctionNode::detectRecursion()
+{
+ ASSERT(visit == PreVisit);
+ visit = InVisit;
+ for (size_t i = 0; i < callees.size(); ++i) {
+ switch (callees[i]->visit) {
+ case InVisit:
+ // cycle detected, i.e., recursion detected.
+ return true;
+ case PostVisit:
+ break;
+ case PreVisit: {
+ bool recursion = callees[i]->detectRecursion();
+ if (recursion)
+ return true;
+ break;
+ }
+ default:
+ UNREACHABLE();
+ break;
+ }
+ }
+ visit = PostVisit;
+ return false;
+}
+
+DetectRecursion::DetectRecursion()
+ : currentFunction(NULL)
+{
+}
+
+DetectRecursion::~DetectRecursion()
+{
+ for (size_t i = 0; i < functions.size(); ++i)
+ delete functions[i];
+}
+
+bool DetectRecursion::visitAggregate(Visit visit, TIntermAggregate* node)
+{
+ switch (node->getOp())
+ {
+ case EOpPrototype:
+ // Function declaration.
+ // Don't add FunctionNode here because node->getName() is the
+ // unmangled function name.
+ break;
+ case EOpFunction: {
+ // Function definition.
+ if (visit == PreVisit) {
+ currentFunction = findFunctionByName(node->getName());
+ if (currentFunction == NULL) {
+ currentFunction = new FunctionNode(node->getName());
+ functions.push_back(currentFunction);
+ }
+ }
+ break;
+ }
+ case EOpFunctionCall: {
+ // Function call.
+ if (visit == PreVisit) {
+ ASSERT(currentFunction != NULL);
+ FunctionNode* func = findFunctionByName(node->getName());
+ if (func == NULL) {
+ func = new FunctionNode(node->getName());
+ functions.push_back(func);
+ }
+ currentFunction->addCallee(func);
+ }
+ break;
+ }
+ default:
+ break;
+ }
+ return true;
+}
+
+DetectRecursion::ErrorCode DetectRecursion::detectRecursion()
+{
+ FunctionNode* main = findFunctionByName("main(");
+ if (main == NULL)
+ return kErrorMissingMain;
+ if (main->detectRecursion())
+ return kErrorRecursion;
+ return kErrorNone;
+}
+
+DetectRecursion::FunctionNode* DetectRecursion::findFunctionByName(
+ const TString& name)
+{
+ for (size_t i = 0; i < functions.size(); ++i) {
+ if (functions[i]->getName() == name)
+ return functions[i];
+ }
+ return NULL;
+}
+
diff --git a/Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.h b/Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.h
new file mode 100644
index 0000000..cfb55cf
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.h
@@ -0,0 +1,60 @@
+//
+// Copyright (c) 2002-2011 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_DETECT_RECURSION_H_
+#define COMPILER_DETECT_RECURSION_H_
+
+#include "GLSLANG/ShaderLang.h"
+
+#include "compiler/intermediate.h"
+#include "compiler/VariableInfo.h"
+
+// Traverses intermediate tree to detect function recursion.
+class DetectRecursion : public TIntermTraverser {
+public:
+ enum ErrorCode {
+ kErrorMissingMain,
+ kErrorRecursion,
+ kErrorNone
+ };
+
+ DetectRecursion();
+ virtual ~DetectRecursion();
+
+ virtual bool visitAggregate(Visit, TIntermAggregate*);
+
+ ErrorCode detectRecursion();
+
+private:
+ class FunctionNode {
+ public:
+ FunctionNode(const TString& fname);
+
+ const TString& getName() const;
+
+ // If a function is already in the callee list, this becomes a no-op.
+ void addCallee(FunctionNode* callee);
+
+ // Return true if recursive function calls are detected.
+ bool detectRecursion();
+
+ private:
+ // mangled function name is unique.
+ TString name;
+
+ // functions that are directly called by this function.
+ TVector<FunctionNode*> callees;
+
+ Visit visit;
+ };
+
+ FunctionNode* findFunctionByName(const TString& name);
+
+ TVector<FunctionNode*> functions;
+ FunctionNode* currentFunction;
+};
+
+#endif // COMPILER_DETECT_RECURSION_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ExtensionBehavior.h b/Source/ThirdParty/ANGLE/src/compiler/ExtensionBehavior.h
index da96c24..e9bba4b 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ExtensionBehavior.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/ExtensionBehavior.h
@@ -13,9 +13,26 @@ typedef enum {
EBhRequire,
EBhEnable,
EBhWarn,
- EBhDisable
+ EBhDisable,
+ EBhUndefined,
} TBehavior;
+inline const char* getBehaviorString(TBehavior b)
+{
+ switch(b) {
+ case EBhRequire:
+ return "require";
+ case EBhEnable:
+ return "enable";
+ case EBhWarn:
+ return "warn";
+ case EBhDisable:
+ return "disable";
+ default:
+ return NULL;
+ }
+}
+
typedef TMap<TString, TBehavior> TExtensionBehavior;
#endif // _EXTENSION_TABLE_INCLUDED_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.cpp b/Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.cpp
new file mode 100644
index 0000000..fdc3f44
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.cpp
@@ -0,0 +1,215 @@
+//
+// Copyright (c) 2002-2011 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/ForLoopUnroll.h"
+
+namespace {
+
+class IntegerForLoopUnrollMarker : public TIntermTraverser {
+public:
+
+ virtual bool visitLoop(Visit, TIntermLoop* node)
+ {
+ // This is called after ValidateLimitations pass, so all the ASSERT
+ // should never fail.
+ // See ValidateLimitations::validateForLoopInit().
+ ASSERT(node);
+ ASSERT(node->getType() == ELoopFor);
+ ASSERT(node->getInit());
+ TIntermAggregate* decl = node->getInit()->getAsAggregate();
+ ASSERT(decl && decl->getOp() == EOpDeclaration);
+ TIntermSequence& declSeq = decl->getSequence();
+ ASSERT(declSeq.size() == 1);
+ TIntermBinary* declInit = declSeq[0]->getAsBinaryNode();
+ ASSERT(declInit && declInit->getOp() == EOpInitialize);
+ ASSERT(declInit->getLeft());
+ TIntermSymbol* symbol = declInit->getLeft()->getAsSymbolNode();
+ ASSERT(symbol);
+ TBasicType type = symbol->getBasicType();
+ ASSERT(type == EbtInt || type == EbtFloat);
+ if (type == EbtInt)
+ node->setUnrollFlag(true);
+ return true;
+ }
+
+};
+
+} // anonymous namepsace
+
+void ForLoopUnroll::FillLoopIndexInfo(TIntermLoop* node, TLoopIndexInfo& info)
+{
+ ASSERT(node->getType() == ELoopFor);
+ ASSERT(node->getUnrollFlag());
+
+ TIntermNode* init = node->getInit();
+ ASSERT(init != NULL);
+ TIntermAggregate* decl = init->getAsAggregate();
+ ASSERT((decl != NULL) && (decl->getOp() == EOpDeclaration));
+ TIntermSequence& declSeq = decl->getSequence();
+ ASSERT(declSeq.size() == 1);
+ TIntermBinary* declInit = declSeq[0]->getAsBinaryNode();
+ ASSERT((declInit != NULL) && (declInit->getOp() == EOpInitialize));
+ TIntermSymbol* symbol = declInit->getLeft()->getAsSymbolNode();
+ ASSERT(symbol != NULL);
+ ASSERT(symbol->getBasicType() == EbtInt);
+
+ info.id = symbol->getId();
+
+ ASSERT(declInit->getRight() != NULL);
+ TIntermConstantUnion* initNode = declInit->getRight()->getAsConstantUnion();
+ ASSERT(initNode != NULL);
+
+ info.initValue = evaluateIntConstant(initNode);
+ info.currentValue = info.initValue;
+
+ TIntermNode* cond = node->getCondition();
+ ASSERT(cond != NULL);
+ TIntermBinary* binOp = cond->getAsBinaryNode();
+ ASSERT(binOp != NULL);
+ ASSERT(binOp->getRight() != NULL);
+ ASSERT(binOp->getRight()->getAsConstantUnion() != NULL);
+
+ info.incrementValue = getLoopIncrement(node);
+ info.stopValue = evaluateIntConstant(
+ binOp->getRight()->getAsConstantUnion());
+ info.op = binOp->getOp();
+}
+
+void ForLoopUnroll::Step()
+{
+ ASSERT(mLoopIndexStack.size() > 0);
+ TLoopIndexInfo& info = mLoopIndexStack[mLoopIndexStack.size() - 1];
+ info.currentValue += info.incrementValue;
+}
+
+bool ForLoopUnroll::SatisfiesLoopCondition()
+{
+ ASSERT(mLoopIndexStack.size() > 0);
+ TLoopIndexInfo& info = mLoopIndexStack[mLoopIndexStack.size() - 1];
+ // Relational operator is one of: > >= < <= == or !=.
+ switch (info.op) {
+ case EOpEqual:
+ return (info.currentValue == info.stopValue);
+ case EOpNotEqual:
+ return (info.currentValue != info.stopValue);
+ case EOpLessThan:
+ return (info.currentValue < info.stopValue);
+ case EOpGreaterThan:
+ return (info.currentValue > info.stopValue);
+ case EOpLessThanEqual:
+ return (info.currentValue <= info.stopValue);
+ case EOpGreaterThanEqual:
+ return (info.currentValue >= info.stopValue);
+ default:
+ UNREACHABLE();
+ }
+ return false;
+}
+
+bool ForLoopUnroll::NeedsToReplaceSymbolWithValue(TIntermSymbol* symbol)
+{
+ for (TVector<TLoopIndexInfo>::iterator i = mLoopIndexStack.begin();
+ i != mLoopIndexStack.end();
+ ++i) {
+ if (i->id == symbol->getId())
+ return true;
+ }
+ return false;
+}
+
+int ForLoopUnroll::GetLoopIndexValue(TIntermSymbol* symbol)
+{
+ for (TVector<TLoopIndexInfo>::iterator i = mLoopIndexStack.begin();
+ i != mLoopIndexStack.end();
+ ++i) {
+ if (i->id == symbol->getId())
+ return i->currentValue;
+ }
+ UNREACHABLE();
+ return false;
+}
+
+void ForLoopUnroll::Push(TLoopIndexInfo& info)
+{
+ mLoopIndexStack.push_back(info);
+}
+
+void ForLoopUnroll::Pop()
+{
+ mLoopIndexStack.pop_back();
+}
+
+// static
+void ForLoopUnroll::MarkForLoopsWithIntegerIndicesForUnrolling(
+ TIntermNode* root)
+{
+ ASSERT(root);
+
+ IntegerForLoopUnrollMarker marker;
+ root->traverse(&marker);
+}
+
+int ForLoopUnroll::getLoopIncrement(TIntermLoop* node)
+{
+ TIntermNode* expr = node->getExpression();
+ ASSERT(expr != NULL);
+ // for expression has one of the following forms:
+ // loop_index++
+ // loop_index--
+ // loop_index += constant_expression
+ // loop_index -= constant_expression
+ // ++loop_index
+ // --loop_index
+ // The last two forms are not specified in the spec, but I am assuming
+ // its an oversight.
+ TIntermUnary* unOp = expr->getAsUnaryNode();
+ TIntermBinary* binOp = unOp ? NULL : expr->getAsBinaryNode();
+
+ TOperator op = EOpNull;
+ TIntermConstantUnion* incrementNode = NULL;
+ if (unOp != NULL) {
+ op = unOp->getOp();
+ } else if (binOp != NULL) {
+ op = binOp->getOp();
+ ASSERT(binOp->getRight() != NULL);
+ incrementNode = binOp->getRight()->getAsConstantUnion();
+ ASSERT(incrementNode != NULL);
+ }
+
+ int increment = 0;
+ // The operator is one of: ++ -- += -=.
+ switch (op) {
+ case EOpPostIncrement:
+ case EOpPreIncrement:
+ ASSERT((unOp != NULL) && (binOp == NULL));
+ increment = 1;
+ break;
+ case EOpPostDecrement:
+ case EOpPreDecrement:
+ ASSERT((unOp != NULL) && (binOp == NULL));
+ increment = -1;
+ break;
+ case EOpAddAssign:
+ ASSERT((unOp == NULL) && (binOp != NULL));
+ increment = evaluateIntConstant(incrementNode);
+ break;
+ case EOpSubAssign:
+ ASSERT((unOp == NULL) && (binOp != NULL));
+ increment = - evaluateIntConstant(incrementNode);
+ break;
+ default:
+ ASSERT(false);
+ }
+
+ return increment;
+}
+
+int ForLoopUnroll::evaluateIntConstant(TIntermConstantUnion* node)
+{
+ ASSERT((node != NULL) && (node->getUnionArrayPointer() != NULL));
+ return node->getUnionArrayPointer()->getIConst();
+}
+
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.h b/Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.h
new file mode 100644
index 0000000..e800e25
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.h
@@ -0,0 +1,48 @@
+//
+// Copyright (c) 2011 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"
+
+struct TLoopIndexInfo {
+ int id;
+ int initValue;
+ int stopValue;
+ int incrementValue;
+ TOperator op;
+ int currentValue;
+};
+
+class ForLoopUnroll {
+public:
+ ForLoopUnroll() { }
+
+ void FillLoopIndexInfo(TIntermLoop* node, TLoopIndexInfo& info);
+
+ // Update the info.currentValue for the next loop iteration.
+ void Step();
+
+ // Return false if loop condition is no longer satisfied.
+ bool SatisfiesLoopCondition();
+
+ // Check if the symbol is the index of a loop that's unrolled.
+ bool NeedsToReplaceSymbolWithValue(TIntermSymbol* symbol);
+
+ // Return the current value of a given loop index symbol.
+ int GetLoopIndexValue(TIntermSymbol* symbol);
+
+ void Push(TLoopIndexInfo& info);
+ void Pop();
+
+ static void MarkForLoopsWithIntegerIndicesForUnrolling(TIntermNode* root);
+
+private:
+ int getLoopIncrement(TIntermLoop* node);
+
+ int evaluateIntConstant(TIntermConstantUnion* node);
+
+ TVector<TLoopIndexInfo> mLoopIndexStack;
+};
+
diff --git a/Source/ThirdParty/ANGLE/src/compiler/Initialize.cpp b/Source/ThirdParty/ANGLE/src/compiler/Initialize.cpp
index 12b53fe..f3a19dc 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/Initialize.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/Initialize.cpp
@@ -19,7 +19,7 @@
// Prototypes for built-in functions seen by both vertex and fragment shaders.
//
//============================================================================
-static TString BuiltInFunctionsCommon()
+static TString BuiltInFunctionsCommon(const ShBuiltInResources& resources)
{
TString s;
@@ -311,6 +311,26 @@ static TString BuiltInFunctionsCommon()
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);"));
+
+ if (resources.OES_EGL_image_external) {
+ s.append(TString("vec4 texture2D(samplerExternalOES sampler, vec2 coord);"));
+ s.append(TString("vec4 texture2DProj(samplerExternalOES sampler, vec3 coord);"));
+ s.append(TString("vec4 texture2DProj(samplerExternalOES sampler, vec4 coord);"));
+ }
+
+ if (resources.ARB_texture_rectangle) {
+ s.append(TString("vec4 texture2DRect(sampler2DRect sampler, vec2 coord);"));
+ s.append(TString("vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord);"));
+ s.append(TString("vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord);"));
+ }
+
+ //
// Noise functions.
//
//s.append(TString("float noise1(float x);"));
@@ -353,17 +373,10 @@ static TString BuiltInFunctionsVertex(const ShBuiltInResources& resources)
//
// Texture Functions.
//
- if (resources.MaxVertexTextureImageUnits > 0) {
- 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);"));
-
- 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("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);"));
return s;
}
@@ -380,11 +393,6 @@ static TString BuiltInFunctionsFragment(const ShBuiltInResources& resources)
//
// 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);"));
-
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);"));
@@ -490,14 +498,14 @@ void TBuiltIns::initialize(ShShaderType type, ShShaderSpec spec,
switch (type) {
case SH_FRAGMENT_SHADER:
builtInStrings.push_back(DefaultPrecisionFragment());
- builtInStrings.push_back(BuiltInFunctionsCommon());
+ builtInStrings.push_back(BuiltInFunctionsCommon(resources));
builtInStrings.push_back(BuiltInFunctionsFragment(resources));
builtInStrings.push_back(StandardUniforms());
break;
case SH_VERTEX_SHADER:
builtInStrings.push_back(DefaultPrecisionVertex());
- builtInStrings.push_back(BuiltInFunctionsCommon());
+ builtInStrings.push_back(BuiltInFunctionsCommon(resources));
builtInStrings.push_back(BuiltInFunctionsVertex(resources));
builtInStrings.push_back(StandardUniforms());
break;
@@ -614,7 +622,7 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
switch(type) {
case SH_FRAGMENT_SHADER: {
// Set up gl_FragData. The array size.
- TType fragData(EbtFloat, EbpMedium, EvqFragColor, 4, false, true);
+ TType fragData(EbtFloat, EbpMedium, EvqFragData, 4, false, true);
fragData.setArraySize(resources.MaxDrawBuffers);
symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"), fragData));
}
@@ -627,5 +635,9 @@ void InitExtensionBehavior(const ShBuiltInResources& resources,
TExtensionBehavior& extBehavior)
{
if (resources.OES_standard_derivatives)
- extBehavior["GL_OES_standard_derivatives"] = EBhDisable;
+ extBehavior["GL_OES_standard_derivatives"] = EBhUndefined;
+ if (resources.OES_EGL_image_external)
+ extBehavior["GL_OES_EGL_image_external"] = EBhUndefined;
+ if (resources.ARB_texture_rectangle)
+ extBehavior["GL_ARB_texture_rectangle"] = EBhUndefined;
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp b/Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp
index ea71234..ca6d8f7 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp
@@ -1005,8 +1005,8 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
case EOpAddAssign:
case EOpSubAssign:
case EOpDivAssign:
- if (left->isMatrix() && right->isVector() ||
- left->isVector() && right->isMatrix())
+ if ((left->isMatrix() && right->isVector()) ||
+ (left->isVector() && right->isMatrix()))
return false;
setType(TType(basicType, higherPrecision, EvqTemporary, size, left->isMatrix() || right->isMatrix()));
break;
@@ -1017,8 +1017,8 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
case EOpGreaterThan:
case EOpLessThanEqual:
case EOpGreaterThanEqual:
- if (left->isMatrix() && right->isVector() ||
- left->isVector() && right->isMatrix())
+ if ((left->isMatrix() && right->isVector()) ||
+ (left->isVector() && right->isMatrix()))
return false;
setType(TType(EbtBool, EbpUndefined));
break;
@@ -1371,8 +1371,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
newNode->setLine(getLine());
return newNode;
}
-
- return this;
}
TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node)
diff --git a/Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.cpp b/Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.cpp
new file mode 100644
index 0000000..0c7e1a9
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.cpp
@@ -0,0 +1,120 @@
+//
+// Copyright (c) 2002-2012 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/MapLongVariableNames.h"
+
+namespace {
+
+TString mapLongName(int id, const TString& name, bool isGlobal)
+{
+ ASSERT(name.size() > MAX_SHORTENED_IDENTIFIER_SIZE);
+ TStringStream stream;
+ stream << "webgl_";
+ if (isGlobal)
+ stream << "g";
+ stream << id << "_";
+ stream << name.substr(0, MAX_SHORTENED_IDENTIFIER_SIZE - stream.str().size());
+ return stream.str();
+}
+
+LongNameMap* gLongNameMapInstance = NULL;
+
+} // anonymous namespace
+
+LongNameMap::LongNameMap()
+ : refCount(0)
+{
+}
+
+LongNameMap::~LongNameMap()
+{
+}
+
+// static
+LongNameMap* LongNameMap::GetInstance()
+{
+ if (gLongNameMapInstance == NULL)
+ gLongNameMapInstance = new LongNameMap;
+ gLongNameMapInstance->refCount++;
+ return gLongNameMapInstance;
+}
+
+void LongNameMap::Release()
+{
+ ASSERT(gLongNameMapInstance == this);
+ ASSERT(refCount > 0);
+ refCount--;
+ if (refCount == 0) {
+ delete gLongNameMapInstance;
+ gLongNameMapInstance = NULL;
+ }
+}
+
+const char* LongNameMap::Find(const char* originalName) const
+{
+ std::map<std::string, std::string>::const_iterator it = mLongNameMap.find(
+ originalName);
+ if (it != mLongNameMap.end())
+ return (*it).second.c_str();
+ return NULL;
+}
+
+void LongNameMap::Insert(const char* originalName, const char* mappedName)
+{
+ mLongNameMap.insert(std::map<std::string, std::string>::value_type(
+ originalName, mappedName));
+}
+
+int LongNameMap::Size() const
+{
+ return mLongNameMap.size();
+}
+
+MapLongVariableNames::MapLongVariableNames(LongNameMap* globalMap)
+{
+ ASSERT(globalMap);
+ mGlobalMap = globalMap;
+}
+
+void MapLongVariableNames::visitSymbol(TIntermSymbol* symbol)
+{
+ ASSERT(symbol != NULL);
+ if (symbol->getSymbol().size() > MAX_SHORTENED_IDENTIFIER_SIZE) {
+ switch (symbol->getQualifier()) {
+ case EvqVaryingIn:
+ case EvqVaryingOut:
+ case EvqInvariantVaryingIn:
+ case EvqInvariantVaryingOut:
+ case EvqUniform:
+ symbol->setSymbol(
+ mapGlobalLongName(symbol->getSymbol()));
+ break;
+ default:
+ symbol->setSymbol(
+ mapLongName(symbol->getId(), symbol->getSymbol(), false));
+ break;
+ };
+ }
+}
+
+bool MapLongVariableNames::visitLoop(Visit, TIntermLoop* node)
+{
+ if (node->getInit())
+ node->getInit()->traverse(this);
+ return true;
+}
+
+TString MapLongVariableNames::mapGlobalLongName(const TString& name)
+{
+ ASSERT(mGlobalMap);
+ const char* mappedName = mGlobalMap->Find(name.c_str());
+ if (mappedName != NULL)
+ return mappedName;
+ int id = mGlobalMap->Size();
+ TString rt = mapLongName(id, name, true);
+ mGlobalMap->Insert(name.c_str(), rt.c_str());
+ return rt;
+}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.h b/Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.h
new file mode 100644
index 0000000..b8eff2a
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/MapLongVariableNames.h
@@ -0,0 +1,60 @@
+//
+// Copyright (c) 2002-2012 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_MAP_LONG_VARIABLE_NAMES_H_
+#define COMPILER_MAP_LONG_VARIABLE_NAMES_H_
+
+#include "GLSLANG/ShaderLang.h"
+
+#include "compiler/intermediate.h"
+#include "compiler/VariableInfo.h"
+
+// This size does not include '\0' in the end.
+#define MAX_SHORTENED_IDENTIFIER_SIZE 32
+
+// This is a ref-counted singleton. GetInstance() returns a pointer to the
+// singleton, and after use, call Release(). GetInstance() and Release() should
+// be paired.
+class LongNameMap {
+public:
+ static LongNameMap* GetInstance();
+ void Release();
+
+ // Return the mapped name if <originalName, mappedName> is in the map;
+ // otherwise, return NULL.
+ const char* Find(const char* originalName) const;
+
+ // Insert a pair into the map.
+ void Insert(const char* originalName, const char* mappedName);
+
+ // Return the number of entries in the map.
+ int Size() const;
+
+private:
+ LongNameMap();
+ ~LongNameMap();
+
+ size_t refCount;
+ std::map<std::string, std::string> mLongNameMap;
+};
+
+// Traverses intermediate tree to map attributes and uniforms names that are
+// longer than MAX_SHORTENED_IDENTIFIER_SIZE to MAX_SHORTENED_IDENTIFIER_SIZE.
+class MapLongVariableNames : public TIntermTraverser {
+public:
+ MapLongVariableNames(LongNameMap* globalMap);
+ virtual ~MapLongVariableNames() {}
+
+ virtual void visitSymbol(TIntermSymbol*);
+ virtual bool visitLoop(Visit, TIntermLoop*);
+
+private:
+ TString mapGlobalLongName(const TString& name);
+
+ LongNameMap* mGlobalMap;
+};
+
+#endif // COMPILER_MAP_LONG_VARIABLE_NAMES_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/OutputESSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/OutputESSL.cpp
new file mode 100644
index 0000000..64ee92d
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/OutputESSL.cpp
@@ -0,0 +1,22 @@
+//
+// Copyright (c) 2002-2011 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/OutputESSL.h"
+
+TOutputESSL::TOutputESSL(TInfoSinkBase& objSink)
+ : TOutputGLSLBase(objSink)
+{
+}
+
+bool TOutputESSL::writeVariablePrecision(TPrecision precision)
+{
+ if (precision == EbpUndefined)
+ return false;
+
+ TInfoSinkBase& out = objSink();
+ out << getPrecisionString(precision);
+ return true;
+}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/OutputESSL.h b/Source/ThirdParty/ANGLE/src/compiler/OutputESSL.h
new file mode 100644
index 0000000..ef4063f
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/OutputESSL.h
@@ -0,0 +1,22 @@
+//
+// Copyright (c) 2002-2011 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 CROSSCOMPILERGLSL_OUTPUTESSL_H_
+#define CROSSCOMPILERGLSL_OUTPUTESSL_H_
+
+#include "compiler/OutputGLSLBase.h"
+
+class TOutputESSL : public TOutputGLSLBase
+{
+public:
+ TOutputESSL(TInfoSinkBase& objSink);
+ virtual ~TOutputESSL() {}
+
+protected:
+ virtual bool writeVariablePrecision(TPrecision precision);
+};
+
+#endif // CROSSCOMPILERGLSL_OUTPUTESSL_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.cpp
index 23476f2..dd31b4b 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.cpp
@@ -1,690 +1,17 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2011 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/OutputGLSL.h"
-#include "compiler/debug.h"
-
-namespace
-{
-TString getTypeName(const TType& type)
-{
- TInfoSinkBase out;
- if (type.isMatrix())
- {
- out << "mat";
- out << type.getNominalSize();
- }
- else if (type.isVector())
- {
- switch (type.getBasicType())
- {
- case EbtFloat: out << "vec"; break;
- case EbtInt: out << "ivec"; break;
- case EbtBool: out << "bvec"; break;
- default: UNREACHABLE(); break;
- }
- out << type.getNominalSize();
- }
- else
- {
- if (type.getBasicType() == EbtStruct)
- out << type.getTypeName();
- else
- out << type.getBasicString();
- }
- return TString(out.c_str());
-}
-
-TString arrayBrackets(const TType& type)
-{
- ASSERT(type.isArray());
- TInfoSinkBase out;
- out << "[" << type.getArraySize() << "]";
- return TString(out.c_str());
-}
-
-bool isSingleStatement(TIntermNode* node) {
- if (const TIntermAggregate* aggregate = node->getAsAggregate())
- {
- return (aggregate->getOp() != EOpFunction) &&
- (aggregate->getOp() != EOpSequence);
- }
- else if (const TIntermSelection* selection = node->getAsSelectionNode())
- {
- // Ternary operators are usually part of an assignment operator.
- // This handles those rare cases in which they are all by themselves.
- return selection->usesTernaryOperator();
- }
- else if (node->getAsLoopNode())
- {
- return false;
- }
- return true;
-}
-} // namespace
TOutputGLSL::TOutputGLSL(TInfoSinkBase& objSink)
- : TIntermTraverser(true, true, true),
- mObjSink(objSink),
- mDeclaringVariables(false)
-{
-}
-
-void TOutputGLSL::writeTriplet(Visit visit, const char* preStr, const char* inStr, const char* postStr)
+ : TOutputGLSLBase(objSink)
{
- TInfoSinkBase& out = objSink();
- if (visit == PreVisit && preStr)
- {
- out << preStr;
- }
- else if (visit == InVisit && inStr)
- {
- out << inStr;
- }
- else if (visit == PostVisit && postStr)
- {
- out << postStr;
- }
-}
-
-void TOutputGLSL::writeVariableType(const TType& type)
-{
- TInfoSinkBase& out = objSink();
- TQualifier qualifier = type.getQualifier();
- // TODO(alokp): Validate qualifier for variable declarations.
- if ((qualifier != EvqTemporary) && (qualifier != EvqGlobal))
- out << type.getQualifierString() << " ";
-
- // Declare the struct if we have not done so already.
- if ((type.getBasicType() == EbtStruct) &&
- (mDeclaredStructs.find(type.getTypeName()) == mDeclaredStructs.end()))
- {
- out << "struct " << type.getTypeName() << "{\n";
- const TTypeList* structure = type.getStruct();
- ASSERT(structure != NULL);
- for (size_t i = 0; i < structure->size(); ++i)
- {
- const TType* fieldType = (*structure)[i].type;
- ASSERT(fieldType != NULL);
- out << getTypeName(*fieldType) << " " << fieldType->getFieldName();
- if (fieldType->isArray())
- out << arrayBrackets(*fieldType);
- out << ";\n";
- }
- out << "}";
- mDeclaredStructs.insert(type.getTypeName());
- }
- else
- {
- out << getTypeName(type);
- }
-}
-
-void TOutputGLSL::writeFunctionParameters(const TIntermSequence& args)
-{
- TInfoSinkBase& out = objSink();
- for (TIntermSequence::const_iterator iter = args.begin();
- iter != args.end(); ++iter)
- {
- const TIntermSymbol* arg = (*iter)->getAsSymbolNode();
- ASSERT(arg != NULL);
-
- const TType& type = arg->getType();
- TQualifier qualifier = type.getQualifier();
- // TODO(alokp): Validate qualifier for function arguments.
- if ((qualifier != EvqTemporary) && (qualifier != EvqGlobal))
- out << type.getQualifierString() << " ";
-
- out << getTypeName(type);
-
- const TString& name = arg->getSymbol();
- if (!name.empty())
- out << " " << name;
- if (type.isArray())
- out << arrayBrackets(type);
-
- // Put a comma if this is not the last argument.
- if (iter != args.end() - 1)
- out << ", ";
- }
}
-const ConstantUnion* TOutputGLSL::writeConstantUnion(const TType& type,
- const ConstantUnion* pConstUnion)
+bool TOutputGLSL::writeVariablePrecision(TPrecision)
{
- TInfoSinkBase& out = objSink();
-
- if (type.getBasicType() == EbtStruct)
- {
- out << type.getTypeName() << "(";
- const TTypeList* structure = type.getStruct();
- ASSERT(structure != NULL);
- for (size_t i = 0; i < structure->size(); ++i)
- {
- const TType* fieldType = (*structure)[i].type;
- ASSERT(fieldType != NULL);
- pConstUnion = writeConstantUnion(*fieldType, pConstUnion);
- if (i != structure->size() - 1) out << ", ";
- }
- out << ")";
- }
- else
- {
- int size = type.getObjectSize();
- bool writeType = size > 1;
- if (writeType) out << getTypeName(type) << "(";
- for (int i = 0; i < size; ++i, ++pConstUnion)
- {
- switch (pConstUnion->getType())
- {
- case EbtFloat: out << pConstUnion->getFConst(); break;
- case EbtInt: out << pConstUnion->getIConst(); break;
- case EbtBool: out << pConstUnion->getBConst(); break;
- default: UNREACHABLE();
- }
- if (i != size - 1) out << ", ";
- }
- if (writeType) out << ")";
- }
- return pConstUnion;
-}
-
-void TOutputGLSL::visitSymbol(TIntermSymbol* node)
-{
- TInfoSinkBase& out = objSink();
- out << node->getSymbol();
-
- if (mDeclaringVariables && node->getType().isArray())
- out << arrayBrackets(node->getType());
-}
-
-void TOutputGLSL::visitConstantUnion(TIntermConstantUnion* node)
-{
- writeConstantUnion(node->getType(), node->getUnionArrayPointer());
-}
-
-bool TOutputGLSL::visitBinary(Visit visit, TIntermBinary* node)
-{
- bool visitChildren = true;
- TInfoSinkBase& out = objSink();
- switch (node->getOp())
- {
- case EOpInitialize:
- if (visit == InVisit)
- {
- out << " = ";
- // RHS of initialize is not being declared.
- mDeclaringVariables = false;
- }
- break;
- case EOpAssign: writeTriplet(visit, "(", " = ", ")"); break;
- case EOpAddAssign: writeTriplet(visit, "(", " += ", ")"); break;
- case EOpSubAssign: writeTriplet(visit, "(", " -= ", ")"); break;
- case EOpDivAssign: writeTriplet(visit, "(", " /= ", ")"); break;
- // Notice the fall-through.
- case EOpMulAssign:
- case EOpVectorTimesMatrixAssign:
- case EOpVectorTimesScalarAssign:
- case EOpMatrixTimesScalarAssign:
- case EOpMatrixTimesMatrixAssign:
- writeTriplet(visit, "(", " *= ", ")");
- break;
-
- case EOpIndexDirect:
- case EOpIndexIndirect:
- writeTriplet(visit, NULL, "[", "]");
- break;
- case EOpIndexDirectStruct:
- if (visit == InVisit)
- {
- out << ".";
- // TODO(alokp): ASSERT
- out << node->getType().getFieldName();
- visitChildren = false;
- }
- break;
- case EOpVectorSwizzle:
- if (visit == InVisit)
- {
- out << ".";
- TIntermAggregate* rightChild = node->getRight()->getAsAggregate();
- TIntermSequence& sequence = rightChild->getSequence();
- for (TIntermSequence::iterator sit = sequence.begin(); sit != sequence.end(); ++sit)
- {
- TIntermConstantUnion* element = (*sit)->getAsConstantUnion();
- ASSERT(element->getBasicType() == EbtInt);
- ASSERT(element->getNominalSize() == 1);
- const ConstantUnion& data = element->getUnionArrayPointer()[0];
- ASSERT(data.getType() == EbtInt);
- switch (data.getIConst())
- {
- case 0: out << "x"; break;
- case 1: out << "y"; break;
- case 2: out << "z"; break;
- case 3: out << "w"; break;
- default: UNREACHABLE(); break;
- }
- }
- visitChildren = false;
- }
- break;
-
- case EOpAdd: writeTriplet(visit, "(", " + ", ")"); break;
- case EOpSub: writeTriplet(visit, "(", " - ", ")"); break;
- case EOpMul: writeTriplet(visit, "(", " * ", ")"); break;
- case EOpDiv: writeTriplet(visit, "(", " / ", ")"); break;
- case EOpMod: UNIMPLEMENTED(); break;
- case EOpEqual: writeTriplet(visit, "(", " == ", ")"); break;
- case EOpNotEqual: writeTriplet(visit, "(", " != ", ")"); break;
- case EOpLessThan: writeTriplet(visit, "(", " < ", ")"); break;
- case EOpGreaterThan: writeTriplet(visit, "(", " > ", ")"); break;
- case EOpLessThanEqual: writeTriplet(visit, "(", " <= ", ")"); break;
- case EOpGreaterThanEqual: writeTriplet(visit, "(", " >= ", ")"); break;
-
- // Notice the fall-through.
- case EOpVectorTimesScalar:
- case EOpVectorTimesMatrix:
- case EOpMatrixTimesVector:
- case EOpMatrixTimesScalar:
- case EOpMatrixTimesMatrix:
- writeTriplet(visit, "(", " * ", ")");
- break;
-
- case EOpLogicalOr: writeTriplet(visit, "(", " || ", ")"); break;
- case EOpLogicalXor: writeTriplet(visit, "(", " ^^ ", ")"); break;
- case EOpLogicalAnd: writeTriplet(visit, "(", " && ", ")"); break;
- default: UNREACHABLE(); break;
- }
-
- return visitChildren;
-}
-
-bool TOutputGLSL::visitUnary(Visit visit, TIntermUnary* node)
-{
- switch (node->getOp())
- {
- case EOpNegative: writeTriplet(visit, "(-", NULL, ")"); break;
- case EOpVectorLogicalNot: writeTriplet(visit, "not(", NULL, ")"); break;
- case EOpLogicalNot: writeTriplet(visit, "(!", NULL, ")"); break;
-
- case EOpPostIncrement: writeTriplet(visit, "(", NULL, "++)"); break;
- case EOpPostDecrement: writeTriplet(visit, "(", NULL, "--)"); break;
- case EOpPreIncrement: writeTriplet(visit, "(++", NULL, ")"); break;
- case EOpPreDecrement: writeTriplet(visit, "(--", NULL, ")"); break;
-
- case EOpConvIntToBool:
- case EOpConvFloatToBool:
- switch (node->getOperand()->getType().getNominalSize())
- {
- case 1: writeTriplet(visit, "bool(", NULL, ")"); break;
- case 2: writeTriplet(visit, "bvec2(", NULL, ")"); break;
- case 3: writeTriplet(visit, "bvec3(", NULL, ")"); break;
- case 4: writeTriplet(visit, "bvec4(", NULL, ")"); break;
- default: UNREACHABLE();
- }
- break;
- case EOpConvBoolToFloat:
- case EOpConvIntToFloat:
- switch (node->getOperand()->getType().getNominalSize())
- {
- case 1: writeTriplet(visit, "float(", NULL, ")"); break;
- case 2: writeTriplet(visit, "vec2(", NULL, ")"); break;
- case 3: writeTriplet(visit, "vec3(", NULL, ")"); break;
- case 4: writeTriplet(visit, "vec4(", NULL, ")"); break;
- default: UNREACHABLE();
- }
- break;
- case EOpConvFloatToInt:
- case EOpConvBoolToInt:
- switch (node->getOperand()->getType().getNominalSize())
- {
- case 1: writeTriplet(visit, "int(", NULL, ")"); break;
- case 2: writeTriplet(visit, "ivec2(", NULL, ")"); break;
- case 3: writeTriplet(visit, "ivec3(", NULL, ")"); break;
- case 4: writeTriplet(visit, "ivec4(", NULL, ")"); break;
- default: UNREACHABLE();
- }
- break;
-
- case EOpRadians: writeTriplet(visit, "radians(", NULL, ")"); break;
- case EOpDegrees: writeTriplet(visit, "degrees(", NULL, ")"); break;
- case EOpSin: writeTriplet(visit, "sin(", NULL, ")"); break;
- case EOpCos: writeTriplet(visit, "cos(", NULL, ")"); break;
- case EOpTan: writeTriplet(visit, "tan(", NULL, ")"); break;
- case EOpAsin: writeTriplet(visit, "asin(", NULL, ")"); break;
- case EOpAcos: writeTriplet(visit, "acos(", NULL, ")"); break;
- case EOpAtan: writeTriplet(visit, "atan(", NULL, ")"); break;
-
- case EOpExp: writeTriplet(visit, "exp(", NULL, ")"); break;
- case EOpLog: writeTriplet(visit, "log(", NULL, ")"); break;
- case EOpExp2: writeTriplet(visit, "exp2(", NULL, ")"); break;
- case EOpLog2: writeTriplet(visit, "log2(", NULL, ")"); break;
- case EOpSqrt: writeTriplet(visit, "sqrt(", NULL, ")"); break;
- case EOpInverseSqrt: writeTriplet(visit, "inversesqrt(", NULL, ")"); break;
-
- case EOpAbs: writeTriplet(visit, "abs(", NULL, ")"); break;
- case EOpSign: writeTriplet(visit, "sign(", NULL, ")"); break;
- case EOpFloor: writeTriplet(visit, "floor(", NULL, ")"); break;
- case EOpCeil: writeTriplet(visit, "ceil(", NULL, ")"); break;
- case EOpFract: writeTriplet(visit, "fract(", NULL, ")"); break;
-
- case EOpLength: writeTriplet(visit, "length(", NULL, ")"); break;
- case EOpNormalize: writeTriplet(visit, "normalize(", NULL, ")"); break;
-
- case EOpDFdx: writeTriplet(visit, "dFdx(", NULL, ")"); break;
- case EOpDFdy: writeTriplet(visit, "dFdy(", NULL, ")"); break;
- case EOpFwidth: writeTriplet(visit, "fwidth(", NULL, ")"); break;
-
- case EOpAny: writeTriplet(visit, "any(", NULL, ")"); break;
- case EOpAll: writeTriplet(visit, "all(", NULL, ")"); break;
-
- default: UNREACHABLE(); break;
- }
-
- return true;
-}
-
-bool TOutputGLSL::visitSelection(Visit visit, TIntermSelection* node)
-{
- TInfoSinkBase& out = objSink();
-
- if (node->usesTernaryOperator())
- {
- // Notice two brackets at the beginning and end. The outer ones
- // encapsulate the whole ternary expression. This preserves the
- // order of precedence when ternary expressions are used in a
- // compound expression, i.e., c = 2 * (a < b ? 1 : 2).
- out << "((";
- node->getCondition()->traverse(this);
- out << ") ? (";
- node->getTrueBlock()->traverse(this);
- out << ") : (";
- node->getFalseBlock()->traverse(this);
- out << "))";
- }
- else
- {
- out << "if (";
- node->getCondition()->traverse(this);
- out << ")\n";
-
- incrementDepth();
- visitCodeBlock(node->getTrueBlock());
-
- if (node->getFalseBlock())
- {
- out << "else\n";
- visitCodeBlock(node->getFalseBlock());
- }
- decrementDepth();
- }
- return false;
-}
-
-bool TOutputGLSL::visitAggregate(Visit visit, TIntermAggregate* node)
-{
- bool visitChildren = true;
- TInfoSinkBase& out = objSink();
- switch (node->getOp())
- {
- case EOpSequence: {
- // Scope the sequences except when at the global scope.
- if (depth > 0) out << "{\n";
-
- incrementDepth();
- const TIntermSequence& sequence = node->getSequence();
- for (TIntermSequence::const_iterator iter = sequence.begin();
- iter != sequence.end(); ++iter)
- {
- TIntermNode* node = *iter;
- ASSERT(node != NULL);
- node->traverse(this);
-
- if (isSingleStatement(node))
- out << ";\n";
- }
- decrementDepth();
-
- // Scope the sequences except when at the global scope.
- if (depth > 0) out << "}\n";
- visitChildren = false;
- break;
- }
- case EOpPrototype: {
- // Function declaration.
- ASSERT(visit == PreVisit);
- TString returnType = getTypeName(node->getType());
- out << returnType << " " << node->getName();
-
- out << "(";
- writeFunctionParameters(node->getSequence());
- out << ")";
-
- visitChildren = false;
- break;
- }
- case EOpFunction: {
- // Function definition.
- ASSERT(visit == PreVisit);
- TString returnType = getTypeName(node->getType());
- TString functionName = TFunction::unmangleName(node->getName());
- out << returnType << " " << functionName;
-
- incrementDepth();
- // Function definition node contains one or two children nodes
- // representing function parameters and function body. The latter
- // is not present in case of empty function bodies.
- const TIntermSequence& sequence = node->getSequence();
- ASSERT((sequence.size() == 1) || (sequence.size() == 2));
- TIntermSequence::const_iterator seqIter = sequence.begin();
-
- // Traverse function parameters.
- TIntermAggregate* params = (*seqIter)->getAsAggregate();
- ASSERT(params != NULL);
- ASSERT(params->getOp() == EOpParameters);
- params->traverse(this);
-
- // Traverse function body.
- TIntermAggregate* body = ++seqIter != sequence.end() ?
- (*seqIter)->getAsAggregate() : NULL;
- visitCodeBlock(body);
- decrementDepth();
-
- // Fully processed; no need to visit children.
- visitChildren = false;
- break;
- }
- case EOpFunctionCall:
- // Function call.
- if (visit == PreVisit)
- {
- TString functionName = TFunction::unmangleName(node->getName());
- out << functionName << "(";
- }
- else if (visit == InVisit)
- {
- out << ", ";
- }
- else
- {
- out << ")";
- }
- break;
- case EOpParameters: {
- // Function parameters.
- ASSERT(visit == PreVisit);
- out << "(";
- writeFunctionParameters(node->getSequence());
- out << ")";
- visitChildren = false;
- break;
- }
- case EOpDeclaration: {
- // Variable declaration.
- if (visit == PreVisit)
- {
- const TIntermSequence& sequence = node->getSequence();
- const TIntermTyped* variable = sequence.front()->getAsTyped();
- writeVariableType(variable->getType());
- out << " ";
- mDeclaringVariables = true;
- }
- else if (visit == InVisit)
- {
- out << ", ";
- mDeclaringVariables = true;
- }
- else
- {
- mDeclaringVariables = false;
- }
- break;
- }
- case EOpConstructFloat: writeTriplet(visit, "float(", NULL, ")"); break;
- case EOpConstructVec2: writeTriplet(visit, "vec2(", ", ", ")"); break;
- case EOpConstructVec3: writeTriplet(visit, "vec3(", ", ", ")"); break;
- case EOpConstructVec4: writeTriplet(visit, "vec4(", ", ", ")"); break;
- case EOpConstructBool: writeTriplet(visit, "bool(", NULL, ")"); break;
- case EOpConstructBVec2: writeTriplet(visit, "bvec2(", ", ", ")"); break;
- case EOpConstructBVec3: writeTriplet(visit, "bvec3(", ", ", ")"); break;
- case EOpConstructBVec4: writeTriplet(visit, "bvec4(", ", ", ")"); break;
- case EOpConstructInt: writeTriplet(visit, "int(", NULL, ")"); break;
- case EOpConstructIVec2: writeTriplet(visit, "ivec2(", ", ", ")"); break;
- case EOpConstructIVec3: writeTriplet(visit, "ivec3(", ", ", ")"); break;
- case EOpConstructIVec4: writeTriplet(visit, "ivec4(", ", ", ")"); break;
- case EOpConstructMat2: writeTriplet(visit, "mat2(", ", ", ")"); break;
- case EOpConstructMat3: writeTriplet(visit, "mat3(", ", ", ")"); break;
- case EOpConstructMat4: writeTriplet(visit, "mat4(", ", ", ")"); break;
- case EOpConstructStruct:
- if (visit == PreVisit)
- {
- const TType& type = node->getType();
- ASSERT(type.getBasicType() == EbtStruct);
- out << type.getTypeName() << "(";
- }
- else if (visit == InVisit)
- {
- out << ", ";
- }
- else
- {
- out << ")";
- }
- break;
-
- case EOpLessThan: writeTriplet(visit, "lessThan(", ", ", ")"); break;
- case EOpGreaterThan: writeTriplet(visit, "greaterThan(", ", ", ")"); break;
- case EOpLessThanEqual: writeTriplet(visit, "lessThanEqual(", ", ", ")"); break;
- case EOpGreaterThanEqual: writeTriplet(visit, "greaterThanEqual(", ", ", ")"); break;
- case EOpVectorEqual: writeTriplet(visit, "equal(", ", ", ")"); break;
- case EOpVectorNotEqual: writeTriplet(visit, "notEqual(", ", ", ")"); break;
- case EOpComma: writeTriplet(visit, NULL, ", ", NULL); break;
-
- case EOpMod: writeTriplet(visit, "mod(", ", ", ")"); break;
- case EOpPow: writeTriplet(visit, "pow(", ", ", ")"); break;
- case EOpAtan: writeTriplet(visit, "atan(", ", ", ")"); break;
- case EOpMin: writeTriplet(visit, "min(", ", ", ")"); break;
- case EOpMax: writeTriplet(visit, "max(", ", ", ")"); break;
- case EOpClamp: writeTriplet(visit, "clamp(", ", ", ")"); break;
- case EOpMix: writeTriplet(visit, "mix(", ", ", ")"); break;
- case EOpStep: writeTriplet(visit, "step(", ", ", ")"); break;
- case EOpSmoothStep: writeTriplet(visit, "smoothstep(", ", ", ")"); break;
-
- case EOpDistance: writeTriplet(visit, "distance(", ", ", ")"); break;
- case EOpDot: writeTriplet(visit, "dot(", ", ", ")"); break;
- case EOpCross: writeTriplet(visit, "cross(", ", ", ")"); break;
- case EOpFaceForward: writeTriplet(visit, "faceforward(", ", ", ")"); break;
- case EOpReflect: writeTriplet(visit, "reflect(", ", ", ")"); break;
- case EOpRefract: writeTriplet(visit, "refract(", ", ", ")"); break;
- case EOpMul: writeTriplet(visit, "matrixCompMult(", ", ", ")"); break;
-
- default: UNREACHABLE(); break;
- }
- return visitChildren;
-}
-
-bool TOutputGLSL::visitLoop(Visit visit, TIntermLoop* node)
-{
- TInfoSinkBase& out = objSink();
-
- incrementDepth();
- // Loop header.
- TLoopType loopType = node->getType();
- if (loopType == ELoopFor) // for loop
- {
- out << "for (";
- if (node->getInit())
- node->getInit()->traverse(this);
- out << "; ";
-
- if (node->getCondition())
- node->getCondition()->traverse(this);
- out << "; ";
-
- if (node->getExpression())
- node->getExpression()->traverse(this);
- out << ")\n";
- }
- else if (loopType == ELoopWhile) // while loop
- {
- out << "while (";
- ASSERT(node->getCondition() != NULL);
- node->getCondition()->traverse(this);
- out << ")\n";
- }
- else // do-while loop
- {
- ASSERT(loopType == ELoopDoWhile);
- out << "do\n";
- }
-
- // Loop body.
- visitCodeBlock(node->getBody());
-
- // Loop footer.
- if (loopType == ELoopDoWhile) // do-while loop
- {
- out << "while (";
- ASSERT(node->getCondition() != NULL);
- node->getCondition()->traverse(this);
- out << ");\n";
- }
- decrementDepth();
-
- // No need to visit children. They have been already processed in
- // this function.
return false;
}
-
-bool TOutputGLSL::visitBranch(Visit visit, TIntermBranch* node)
-{
- switch (node->getFlowOp())
- {
- case EOpKill: writeTriplet(visit, "discard", NULL, NULL); break;
- case EOpBreak: writeTriplet(visit, "break", NULL, NULL); break;
- case EOpContinue: writeTriplet(visit, "continue", NULL, NULL); break;
- case EOpReturn: writeTriplet(visit, "return ", NULL, NULL); break;
- default: UNREACHABLE(); break;
- }
-
- return true;
-}
-
-void TOutputGLSL::visitCodeBlock(TIntermNode* node) {
- TInfoSinkBase &out = objSink();
- if (node != NULL)
- {
- node->traverse(this);
- // Single statements not part of a sequence need to be terminated
- // with semi-colon.
- if (isSingleStatement(node))
- out << ";\n";
- }
- else
- {
- out << "{\n}\n"; // Empty code block.
- }
-}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.h b/Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.h
index aa203d4..0fe2356 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.h
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2011 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.
//
@@ -7,43 +7,15 @@
#ifndef CROSSCOMPILERGLSL_OUTPUTGLSL_H_
#define CROSSCOMPILERGLSL_OUTPUTGLSL_H_
-#include <set>
+#include "compiler/OutputGLSLBase.h"
-#include "compiler/intermediate.h"
-#include "compiler/ParseHelper.h"
-
-class TOutputGLSL : public TIntermTraverser
+class TOutputGLSL : public TOutputGLSLBase
{
public:
TOutputGLSL(TInfoSinkBase& objSink);
protected:
- TInfoSinkBase& objSink() { return mObjSink; }
- void writeTriplet(Visit visit, const char* preStr, const char* inStr, const char* postStr);
- void writeVariableType(const TType& type);
- void writeFunctionParameters(const TIntermSequence& args);
- const ConstantUnion* writeConstantUnion(const TType& type, const ConstantUnion* pConstUnion);
-
- virtual void visitSymbol(TIntermSymbol* node);
- virtual void visitConstantUnion(TIntermConstantUnion* node);
- virtual bool visitBinary(Visit visit, TIntermBinary* node);
- virtual bool visitUnary(Visit visit, TIntermUnary* node);
- virtual bool visitSelection(Visit visit, TIntermSelection* node);
- virtual bool visitAggregate(Visit visit, TIntermAggregate* node);
- virtual bool visitLoop(Visit visit, TIntermLoop* node);
- virtual bool visitBranch(Visit visit, TIntermBranch* node);
-
- void visitCodeBlock(TIntermNode* node);
-
-private:
- TInfoSinkBase& mObjSink;
- bool mDeclaringVariables;
-
- // Structs are declared as the tree is traversed. This set contains all
- // the structs already declared. It is maintained so that a struct is
- // declared only once.
- typedef std::set<TString> DeclaredStructs;
- DeclaredStructs mDeclaredStructs;
+ virtual bool writeVariablePrecision(TPrecision);
};
#endif // CROSSCOMPILERGLSL_OUTPUTGLSL_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.cpp b/Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.cpp
new file mode 100644
index 0000000..552fa50
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.cpp
@@ -0,0 +1,720 @@
+//
+// Copyright (c) 2002-2011 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/OutputGLSLBase.h"
+#include "compiler/debug.h"
+
+namespace
+{
+TString getTypeName(const TType& type)
+{
+ TInfoSinkBase out;
+ if (type.isMatrix())
+ {
+ out << "mat";
+ out << type.getNominalSize();
+ }
+ else if (type.isVector())
+ {
+ switch (type.getBasicType())
+ {
+ case EbtFloat: out << "vec"; break;
+ case EbtInt: out << "ivec"; break;
+ case EbtBool: out << "bvec"; break;
+ default: UNREACHABLE(); break;
+ }
+ out << type.getNominalSize();
+ }
+ else
+ {
+ if (type.getBasicType() == EbtStruct)
+ out << type.getTypeName();
+ else
+ out << type.getBasicString();
+ }
+ return TString(out.c_str());
+}
+
+TString arrayBrackets(const TType& type)
+{
+ ASSERT(type.isArray());
+ TInfoSinkBase out;
+ out << "[" << type.getArraySize() << "]";
+ return TString(out.c_str());
+}
+
+bool isSingleStatement(TIntermNode* node) {
+ if (const TIntermAggregate* aggregate = node->getAsAggregate())
+ {
+ return (aggregate->getOp() != EOpFunction) &&
+ (aggregate->getOp() != EOpSequence);
+ }
+ else if (const TIntermSelection* selection = node->getAsSelectionNode())
+ {
+ // Ternary operators are usually part of an assignment operator.
+ // This handles those rare cases in which they are all by themselves.
+ return selection->usesTernaryOperator();
+ }
+ else if (node->getAsLoopNode())
+ {
+ return false;
+ }
+ return true;
+}
+} // namespace
+
+TOutputGLSLBase::TOutputGLSLBase(TInfoSinkBase& objSink)
+ : TIntermTraverser(true, true, true),
+ mObjSink(objSink),
+ mDeclaringVariables(false)
+{
+}
+
+void TOutputGLSLBase::writeTriplet(Visit visit, const char* preStr, const char* inStr, const char* postStr)
+{
+ TInfoSinkBase& out = objSink();
+ if (visit == PreVisit && preStr)
+ {
+ out << preStr;
+ }
+ else if (visit == InVisit && inStr)
+ {
+ out << inStr;
+ }
+ else if (visit == PostVisit && postStr)
+ {
+ out << postStr;
+ }
+}
+
+void TOutputGLSLBase::writeVariableType(const TType& type)
+{
+ TInfoSinkBase& out = objSink();
+ TQualifier qualifier = type.getQualifier();
+ // TODO(alokp): Validate qualifier for variable declarations.
+ if ((qualifier != EvqTemporary) && (qualifier != EvqGlobal))
+ out << type.getQualifierString() << " ";
+ // Declare the struct if we have not done so already.
+ if ((type.getBasicType() == EbtStruct) &&
+ (mDeclaredStructs.find(type.getTypeName()) == mDeclaredStructs.end()))
+ {
+ out << "struct " << type.getTypeName() << "{\n";
+ const TTypeList* structure = type.getStruct();
+ ASSERT(structure != NULL);
+ for (size_t i = 0; i < structure->size(); ++i)
+ {
+ const TType* fieldType = (*structure)[i].type;
+ ASSERT(fieldType != NULL);
+ if (writeVariablePrecision(fieldType->getPrecision()))
+ out << " ";
+ out << getTypeName(*fieldType) << " " << fieldType->getFieldName();
+ if (fieldType->isArray())
+ out << arrayBrackets(*fieldType);
+ out << ";\n";
+ }
+ out << "}";
+ mDeclaredStructs.insert(type.getTypeName());
+ }
+ else
+ {
+ if (writeVariablePrecision(type.getPrecision()))
+ out << " ";
+ out << getTypeName(type);
+ }
+}
+
+void TOutputGLSLBase::writeFunctionParameters(const TIntermSequence& args)
+{
+ TInfoSinkBase& out = objSink();
+ for (TIntermSequence::const_iterator iter = args.begin();
+ iter != args.end(); ++iter)
+ {
+ const TIntermSymbol* arg = (*iter)->getAsSymbolNode();
+ ASSERT(arg != NULL);
+
+ const TType& type = arg->getType();
+ writeVariableType(type);
+
+ const TString& name = arg->getSymbol();
+ if (!name.empty())
+ out << " " << name;
+ if (type.isArray())
+ out << arrayBrackets(type);
+
+ // Put a comma if this is not the last argument.
+ if (iter != args.end() - 1)
+ out << ", ";
+ }
+}
+
+const ConstantUnion* TOutputGLSLBase::writeConstantUnion(const TType& type,
+ const ConstantUnion* pConstUnion)
+{
+ TInfoSinkBase& out = objSink();
+
+ if (type.getBasicType() == EbtStruct)
+ {
+ out << type.getTypeName() << "(";
+ const TTypeList* structure = type.getStruct();
+ ASSERT(structure != NULL);
+ for (size_t i = 0; i < structure->size(); ++i)
+ {
+ const TType* fieldType = (*structure)[i].type;
+ ASSERT(fieldType != NULL);
+ pConstUnion = writeConstantUnion(*fieldType, pConstUnion);
+ if (i != structure->size() - 1) out << ", ";
+ }
+ out << ")";
+ }
+ else
+ {
+ int size = type.getObjectSize();
+ bool writeType = size > 1;
+ if (writeType) out << getTypeName(type) << "(";
+ for (int i = 0; i < size; ++i, ++pConstUnion)
+ {
+ switch (pConstUnion->getType())
+ {
+ case EbtFloat: out << pConstUnion->getFConst(); break;
+ case EbtInt: out << pConstUnion->getIConst(); break;
+ case EbtBool: out << pConstUnion->getBConst(); break;
+ default: UNREACHABLE();
+ }
+ if (i != size - 1) out << ", ";
+ }
+ if (writeType) out << ")";
+ }
+ return pConstUnion;
+}
+
+void TOutputGLSLBase::visitSymbol(TIntermSymbol* node)
+{
+ TInfoSinkBase& out = objSink();
+ if (mLoopUnroll.NeedsToReplaceSymbolWithValue(node))
+ out << mLoopUnroll.GetLoopIndexValue(node);
+ else
+ out << node->getSymbol();
+
+ if (mDeclaringVariables && node->getType().isArray())
+ out << arrayBrackets(node->getType());
+}
+
+void TOutputGLSLBase::visitConstantUnion(TIntermConstantUnion* node)
+{
+ writeConstantUnion(node->getType(), node->getUnionArrayPointer());
+}
+
+bool TOutputGLSLBase::visitBinary(Visit visit, TIntermBinary* node)
+{
+ bool visitChildren = true;
+ TInfoSinkBase& out = objSink();
+ switch (node->getOp())
+ {
+ case EOpInitialize:
+ if (visit == InVisit)
+ {
+ out << " = ";
+ // RHS of initialize is not being declared.
+ mDeclaringVariables = false;
+ }
+ break;
+ case EOpAssign: writeTriplet(visit, "(", " = ", ")"); break;
+ case EOpAddAssign: writeTriplet(visit, "(", " += ", ")"); break;
+ case EOpSubAssign: writeTriplet(visit, "(", " -= ", ")"); break;
+ case EOpDivAssign: writeTriplet(visit, "(", " /= ", ")"); break;
+ // Notice the fall-through.
+ case EOpMulAssign:
+ case EOpVectorTimesMatrixAssign:
+ case EOpVectorTimesScalarAssign:
+ case EOpMatrixTimesScalarAssign:
+ case EOpMatrixTimesMatrixAssign:
+ writeTriplet(visit, "(", " *= ", ")");
+ break;
+
+ case EOpIndexDirect:
+ case EOpIndexIndirect:
+ writeTriplet(visit, NULL, "[", "]");
+ break;
+ case EOpIndexDirectStruct:
+ if (visit == InVisit)
+ {
+ out << ".";
+ // TODO(alokp): ASSERT
+ out << node->getType().getFieldName();
+ visitChildren = false;
+ }
+ break;
+ case EOpVectorSwizzle:
+ if (visit == InVisit)
+ {
+ out << ".";
+ TIntermAggregate* rightChild = node->getRight()->getAsAggregate();
+ TIntermSequence& sequence = rightChild->getSequence();
+ for (TIntermSequence::iterator sit = sequence.begin(); sit != sequence.end(); ++sit)
+ {
+ TIntermConstantUnion* element = (*sit)->getAsConstantUnion();
+ ASSERT(element->getBasicType() == EbtInt);
+ ASSERT(element->getNominalSize() == 1);
+ const ConstantUnion& data = element->getUnionArrayPointer()[0];
+ ASSERT(data.getType() == EbtInt);
+ switch (data.getIConst())
+ {
+ case 0: out << "x"; break;
+ case 1: out << "y"; break;
+ case 2: out << "z"; break;
+ case 3: out << "w"; break;
+ default: UNREACHABLE(); break;
+ }
+ }
+ visitChildren = false;
+ }
+ break;
+
+ case EOpAdd: writeTriplet(visit, "(", " + ", ")"); break;
+ case EOpSub: writeTriplet(visit, "(", " - ", ")"); break;
+ case EOpMul: writeTriplet(visit, "(", " * ", ")"); break;
+ case EOpDiv: writeTriplet(visit, "(", " / ", ")"); break;
+ case EOpMod: UNIMPLEMENTED(); break;
+ case EOpEqual: writeTriplet(visit, "(", " == ", ")"); break;
+ case EOpNotEqual: writeTriplet(visit, "(", " != ", ")"); break;
+ case EOpLessThan: writeTriplet(visit, "(", " < ", ")"); break;
+ case EOpGreaterThan: writeTriplet(visit, "(", " > ", ")"); break;
+ case EOpLessThanEqual: writeTriplet(visit, "(", " <= ", ")"); break;
+ case EOpGreaterThanEqual: writeTriplet(visit, "(", " >= ", ")"); break;
+
+ // Notice the fall-through.
+ case EOpVectorTimesScalar:
+ case EOpVectorTimesMatrix:
+ case EOpMatrixTimesVector:
+ case EOpMatrixTimesScalar:
+ case EOpMatrixTimesMatrix:
+ writeTriplet(visit, "(", " * ", ")");
+ break;
+
+ case EOpLogicalOr: writeTriplet(visit, "(", " || ", ")"); break;
+ case EOpLogicalXor: writeTriplet(visit, "(", " ^^ ", ")"); break;
+ case EOpLogicalAnd: writeTriplet(visit, "(", " && ", ")"); break;
+ default: UNREACHABLE(); break;
+ }
+
+ return visitChildren;
+}
+
+bool TOutputGLSLBase::visitUnary(Visit visit, TIntermUnary* node)
+{
+ TString preString;
+ TString postString = ")";
+
+ switch (node->getOp())
+ {
+ case EOpNegative: preString = "(-"; break;
+ case EOpVectorLogicalNot: preString = "not("; break;
+ case EOpLogicalNot: preString = "(!"; break;
+
+ case EOpPostIncrement: preString = "("; postString = "++)"; break;
+ case EOpPostDecrement: preString = "("; postString = "--)"; break;
+ case EOpPreIncrement: preString = "(++"; break;
+ case EOpPreDecrement: preString = "(--"; break;
+
+ case EOpConvIntToBool:
+ case EOpConvFloatToBool:
+ switch (node->getOperand()->getType().getNominalSize())
+ {
+ case 1: preString = "bool("; break;
+ case 2: preString = "bvec2("; break;
+ case 3: preString = "bvec3("; break;
+ case 4: preString = "bvec4("; break;
+ default: UNREACHABLE();
+ }
+ break;
+ case EOpConvBoolToFloat:
+ case EOpConvIntToFloat:
+ switch (node->getOperand()->getType().getNominalSize())
+ {
+ case 1: preString = "float("; break;
+ case 2: preString = "vec2("; break;
+ case 3: preString = "vec3("; break;
+ case 4: preString = "vec4("; break;
+ default: UNREACHABLE();
+ }
+ break;
+ case EOpConvFloatToInt:
+ case EOpConvBoolToInt:
+ switch (node->getOperand()->getType().getNominalSize())
+ {
+ case 1: preString = "int("; break;
+ case 2: preString = "ivec2("; break;
+ case 3: preString = "ivec3("; break;
+ case 4: preString = "ivec4("; break;
+ default: UNREACHABLE();
+ }
+ break;
+
+ case EOpRadians: preString = "radians("; break;
+ case EOpDegrees: preString = "degrees("; break;
+ case EOpSin: preString = "sin("; break;
+ case EOpCos: preString = "cos("; break;
+ case EOpTan: preString = "tan("; break;
+ case EOpAsin: preString = "asin("; break;
+ case EOpAcos: preString = "acos("; break;
+ case EOpAtan: preString = "atan("; break;
+
+ case EOpExp: preString = "exp("; break;
+ case EOpLog: preString = "log("; break;
+ case EOpExp2: preString = "exp2("; break;
+ case EOpLog2: preString = "log2("; break;
+ case EOpSqrt: preString = "sqrt("; break;
+ case EOpInverseSqrt: preString = "inversesqrt("; break;
+
+ case EOpAbs: preString = "abs("; break;
+ case EOpSign: preString = "sign("; break;
+ case EOpFloor: preString = "floor("; break;
+ case EOpCeil: preString = "ceil("; break;
+ case EOpFract: preString = "fract("; break;
+
+ case EOpLength: preString = "length("; break;
+ case EOpNormalize: preString = "normalize("; break;
+
+ case EOpDFdx: preString = "dFdx("; break;
+ case EOpDFdy: preString = "dFdy("; break;
+ case EOpFwidth: preString = "fwidth("; break;
+
+ case EOpAny: preString = "any("; break;
+ case EOpAll: preString = "all("; break;
+
+ default: UNREACHABLE(); break;
+ }
+
+ if (visit == PreVisit && node->getUseEmulatedFunction())
+ preString = BuiltInFunctionEmulator::GetEmulatedFunctionName(preString);
+ writeTriplet(visit, preString.c_str(), NULL, postString.c_str());
+
+ return true;
+}
+
+bool TOutputGLSLBase::visitSelection(Visit visit, TIntermSelection* node)
+{
+ TInfoSinkBase& out = objSink();
+
+ if (node->usesTernaryOperator())
+ {
+ // Notice two brackets at the beginning and end. The outer ones
+ // encapsulate the whole ternary expression. This preserves the
+ // order of precedence when ternary expressions are used in a
+ // compound expression, i.e., c = 2 * (a < b ? 1 : 2).
+ out << "((";
+ node->getCondition()->traverse(this);
+ out << ") ? (";
+ node->getTrueBlock()->traverse(this);
+ out << ") : (";
+ node->getFalseBlock()->traverse(this);
+ out << "))";
+ }
+ else
+ {
+ out << "if (";
+ node->getCondition()->traverse(this);
+ out << ")\n";
+
+ incrementDepth();
+ visitCodeBlock(node->getTrueBlock());
+
+ if (node->getFalseBlock())
+ {
+ out << "else\n";
+ visitCodeBlock(node->getFalseBlock());
+ }
+ decrementDepth();
+ }
+ return false;
+}
+
+bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate* node)
+{
+ bool visitChildren = true;
+ TInfoSinkBase& out = objSink();
+ TString preString;
+ bool delayedWrite = false;
+ switch (node->getOp())
+ {
+ case EOpSequence: {
+ // Scope the sequences except when at the global scope.
+ if (depth > 0) out << "{\n";
+
+ incrementDepth();
+ const TIntermSequence& sequence = node->getSequence();
+ for (TIntermSequence::const_iterator iter = sequence.begin();
+ iter != sequence.end(); ++iter)
+ {
+ TIntermNode* node = *iter;
+ ASSERT(node != NULL);
+ node->traverse(this);
+
+ if (isSingleStatement(node))
+ out << ";\n";
+ }
+ decrementDepth();
+
+ // Scope the sequences except when at the global scope.
+ if (depth > 0) out << "}\n";
+ visitChildren = false;
+ break;
+ }
+ case EOpPrototype: {
+ // Function declaration.
+ ASSERT(visit == PreVisit);
+ writeVariableType(node->getType());
+ out << " " << node->getName();
+
+ out << "(";
+ writeFunctionParameters(node->getSequence());
+ out << ")";
+
+ visitChildren = false;
+ break;
+ }
+ case EOpFunction: {
+ // Function definition.
+ ASSERT(visit == PreVisit);
+ writeVariableType(node->getType());
+ out << " " << TFunction::unmangleName(node->getName());
+
+ incrementDepth();
+ // Function definition node contains one or two children nodes
+ // representing function parameters and function body. The latter
+ // is not present in case of empty function bodies.
+ const TIntermSequence& sequence = node->getSequence();
+ ASSERT((sequence.size() == 1) || (sequence.size() == 2));
+ TIntermSequence::const_iterator seqIter = sequence.begin();
+
+ // Traverse function parameters.
+ TIntermAggregate* params = (*seqIter)->getAsAggregate();
+ ASSERT(params != NULL);
+ ASSERT(params->getOp() == EOpParameters);
+ params->traverse(this);
+
+ // Traverse function body.
+ TIntermAggregate* body = ++seqIter != sequence.end() ?
+ (*seqIter)->getAsAggregate() : NULL;
+ visitCodeBlock(body);
+ decrementDepth();
+
+ // Fully processed; no need to visit children.
+ visitChildren = false;
+ break;
+ }
+ case EOpFunctionCall:
+ // Function call.
+ if (visit == PreVisit)
+ {
+ TString functionName = TFunction::unmangleName(node->getName());
+ out << functionName << "(";
+ }
+ else if (visit == InVisit)
+ {
+ out << ", ";
+ }
+ else
+ {
+ out << ")";
+ }
+ break;
+ case EOpParameters: {
+ // Function parameters.
+ ASSERT(visit == PreVisit);
+ out << "(";
+ writeFunctionParameters(node->getSequence());
+ out << ")";
+ visitChildren = false;
+ break;
+ }
+ case EOpDeclaration: {
+ // Variable declaration.
+ if (visit == PreVisit)
+ {
+ const TIntermSequence& sequence = node->getSequence();
+ const TIntermTyped* variable = sequence.front()->getAsTyped();
+ writeVariableType(variable->getType());
+ out << " ";
+ mDeclaringVariables = true;
+ }
+ else if (visit == InVisit)
+ {
+ out << ", ";
+ mDeclaringVariables = true;
+ }
+ else
+ {
+ mDeclaringVariables = false;
+ }
+ break;
+ }
+ case EOpConstructFloat: writeTriplet(visit, "float(", NULL, ")"); break;
+ case EOpConstructVec2: writeTriplet(visit, "vec2(", ", ", ")"); break;
+ case EOpConstructVec3: writeTriplet(visit, "vec3(", ", ", ")"); break;
+ case EOpConstructVec4: writeTriplet(visit, "vec4(", ", ", ")"); break;
+ case EOpConstructBool: writeTriplet(visit, "bool(", NULL, ")"); break;
+ case EOpConstructBVec2: writeTriplet(visit, "bvec2(", ", ", ")"); break;
+ case EOpConstructBVec3: writeTriplet(visit, "bvec3(", ", ", ")"); break;
+ case EOpConstructBVec4: writeTriplet(visit, "bvec4(", ", ", ")"); break;
+ case EOpConstructInt: writeTriplet(visit, "int(", NULL, ")"); break;
+ case EOpConstructIVec2: writeTriplet(visit, "ivec2(", ", ", ")"); break;
+ case EOpConstructIVec3: writeTriplet(visit, "ivec3(", ", ", ")"); break;
+ case EOpConstructIVec4: writeTriplet(visit, "ivec4(", ", ", ")"); break;
+ case EOpConstructMat2: writeTriplet(visit, "mat2(", ", ", ")"); break;
+ case EOpConstructMat3: writeTriplet(visit, "mat3(", ", ", ")"); break;
+ case EOpConstructMat4: writeTriplet(visit, "mat4(", ", ", ")"); break;
+ case EOpConstructStruct:
+ if (visit == PreVisit)
+ {
+ const TType& type = node->getType();
+ ASSERT(type.getBasicType() == EbtStruct);
+ out << type.getTypeName() << "(";
+ }
+ else if (visit == InVisit)
+ {
+ out << ", ";
+ }
+ else
+ {
+ out << ")";
+ }
+ break;
+
+ case EOpLessThan: preString = "lessThan("; delayedWrite = true; break;
+ case EOpGreaterThan: preString = "greaterThan("; delayedWrite = true; break;
+ case EOpLessThanEqual: preString = "lessThanEqual("; delayedWrite = true; break;
+ case EOpGreaterThanEqual: preString = "greaterThanEqual("; delayedWrite = true; break;
+ case EOpVectorEqual: preString = "equal("; delayedWrite = true; break;
+ case EOpVectorNotEqual: preString = "notEqual("; delayedWrite = true; break;
+ case EOpComma: writeTriplet(visit, NULL, ", ", NULL); break;
+
+ case EOpMod: preString = "mod("; delayedWrite = true; break;
+ case EOpPow: preString = "pow("; delayedWrite = true; break;
+ case EOpAtan: preString = "atan("; delayedWrite = true; break;
+ case EOpMin: preString = "min("; delayedWrite = true; break;
+ case EOpMax: preString = "max("; delayedWrite = true; break;
+ case EOpClamp: preString = "clamp("; delayedWrite = true; break;
+ case EOpMix: preString = "mix("; delayedWrite = true; break;
+ case EOpStep: preString = "step("; delayedWrite = true; break;
+ case EOpSmoothStep: preString = "smoothstep("; delayedWrite = true; break;
+
+ case EOpDistance: preString = "distance("; delayedWrite = true; break;
+ case EOpDot: preString = "dot("; delayedWrite = true; break;
+ case EOpCross: preString = "cross("; delayedWrite = true; break;
+ case EOpFaceForward: preString = "faceforward("; delayedWrite = true; break;
+ case EOpReflect: preString = "reflect("; delayedWrite = true; break;
+ case EOpRefract: preString = "refract("; delayedWrite = true; break;
+ case EOpMul: preString = "matrixCompMult("; delayedWrite = true; break;
+
+ default: UNREACHABLE(); break;
+ }
+ if (delayedWrite && visit == PreVisit && node->getUseEmulatedFunction())
+ preString = BuiltInFunctionEmulator::GetEmulatedFunctionName(preString);
+ if (delayedWrite)
+ writeTriplet(visit, preString.c_str(), ", ", ")");
+ return visitChildren;
+}
+
+bool TOutputGLSLBase::visitLoop(Visit visit, TIntermLoop* node)
+{
+ TInfoSinkBase& out = objSink();
+
+ incrementDepth();
+ // Loop header.
+ TLoopType loopType = node->getType();
+ if (loopType == ELoopFor) // for loop
+ {
+ if (!node->getUnrollFlag()) {
+ out << "for (";
+ if (node->getInit())
+ node->getInit()->traverse(this);
+ out << "; ";
+
+ if (node->getCondition())
+ node->getCondition()->traverse(this);
+ out << "; ";
+
+ if (node->getExpression())
+ node->getExpression()->traverse(this);
+ out << ")\n";
+ }
+ }
+ else if (loopType == ELoopWhile) // while loop
+ {
+ out << "while (";
+ ASSERT(node->getCondition() != NULL);
+ node->getCondition()->traverse(this);
+ out << ")\n";
+ }
+ else // do-while loop
+ {
+ ASSERT(loopType == ELoopDoWhile);
+ out << "do\n";
+ }
+
+ // Loop body.
+ if (node->getUnrollFlag())
+ {
+ TLoopIndexInfo indexInfo;
+ mLoopUnroll.FillLoopIndexInfo(node, indexInfo);
+ mLoopUnroll.Push(indexInfo);
+ while (mLoopUnroll.SatisfiesLoopCondition())
+ {
+ visitCodeBlock(node->getBody());
+ mLoopUnroll.Step();
+ }
+ mLoopUnroll.Pop();
+ }
+ else
+ {
+ visitCodeBlock(node->getBody());
+ }
+
+ // Loop footer.
+ if (loopType == ELoopDoWhile) // do-while loop
+ {
+ out << "while (";
+ ASSERT(node->getCondition() != NULL);
+ node->getCondition()->traverse(this);
+ out << ");\n";
+ }
+ decrementDepth();
+
+ // No need to visit children. They have been already processed in
+ // this function.
+ return false;
+}
+
+bool TOutputGLSLBase::visitBranch(Visit visit, TIntermBranch* node)
+{
+ switch (node->getFlowOp())
+ {
+ case EOpKill: writeTriplet(visit, "discard", NULL, NULL); break;
+ case EOpBreak: writeTriplet(visit, "break", NULL, NULL); break;
+ case EOpContinue: writeTriplet(visit, "continue", NULL, NULL); break;
+ case EOpReturn: writeTriplet(visit, "return ", NULL, NULL); break;
+ default: UNREACHABLE(); break;
+ }
+
+ return true;
+}
+
+void TOutputGLSLBase::visitCodeBlock(TIntermNode* node) {
+ TInfoSinkBase &out = objSink();
+ if (node != NULL)
+ {
+ node->traverse(this);
+ // Single statements not part of a sequence need to be terminated
+ // with semi-colon.
+ if (isSingleStatement(node))
+ out << ";\n";
+ }
+ else
+ {
+ out << "{\n}\n"; // Empty code block.
+ }
+}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.h b/Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.h
new file mode 100644
index 0000000..35f20a7
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.h
@@ -0,0 +1,54 @@
+//
+// Copyright (c) 2002-2011 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 CROSSCOMPILERGLSL_OUTPUTGLSLBASE_H_
+#define CROSSCOMPILERGLSL_OUTPUTGLSLBASE_H_
+
+#include <set>
+
+#include "compiler/ForLoopUnroll.h"
+#include "compiler/intermediate.h"
+#include "compiler/ParseHelper.h"
+
+class TOutputGLSLBase : public TIntermTraverser
+{
+public:
+ TOutputGLSLBase(TInfoSinkBase& objSink);
+ virtual ~TOutputGLSLBase() {}
+
+protected:
+ TInfoSinkBase& objSink() { return mObjSink; }
+ void writeTriplet(Visit visit, const char* preStr, const char* inStr, const char* postStr);
+ void writeVariableType(const TType& type);
+ virtual bool writeVariablePrecision(TPrecision precision) = 0;
+ void writeFunctionParameters(const TIntermSequence& args);
+ const ConstantUnion* writeConstantUnion(const TType& type, const ConstantUnion* pConstUnion);
+
+ virtual void visitSymbol(TIntermSymbol* node);
+ virtual void visitConstantUnion(TIntermConstantUnion* node);
+ virtual bool visitBinary(Visit visit, TIntermBinary* node);
+ virtual bool visitUnary(Visit visit, TIntermUnary* node);
+ virtual bool visitSelection(Visit visit, TIntermSelection* node);
+ virtual bool visitAggregate(Visit visit, TIntermAggregate* node);
+ virtual bool visitLoop(Visit visit, TIntermLoop* node);
+ virtual bool visitBranch(Visit visit, TIntermBranch* node);
+
+ void visitCodeBlock(TIntermNode* node);
+
+private:
+ TInfoSinkBase& mObjSink;
+ bool mDeclaringVariables;
+
+ // Structs are declared as the tree is traversed. This set contains all
+ // the structs already declared. It is maintained so that a struct is
+ // declared only once.
+ typedef std::set<TString> DeclaredStructs;
+ DeclaredStructs mDeclaredStructs;
+
+ ForLoopUnroll mLoopUnroll;
+};
+
+#endif // CROSSCOMPILERGLSL_OUTPUTGLSLBASE_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.cpp
index 57e99d2..69b8c26 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.cpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 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.
//
@@ -33,8 +33,11 @@ OutputHLSL::OutputHLSL(TParseContext &context) : TIntermTraverser(true, true, tr
mUsesTexture2D_bias = false;
mUsesTexture2DProj = false;
mUsesTexture2DProj_bias = false;
+ mUsesTexture2DProjLod = false;
+ mUsesTexture2DLod = false;
mUsesTextureCube = false;
mUsesTextureCube_bias = false;
+ mUsesTextureCubeLod = false;
mUsesDepthRange = false;
mUsesFragCoord = false;
mUsesPointCoord = false;
@@ -42,9 +45,12 @@ OutputHLSL::OutputHLSL(TParseContext &context) : TIntermTraverser(true, true, tr
mUsesPointSize = false;
mUsesXor = false;
mUsesMod1 = false;
- mUsesMod2 = false;
- mUsesMod3 = false;
- mUsesMod4 = false;
+ mUsesMod2v = false;
+ mUsesMod2f = false;
+ mUsesMod3v = false;
+ mUsesMod3f = false;
+ mUsesMod4v = false;
+ mUsesMod4f = false;
mUsesFaceforward1 = false;
mUsesFaceforward2 = false;
mUsesFaceforward3 = false;
@@ -61,7 +67,10 @@ OutputHLSL::OutputHLSL(TParseContext &context) : TIntermTraverser(true, true, tr
mUsesEqualBVec2 = false;
mUsesEqualBVec3 = false;
mUsesEqualBVec4 = false;
- mUsesAtan2 = false;
+ mUsesAtan2_1 = false;
+ mUsesAtan2_2 = false;
+ mUsesAtan2_3 = false;
+ mUsesAtan2_4 = false;
mScopeDepth = 0;
@@ -133,7 +142,7 @@ void OutputHLSL::header()
{
if (mReferencedUniforms.find(name.c_str()) != mReferencedUniforms.end())
{
- uniforms += "uniform " + typeString(type) + " " + decorate(name) + arrayString(type) + ";\n";
+ uniforms += "uniform " + typeString(type) + " " + decorateUniform(name, type) + arrayString(type) + ";\n";
}
}
else if (qualifier == EvqVaryingIn || qualifier == EvqInvariantVaryingIn)
@@ -182,7 +191,7 @@ void OutputHLSL::header()
if (mUsesFragCoord)
{
- out << "uniform float4 dx_Viewport;\n"
+ out << "uniform float4 dx_Coord;\n"
"uniform float2 dx_Depth;\n";
}
@@ -196,11 +205,25 @@ void OutputHLSL::header()
out << uniforms;
out << "\n";
+ // The texture fetch functions "flip" the Y coordinate in one way or another. This is because textures are stored
+ // according to the OpenGL convention, i.e. (0, 0) is "bottom left", rather than the D3D convention where (0, 0)
+ // is "top left". Since the HLSL texture fetch functions expect textures to be stored according to the D3D
+ // convention, the Y coordinate passed to these functions is adjusted to compensate.
+ //
+ // The simplest case is texture2D where the mapping is Y -> 1-Y, which maps [0, 1] -> [1, 0].
+ //
+ // The texture2DProj functions are more complicated because the projection divides by either Z or W. For the vec3
+ // case, the mapping is Y -> Z-Y or Y/Z -> 1-Y/Z, which again maps [0, 1] -> [1, 0].
+ //
+ // For cube textures the mapping is Y -> -Y, which maps [-1, 1] -> [1, -1]. This is not sufficient on its own for the
+ // +Y and -Y faces, which are now on the "wrong sides" of the cube. This is compensated for by exchanging the
+ // +Y and -Y faces everywhere else throughout the code.
+
if (mUsesTexture2D)
{
out << "float4 gl_texture2D(sampler2D s, float2 t)\n"
"{\n"
- " return tex2D(s, t);\n"
+ " return tex2D(s, float2(t.x, 1 - t.y));\n"
"}\n"
"\n";
}
@@ -209,7 +232,7 @@ void OutputHLSL::header()
{
out << "float4 gl_texture2D(sampler2D s, float2 t, float bias)\n"
"{\n"
- " return tex2Dbias(s, float4(t.x, t.y, 0, bias));\n"
+ " return tex2Dbias(s, float4(t.x, 1 - t.y, 0, bias));\n"
"}\n"
"\n";
}
@@ -218,12 +241,12 @@ void OutputHLSL::header()
{
out << "float4 gl_texture2DProj(sampler2D s, float3 t)\n"
"{\n"
- " return tex2Dproj(s, float4(t.x, t.y, 0, t.z));\n"
+ " return tex2Dproj(s, float4(t.x, t.z - t.y, 0, t.z));\n"
"}\n"
"\n"
"float4 gl_texture2DProj(sampler2D s, float4 t)\n"
"{\n"
- " return tex2Dproj(s, t);\n"
+ " return tex2Dproj(s, float4(t.x, t.w - t.y, t.z, t.w));\n"
"}\n"
"\n";
}
@@ -232,12 +255,12 @@ void OutputHLSL::header()
{
out << "float4 gl_texture2DProj(sampler2D s, float3 t, float bias)\n"
"{\n"
- " return tex2Dbias(s, float4(t.x / t.z, t.y / t.z, 0, bias));\n"
+ " return tex2Dbias(s, float4(t.x / t.z, 1 - (t.y / t.z), 0, bias));\n"
"}\n"
"\n"
"float4 gl_texture2DProj(sampler2D s, float4 t, float bias)\n"
"{\n"
- " return tex2Dbias(s, float4(t.x / t.w, t.y / t.w, 0, bias));\n"
+ " return tex2Dbias(s, float4(t.x / t.w, 1 - (t.y / t.w), 0, bias));\n"
"}\n"
"\n";
}
@@ -246,7 +269,7 @@ void OutputHLSL::header()
{
out << "float4 gl_textureCube(samplerCUBE s, float3 t)\n"
"{\n"
- " return texCUBE(s, t);\n"
+ " return texCUBE(s, float3(t.x, -t.y, t.z));\n"
"}\n"
"\n";
}
@@ -255,7 +278,7 @@ void OutputHLSL::header()
{
out << "float4 gl_textureCube(samplerCUBE s, float3 t, float bias)\n"
"{\n"
- " return texCUBEbias(s, float4(t.x, t.y, t.z, bias));\n"
+ " return texCUBEbias(s, float4(t.x, -t.y, t.z, bias));\n"
"}\n"
"\n";
}
@@ -283,7 +306,7 @@ void OutputHLSL::header()
{
if (mReferencedUniforms.find(name.c_str()) != mReferencedUniforms.end())
{
- uniforms += "uniform " + typeString(type) + " " + decorate(name) + arrayString(type) + ";\n";
+ uniforms += "uniform " + typeString(type) + " " + decorateUniform(name, type) + arrayString(type) + ";\n";
}
}
else if (qualifier == EvqAttribute)
@@ -331,6 +354,84 @@ void OutputHLSL::header()
"\n";
out << uniforms;
out << "\n";
+
+ // The texture fetch functions "flip" the Y coordinate in one way or another. This is because textures are stored
+ // according to the OpenGL convention, i.e. (0, 0) is "bottom left", rather than the D3D convention where (0, 0)
+ // is "top left". Since the HLSL texture fetch functions expect textures to be stored according to the D3D
+ // convention, the Y coordinate passed to these functions is adjusted to compensate.
+ //
+ // The simplest case is texture2D where the mapping is Y -> 1-Y, which maps [0, 1] -> [1, 0].
+ //
+ // The texture2DProj functions are more complicated because the projection divides by either Z or W. For the vec3
+ // case, the mapping is Y -> Z-Y or Y/Z -> 1-Y/Z, which again maps [0, 1] -> [1, 0].
+ //
+ // For cube textures the mapping is Y -> -Y, which maps [-1, 1] -> [1, -1]. This is not sufficient on its own for the
+ // +Y and -Y faces, which are now on the "wrong sides" of the cube. This is compensated for by exchanging the
+ // +Y and -Y faces everywhere else throughout the code.
+
+ if (mUsesTexture2D)
+ {
+ out << "float4 gl_texture2D(sampler2D s, float2 t)\n"
+ "{\n"
+ " return tex2Dlod(s, float4(t.x, 1 - t.y, 0, 0));\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesTexture2DLod)
+ {
+ out << "float4 gl_texture2DLod(sampler2D s, float2 t, float lod)\n"
+ "{\n"
+ " return tex2Dlod(s, float4(t.x, 1 - t.y, 0, lod));\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesTexture2DProj)
+ {
+ out << "float4 gl_texture2DProj(sampler2D s, float3 t)\n"
+ "{\n"
+ " return tex2Dlod(s, float4(t.x / t.z, 1 - t.y / t.z, 0, 0));\n"
+ "}\n"
+ "\n"
+ "float4 gl_texture2DProj(sampler2D s, float4 t)\n"
+ "{\n"
+ " return tex2Dlod(s, float4(t.x / t.w, 1 - t.y / t.w, 0, 0));\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesTexture2DProjLod)
+ {
+ out << "float4 gl_texture2DProjLod(sampler2D s, float3 t, float lod)\n"
+ "{\n"
+ " return tex2Dlod(s, float4(t.x / t.z, 1 - t.y / t.z, 0, lod));\n"
+ "}\n"
+ "\n"
+ "float4 gl_texture2DProjLod(sampler2D s, float4 t, float lod)\n"
+ "{\n"
+ " return tex2Dlod(s, float4(t.x / t.w, 1 - t.y / t.w, 0, lod));\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesTextureCube)
+ {
+ out << "float4 gl_textureCube(samplerCUBE s, float3 t)\n"
+ "{\n"
+ " return texCUBElod(s, float4(t.x, -t.y, t.z, 0));\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesTextureCubeLod)
+ {
+ out << "float4 gl_textureCubeLod(samplerCUBE s, float3 t, float lod)\n"
+ "{\n"
+ " return texCUBElod(s, float4(t.x, -t.y, t.z, lod));\n"
+ "}\n"
+ "\n";
+ }
}
if (mUsesFragCoord)
@@ -384,8 +485,17 @@ void OutputHLSL::header()
"}\n"
"\n";
}
-
- if (mUsesMod2)
+
+ if (mUsesMod2v)
+ {
+ out << "float2 mod(float2 x, float2 y)\n"
+ "{\n"
+ " return x - y * floor(x / y);\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesMod2f)
{
out << "float2 mod(float2 x, float y)\n"
"{\n"
@@ -394,7 +504,16 @@ void OutputHLSL::header()
"\n";
}
- if (mUsesMod3)
+ if (mUsesMod3v)
+ {
+ out << "float3 mod(float3 x, float3 y)\n"
+ "{\n"
+ " return x - y * floor(x / y);\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesMod3f)
{
out << "float3 mod(float3 x, float y)\n"
"{\n"
@@ -403,7 +522,16 @@ void OutputHLSL::header()
"\n";
}
- if (mUsesMod4)
+ if (mUsesMod4v)
+ {
+ out << "float4 mod(float4 x, float4 y)\n"
+ "{\n"
+ " return x - y * floor(x / y);\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesMod4f)
{
out << "float4 mod(float4 x, float y)\n"
"{\n"
@@ -578,7 +706,7 @@ void OutputHLSL::header()
"}\n";
}
- if (mUsesAtan2)
+ if (mUsesAtan2_1)
{
out << "float atanyx(float y, float x)\n"
"{\n"
@@ -586,6 +714,39 @@ void OutputHLSL::header()
" return atan2(y, x);\n"
"}\n";
}
+
+ if (mUsesAtan2_2)
+ {
+ out << "float2 atanyx(float2 y, float2 x)\n"
+ "{\n"
+ " if(x[0] == 0 && y[0] == 0) x[0] = 1;\n"
+ " if(x[1] == 0 && y[1] == 0) x[1] = 1;\n"
+ " return float2(atan2(y[0], x[0]), atan2(y[1], x[1]));\n"
+ "}\n";
+ }
+
+ if (mUsesAtan2_3)
+ {
+ out << "float3 atanyx(float3 y, float3 x)\n"
+ "{\n"
+ " if(x[0] == 0 && y[0] == 0) x[0] = 1;\n"
+ " if(x[1] == 0 && y[1] == 0) x[1] = 1;\n"
+ " if(x[2] == 0 && y[2] == 0) x[2] = 1;\n"
+ " return float3(atan2(y[0], x[0]), atan2(y[1], x[1]), atan2(y[2], x[2]));\n"
+ "}\n";
+ }
+
+ if (mUsesAtan2_4)
+ {
+ out << "float4 atanyx(float4 y, float4 x)\n"
+ "{\n"
+ " if(x[0] == 0 && y[0] == 0) x[0] = 1;\n"
+ " if(x[1] == 0 && y[1] == 0) x[1] = 1;\n"
+ " if(x[2] == 0 && y[2] == 0) x[2] = 1;\n"
+ " if(x[3] == 0 && y[3] == 0) x[3] = 1;\n"
+ " return float4(atan2(y[0], x[0]), atan2(y[1], x[1]), atan2(y[2], x[2]), atan2(y[3], x[3]));\n"
+ "}\n";
+ }
}
void OutputHLSL::visitSymbol(TIntermSymbol *node)
@@ -634,17 +795,22 @@ void OutputHLSL::visitSymbol(TIntermSymbol *node)
if (qualifier == EvqUniform)
{
mReferencedUniforms.insert(name.c_str());
+ out << decorateUniform(name, node->getType());
}
else if (qualifier == EvqAttribute)
{
mReferencedAttributes.insert(name.c_str());
+ out << decorate(name);
}
else if (qualifier == EvqVaryingOut || qualifier == EvqInvariantVaryingOut || qualifier == EvqVaryingIn || qualifier == EvqInvariantVaryingIn)
{
mReferencedVaryings.insert(name.c_str());
+ out << decorate(name);
+ }
+ else
+ {
+ out << decorate(name);
}
-
- out << decorate(name);
}
}
@@ -902,8 +1068,6 @@ bool OutputHLSL::visitBinary(Visit visit, TIntermBinary *node)
bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
{
- TInfoSinkBase &out = mBody;
-
switch (node->getOp())
{
case EOpNegative: outputTriplet(visit, "(-", "", ")"); break;
@@ -968,7 +1132,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
case EOpLength: outputTriplet(visit, "length(", "", ")"); break;
case EOpNormalize: outputTriplet(visit, "normalize(", "", ")"); break;
case EOpDFdx: outputTriplet(visit, "ddx(", "", ")"); break;
- case EOpDFdy: outputTriplet(visit, "ddy(", "", ")"); break;
+ case EOpDFdy: outputTriplet(visit, "(-ddy(", "", "))"); break;
case EOpFwidth: outputTriplet(visit, "fwidth(", "", ")"); break;
case EOpAny: outputTriplet(visit, "any(", "", ")"); break;
case EOpAll: outputTriplet(visit, "all(", "", ")"); break;
@@ -980,7 +1144,6 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
{
- ShShaderType shaderType = mContext.shaderType;
TInfoSinkBase &out = mBody;
switch (node->getOp())
@@ -989,6 +1152,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
{
if (mInsideFunction)
{
+ outputLineDirective(node->getLine());
out << "{\n";
mScopeDepth++;
@@ -1005,6 +1169,8 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
for (TIntermSequence::iterator sit = node->getSequence().begin(); sit != node->getSequence().end(); sit++)
{
+ outputLineDirective((*sit)->getLine());
+
if (isSingleStatement(*sit))
{
mUnfoldSelect->traverse(*sit);
@@ -1017,6 +1183,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
if (mInsideFunction)
{
+ outputLineDirective(node->getEndLine());
out << "}\n";
mScopeDepth--;
@@ -1118,7 +1285,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
return false;
}
break;
- case EOpComma: outputTriplet(visit, "", ", ", ""); break;
+ case EOpComma: outputTriplet(visit, "(", ", ", ")"); break;
case EOpFunction:
{
TString name = TFunction::unmangleName(node->getName());
@@ -1145,6 +1312,11 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
if (symbol)
{
+ if (symbol->getType().getStruct())
+ {
+ addConstructor(symbol->getType(), scopedStruct(symbol->getType().getTypeName()), NULL);
+ }
+
out << argumentString(symbol);
if (i < arguments.size() - 1)
@@ -1157,13 +1329,16 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
sequence.erase(sequence.begin());
- out << ")\n"
- "{\n";
-
+ out << ")\n";
+
+ outputLineDirective(node->getLine());
+ out << "{\n";
+
mInsideFunction = true;
}
else if (visit == PostVisit)
{
+ outputLineDirective(node->getEndLine());
out << "}\n";
mInsideFunction = false;
@@ -1226,15 +1401,33 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
}
else if (name == "texture2DLod")
{
- UNIMPLEMENTED(); // Requires the vertex shader texture sampling extension
+ if (node->getSequence().size() == 3)
+ {
+ mUsesTexture2DLod = true;
+ }
+ else UNREACHABLE();
+
+ out << "gl_texture2DLod(";
}
else if (name == "texture2DProjLod")
{
- UNIMPLEMENTED(); // Requires the vertex shader texture sampling extension
+ if (node->getSequence().size() == 3)
+ {
+ mUsesTexture2DProjLod = true;
+ }
+ else UNREACHABLE();
+
+ out << "gl_texture2DProjLod(";
}
else if (name == "textureCubeLod")
{
- UNIMPLEMENTED(); // Requires the vertex shader texture sampling extension
+ if (node->getSequence().size() == 3)
+ {
+ mUsesTextureCubeLod = true;
+ }
+ else UNREACHABLE();
+
+ out << "gl_textureCubeLod(";
}
else UNREACHABLE();
}
@@ -1322,12 +1515,17 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
case EOpVectorNotEqual: outputTriplet(visit, "(", " != ", ")"); break;
case EOpMod:
{
- switch (node->getSequence()[0]->getAsTyped()->getNominalSize()) // Number of components in the first argument
+ // We need to look at the number of components in both arguments
+ switch (node->getSequence()[0]->getAsTyped()->getNominalSize() * 10
+ + node->getSequence()[1]->getAsTyped()->getNominalSize())
{
- case 1: mUsesMod1 = true; break;
- case 2: mUsesMod2 = true; break;
- case 3: mUsesMod3 = true; break;
- case 4: mUsesMod4 = true; break;
+ case 11: mUsesMod1 = true; break;
+ case 22: mUsesMod2v = true; break;
+ case 21: mUsesMod2f = true; break;
+ case 33: mUsesMod3v = true; break;
+ case 31: mUsesMod3f = true; break;
+ case 44: mUsesMod4v = true; break;
+ case 41: mUsesMod4f = true; break;
default: UNREACHABLE();
}
@@ -1337,7 +1535,14 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
case EOpPow: outputTriplet(visit, "pow(", ", ", ")"); break;
case EOpAtan:
ASSERT(node->getSequence().size() == 2); // atan(x) is a unary operator
- mUsesAtan2 = true;
+ switch (node->getSequence()[0]->getAsTyped()->getNominalSize())
+ {
+ case 1: mUsesAtan2_1 = true; break;
+ case 2: mUsesAtan2_2 = true; break;
+ case 3: mUsesAtan2_3 = true; break;
+ case 4: mUsesAtan2_4 = true; break;
+ default: UNREACHABLE();
+ }
outputTriplet(visit, "atanyx(", ", ", ")");
break;
case EOpMin: outputTriplet(visit, "min(", ", ", ")"); break;
@@ -1378,7 +1583,7 @@ bool OutputHLSL::visitSelection(Visit visit, TIntermSelection *node)
if (node->usesTernaryOperator())
{
- out << "t" << mUnfoldSelect->getTemporaryIndex();
+ out << "s" << mUnfoldSelect->getNextTemporaryIndex();
}
else // if/else statement
{
@@ -1388,23 +1593,30 @@ bool OutputHLSL::visitSelection(Visit visit, TIntermSelection *node)
node->getCondition()->traverse(this);
- out << ")\n"
- "{\n";
+ out << ")\n";
+
+ outputLineDirective(node->getLine());
+ out << "{\n";
if (node->getTrueBlock())
{
node->getTrueBlock()->traverse(this);
}
+ outputLineDirective(node->getLine());
out << ";}\n";
if (node->getFalseBlock())
{
- out << "else\n"
- "{\n";
+ out << "else\n";
+
+ outputLineDirective(node->getFalseBlock()->getLine());
+ out << "{\n";
+ outputLineDirective(node->getFalseBlock()->getLine());
node->getFalseBlock()->traverse(this);
+ outputLineDirective(node->getFalseBlock()->getLine());
out << ";}\n";
}
}
@@ -1428,27 +1640,14 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
if (node->getType() == ELoopDoWhile)
{
- out << "do\n"
- "{\n";
+ out << "{do\n";
+
+ outputLineDirective(node->getLine());
+ out << "{\n";
}
else
{
- if (node->getInit())
- {
- mUnfoldSelect->traverse(node->getInit());
- }
-
- if (node->getCondition())
- {
- mUnfoldSelect->traverse(node->getCondition());
- }
-
- if (node->getExpression())
- {
- mUnfoldSelect->traverse(node->getExpression());
- }
-
- out << "for(";
+ out << "{for(";
if (node->getInit())
{
@@ -1469,8 +1668,10 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
node->getExpression()->traverse(this);
}
- out << ")\n"
- "{\n";
+ out << ")\n";
+
+ outputLineDirective(node->getLine());
+ out << "{\n";
}
if (node->getBody())
@@ -1478,18 +1679,20 @@ bool OutputHLSL::visitLoop(Visit visit, TIntermLoop *node)
node->getBody()->traverse(this);
}
- out << "}\n";
+ outputLineDirective(node->getLine());
+ out << ";}\n";
if (node->getType() == ELoopDoWhile)
{
+ outputLineDirective(node->getCondition()->getLine());
out << "while(\n";
node->getCondition()->traverse(this);
- out << ")";
+ out << ");";
}
- out << ";\n";
+ out << "}\n";
return false;
}
@@ -1500,9 +1703,9 @@ bool OutputHLSL::visitBranch(Visit visit, TIntermBranch *node)
switch (node->getFlowOp())
{
- case EOpKill: outputTriplet(visit, "discard", "", ""); break;
- case EOpBreak: outputTriplet(visit, "break", "", ""); break;
- case EOpContinue: outputTriplet(visit, "continue", "", ""); break;
+ case EOpKill: outputTriplet(visit, "discard;\n", "", ""); break;
+ case EOpBreak: outputTriplet(visit, "break;\n", "", ""); break;
+ case EOpContinue: outputTriplet(visit, "continue;\n", "", ""); break;
case EOpReturn:
if (visit == PreVisit)
{
@@ -1517,7 +1720,10 @@ bool OutputHLSL::visitBranch(Visit visit, TIntermBranch *node)
}
else if (visit == PostVisit)
{
- out << ";\n";
+ if (node->getExpression())
+ {
+ out << ";\n";
+ }
}
break;
default: UNREACHABLE();
@@ -1669,7 +1875,7 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node)
if (comparator == EOpLessThan)
{
- int iterations = (limit - initial + 1) / increment;
+ int iterations = (limit - initial) / increment;
if (iterations <= 255)
{
@@ -1678,8 +1884,7 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node)
while (iterations > 0)
{
- int remainder = (limit - initial + 1) % increment;
- int clampedLimit = initial + increment * std::min(255, iterations) - 1 - remainder;
+ int clampedLimit = initial + increment * std::min(255, iterations);
// for(int index = initial; index < clampedLimit; index += increment)
@@ -1697,15 +1902,18 @@ bool OutputHLSL::handleExcessiveLoop(TIntermLoop *node)
index->traverse(this);
out << " += ";
out << increment;
- out << ")\n"
- "{\n";
+ out << ")\n";
+
+ outputLineDirective(node->getLine());
+ out << "{\n";
if (node->getBody())
{
node->getBody()->traverse(this);
}
- out << "}\n";
+ outputLineDirective(node->getLine());
+ out << ";}\n";
initial += 255 * increment;
iterations -= 255;
@@ -1737,6 +1945,22 @@ void OutputHLSL::outputTriplet(Visit visit, const TString &preString, const TStr
}
}
+void OutputHLSL::outputLineDirective(int line)
+{
+ if ((mContext.compileOptions & SH_LINE_DIRECTIVES) && (line > 0))
+ {
+ mBody << "\n";
+ mBody << "#line " << line;
+
+ if (mContext.sourcePath)
+ {
+ mBody << " \"" << mContext.sourcePath << "\"";
+ }
+
+ mBody << "\n";
+ }
+}
+
TString OutputHLSL::argumentString(const TIntermSymbol *symbol)
{
TQualifier qualifier = symbol->getQualifier();
@@ -1839,6 +2063,8 @@ TString OutputHLSL::typeString(const TType &type)
return "sampler2D";
case EbtSamplerCube:
return "samplerCUBE";
+ case EbtSamplerExternalOES:
+ return "sampler2D";
}
}
@@ -1880,6 +2106,11 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
return; // Nameless structures don't have constructors
}
+ if (type.getStruct() && mStructNames.find(decorate(name)) != mStructNames.end())
+ {
+ return; // Already added
+ }
+
TType ctorType = type;
ctorType.clearArrayness();
ctorType.setPrecision(EbpHigh);
@@ -1890,14 +2121,7 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
typedef std::vector<TType> ParameterArray;
ParameterArray ctorParameters;
- if (parameters)
- {
- for (TIntermSequence::const_iterator parameter = parameters->begin(); parameter != parameters->end(); parameter++)
- {
- ctorParameters.push_back((*parameter)->getAsTyped()->getType());
- }
- }
- else if (type.getStruct())
+ if (type.getStruct())
{
mStructNames.insert(decorate(name));
@@ -1926,6 +2150,13 @@ void OutputHLSL::addConstructor(const TType &type, const TString &name, const TI
ctorParameters.push_back(*fields[i].type);
}
}
+ else if (parameters)
+ {
+ for (TIntermSequence::const_iterator parameter = parameters->begin(); parameter != parameters->end(); parameter++)
+ {
+ ctorParameters.push_back((*parameter)->getAsTyped()->getType());
+ }
+ }
else UNREACHABLE();
TString constructor;
@@ -2182,13 +2413,25 @@ TString OutputHLSL::structLookup(const TString &typeName)
TString OutputHLSL::decorate(const TString &string)
{
- if (string.substr(0, 3) != "gl_" && string.substr(0, 3) != "dx_")
+ if (string.compare(0, 3, "gl_") != 0 && string.compare(0, 3, "dx_") != 0)
{
return "_" + string;
}
- else
+
+ return string;
+}
+
+TString OutputHLSL::decorateUniform(const TString &string, const TType &type)
+{
+ if (type.isArray())
{
- return string;
+ return "ar_" + string; // Allows identifying arrays of size 1
}
+ else if (type.getBasicType() == EbtSamplerExternalOES)
+ {
+ return "ex_" + string;
+ }
+
+ return decorate(string);
}
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.h b/Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.h
index ddbd077..824bc07 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.h
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 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.
//
@@ -31,7 +31,8 @@ class OutputHLSL : public TIntermTraverser
static TString qualifierString(TQualifier qualifier);
static TString arrayString(const TType &type);
static TString initializer(const TType &type);
- static TString decorate(const TString &string); // Prepend an underscore to avoid naming clashes
+ static TString decorate(const TString &string); // Prepends an underscore to avoid naming clashes
+ static TString decorateUniform(const TString &string, const TType &type);
protected:
void header();
@@ -49,6 +50,7 @@ class OutputHLSL : public TIntermTraverser
bool isSingleStatement(TIntermNode *node);
bool handleExcessiveLoop(TIntermLoop *node);
void outputTriplet(Visit visit, const TString &preString, const TString &inString, const TString &postString);
+ void outputLineDirective(int line);
TString argumentString(const TIntermSymbol *symbol);
int vectorSize(const TType &type) const;
@@ -75,10 +77,13 @@ class OutputHLSL : public TIntermTraverser
// Parameters determining what goes in the header output
bool mUsesTexture2D;
bool mUsesTexture2D_bias;
+ bool mUsesTexture2DLod;
bool mUsesTexture2DProj;
bool mUsesTexture2DProj_bias;
+ bool mUsesTexture2DProjLod;
bool mUsesTextureCube;
bool mUsesTextureCube_bias;
+ bool mUsesTextureCubeLod;
bool mUsesDepthRange;
bool mUsesFragCoord;
bool mUsesPointCoord;
@@ -86,9 +91,12 @@ class OutputHLSL : public TIntermTraverser
bool mUsesPointSize;
bool mUsesXor;
bool mUsesMod1;
- bool mUsesMod2;
- bool mUsesMod3;
- bool mUsesMod4;
+ bool mUsesMod2v;
+ bool mUsesMod2f;
+ bool mUsesMod3v;
+ bool mUsesMod3f;
+ bool mUsesMod4v;
+ bool mUsesMod4f;
bool mUsesFaceforward1;
bool mUsesFaceforward2;
bool mUsesFaceforward3;
@@ -105,7 +113,10 @@ class OutputHLSL : public TIntermTraverser
bool mUsesEqualBVec2;
bool mUsesEqualBVec3;
bool mUsesEqualBVec4;
- bool mUsesAtan2;
+ bool mUsesAtan2_1;
+ bool mUsesAtan2_2;
+ bool mUsesAtan2_3;
+ bool mUsesAtan2_4;
typedef std::set<TString> Constructors;
Constructors mConstructors;
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ParseHelper.cpp b/Source/ThirdParty/ANGLE/src/compiler/ParseHelper.cpp
index 53f3fa8..431f8d1 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ParseHelper.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/ParseHelper.cpp
@@ -196,7 +196,6 @@ bool TParseContext::parseMatrixFields(const TString& compString, int matSize, TM
//
void TParseContext::recover()
{
- recoveredFromError = true;
}
//
@@ -261,6 +260,8 @@ void TParseContext::binaryOpError(int line, const char* op, TString left, TStrin
}
bool TParseContext::precisionErrorCheck(int line, TPrecision precision, TBasicType type){
+ if (!checksPrecisionErrors)
+ return false;
switch( type ){
case EbtFloat:
if( precision == EbpUndefined ){
@@ -274,6 +275,8 @@ bool TParseContext::precisionErrorCheck(int line, TPrecision precision, TBasicTy
return true;
}
break;
+ default:
+ return false;
}
return false;
}
@@ -445,16 +448,16 @@ bool TParseContext::reservedErrorCheck(int line, const TString& identifier)
{
static const char* reservedErrMsg = "reserved built-in name";
if (!symbolTable.atBuiltInLevel()) {
- if (identifier.substr(0, 3) == TString("gl_")) {
+ if (identifier.compare(0, 3, "gl_") == 0) {
error(line, reservedErrMsg, "gl_", "");
return true;
}
if (shaderSpec == SH_WEBGL_SPEC) {
- if (identifier.substr(0, 6) == TString("webgl_")) {
+ if (identifier.compare(0, 6, "webgl_") == 0) {
error(line, reservedErrMsg, "webgl_", "");
return true;
}
- if (identifier.substr(0, 7) == TString("_webgl_")) {
+ if (identifier.compare(0, 7, "_webgl_") == 0) {
error(line, reservedErrMsg, "_webgl_", "");
return true;
}
@@ -550,7 +553,7 @@ bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction
return true;
}
- if (!type->isMatrix()) {
+ if (!type->isMatrix() || !matrixInMatrix) {
if ((op != EOpConstructStruct && size != 1 && size < type->getObjectSize()) ||
(op == EOpConstructStruct && size < type->getObjectSize())) {
error(line, "not enough data provided for construction", "constructor", "");
@@ -558,7 +561,7 @@ bool TParseContext::constructorErrorCheck(int line, TIntermNode* node, TFunction
}
}
- TIntermTyped* typed = node->getAsTyped();
+ TIntermTyped *typed = node ? node->getAsTyped() : 0;
if (typed == 0) {
error(line, "constructor argument does not have a type", "constructor", "");
return true;
@@ -880,16 +883,17 @@ bool TParseContext::nonInitConstErrorCheck(int line, TString& identifier, TPubli
//
// Returns true if there was an error.
//
-bool TParseContext::nonInitErrorCheck(int line, TString& identifier, TPublicType& type)
+bool TParseContext::nonInitErrorCheck(int line, TString& identifier, TPublicType& type, TVariable*& variable)
{
if (reservedErrorCheck(line, identifier))
recover();
- TVariable* variable = new TVariable(&identifier, TType(type));
+ variable = new TVariable(&identifier, TType(type));
if (! symbolTable.insert(*variable)) {
error(line, "redefinition", variable->getName().c_str(), "");
delete variable;
+ variable = 0;
return true;
}
@@ -925,7 +929,8 @@ bool TParseContext::extensionErrorCheck(int line, const TString& extension)
error(line, "extension", extension.c_str(), "is not supported");
return true;
}
- if (iter->second == EBhDisable) {
+ // In GLSL ES, an extension's default behavior is "disable".
+ if (iter->second == EBhDisable || iter->second == EBhUndefined) {
error(line, "extension", extension.c_str(), "is disabled");
return true;
}
@@ -938,6 +943,12 @@ bool TParseContext::extensionErrorCheck(int line, const TString& extension)
return false;
}
+bool TParseContext::supportsExtension(const char* extension)
+{
+ TExtensionBehavior::const_iterator iter = extensionBehavior.find(extension);
+ return (iter != extensionBehavior.end());
+}
+
/////////////////////////////////////////////////////////////////////////////////
//
// Non-Errors.
@@ -1414,6 +1425,53 @@ TIntermTyped* TParseContext::addConstStruct(TString& identifier, TIntermTyped* n
return typedNode;
}
+bool TParseContext::enterStructDeclaration(int line, const TString& identifier)
+{
+ ++structNestingLevel;
+
+ // Embedded structure definitions are not supported per GLSL ES spec.
+ // They aren't allowed in GLSL either, but we need to detect this here
+ // so we don't rely on the GLSL compiler to catch it.
+ if (structNestingLevel > 1) {
+ error(line, "", "Embedded struct definitions are not allowed", "");
+ return true;
+ }
+
+ return false;
+}
+
+void TParseContext::exitStructDeclaration()
+{
+ --structNestingLevel;
+}
+
+namespace {
+
+const int kWebGLMaxStructNesting = 4;
+
+} // namespace
+
+bool TParseContext::structNestingErrorCheck(TSourceLoc line, const TType& fieldType)
+{
+ if (shaderSpec != SH_WEBGL_SPEC) {
+ return false;
+ }
+
+ if (fieldType.getBasicType() != EbtStruct) {
+ return false;
+ }
+
+ // We're already inside a structure definition at this point, so add
+ // one to the field's struct nesting.
+ if (1 + fieldType.getDeepestStructNesting() > kWebGLMaxStructNesting) {
+ error(line, "", "", "Reference of struct type %s exceeds maximum struct nesting of %d",
+ fieldType.getTypeName().c_str(), kWebGLMaxStructNesting);
+ return true;
+ }
+
+ return false;
+}
+
//
// Parse an array of strings using yyparse.
//
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ParseHelper.h b/Source/ThirdParty/ANGLE/src/compiler/ParseHelper.h
index cb6e0d0..3e05763 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ParseHelper.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/ParseHelper.h
@@ -30,34 +30,58 @@ struct TPragma {
// they can be passed to the parser without needing a global.
//
struct TParseContext {
- TParseContext(TSymbolTable& symt, const TExtensionBehavior& ext, TIntermediate& interm, ShShaderType type, ShShaderSpec spec, TInfoSink& is) :
- intermediate(interm), symbolTable(symt), extensionBehavior(ext), infoSink(is), shaderType(type), shaderSpec(spec), treeRoot(0),
- recoveredFromError(false), numErrors(0), lexAfterType(false), loopNestingLevel(0),
- inTypeParen(false), scanner(NULL), contextPragma(true, false) { }
+ TParseContext(TSymbolTable& symt, TExtensionBehavior& ext, TIntermediate& interm, ShShaderType type, ShShaderSpec spec, int options, bool checksPrecErrors, const char* sourcePath, TInfoSink& is) :
+ intermediate(interm),
+ symbolTable(symt),
+ extensionBehavior(ext),
+ infoSink(is),
+ shaderType(type),
+ shaderSpec(spec),
+ compileOptions(options),
+ sourcePath(sourcePath),
+ treeRoot(0),
+ numErrors(0),
+ lexAfterType(false),
+ loopNestingLevel(0),
+ structNestingLevel(0),
+ inTypeParen(false),
+ currentFunctionType(NULL),
+ functionReturnsValue(false),
+ checksPrecisionErrors(checksPrecErrors),
+ contextPragma(true, false),
+ scanner(NULL) { }
TIntermediate& intermediate; // to hold and build a parse tree
TSymbolTable& symbolTable; // symbol table that goes with the language currently being parsed
- TExtensionBehavior extensionBehavior; // mapping between supported extensions and current behavior.
+ TExtensionBehavior& extensionBehavior; // mapping between supported extensions and current behavior.
TInfoSink& infoSink;
ShShaderType shaderType; // vertex or fragment language (future: pack or unpack)
ShShaderSpec shaderSpec; // The language specification compiler conforms to - GLES2 or WebGL.
+ int compileOptions;
+ const char* sourcePath; // Path of source file or NULL.
TIntermNode* treeRoot; // root of parse tree being created
- bool recoveredFromError; // true if a parse error has occurred, but we continue to parse
int numErrors;
bool lexAfterType; // true if we've recognized a type, so can only be looking for an identifier
int loopNestingLevel; // 0 if outside all loops
+ int structNestingLevel; // incremented while parsing a struct declaration
bool inTypeParen; // true if in parentheses, looking only for an identifier
const TType* currentFunctionType; // the return type of the function that's currently being parsed
bool functionReturnsValue; // true if a non-void function has a return
+ bool checksPrecisionErrors; // true if an error will be generated when a variable is declared without precision, explicit or implicit.
+ struct TPragma contextPragma;
+ TString HashErrMsg;
+ bool AfterEOF;
+ void* scanner;
void error(TSourceLoc loc, const char *reason, const char* token,
const char* extraInfoFormat, ...);
void warning(TSourceLoc loc, const char* reason, const char* token,
const char* extraInfoFormat, ...);
- bool reservedErrorCheck(int line, const TString& identifier);
void recover();
bool parseVectorFields(const TString&, int vecSize, TVectorFields&, int line);
bool parseMatrixFields(const TString&, int matSize, TMatrixFields&, int line);
+
+ bool reservedErrorCheck(int line, const TString& identifier);
void assignError(int line, const char* op, TString left, TString right);
void unaryOpError(int line, const char* op, TString operand);
void binaryOpError(int line, const char* op, TString left, TString right);
@@ -77,15 +101,19 @@ struct TParseContext {
bool samplerErrorCheck(int line, const TPublicType& pType, const char* reason);
bool structQualifierErrorCheck(int line, const TPublicType& pType);
bool parameterSamplerErrorCheck(int line, TQualifier qualifier, const TType& type);
- bool containsSampler(TType& type);
bool nonInitConstErrorCheck(int line, TString& identifier, TPublicType& type);
- bool nonInitErrorCheck(int line, TString& identifier, TPublicType& type);
+ bool nonInitErrorCheck(int line, TString& identifier, TPublicType& type, TVariable*& variable);
bool paramErrorCheck(int line, TQualifier qualifier, TQualifier paramQualifier, TType* type);
bool extensionErrorCheck(int line, const TString&);
+ bool supportsExtension(const char* extension);
+
+ bool containsSampler(TType& type);
+ bool areAllChildConst(TIntermAggregate* aggrNode);
const TFunction* findFunction(int line, TFunction* pfnCall, bool *builtIn = 0);
bool executeInitializer(TSourceLoc line, TString& identifier, TPublicType& pType,
TIntermTyped* initializer, TIntermNode*& intermNode, TVariable* variable = 0);
- bool areAllChildConst(TIntermAggregate* aggrNode);
+ bool arraySetMaxSize(TIntermSymbol*, TType*, int, bool, TSourceLoc);
+
TIntermTyped* addConstructor(TIntermNode*, const TType*, TOperator, TFunction*, TSourceLoc);
TIntermTyped* foldConstConstructor(TIntermAggregate* aggrNode, const TType& type);
TIntermTyped* constructStruct(TIntermNode*, TType*, int, TSourceLoc, bool subset);
@@ -94,11 +122,14 @@ struct TParseContext {
TIntermTyped* addConstMatrixNode(int , TIntermTyped*, TSourceLoc);
TIntermTyped* addConstArrayNode(int index, TIntermTyped* node, TSourceLoc line);
TIntermTyped* addConstStruct(TString& , TIntermTyped*, TSourceLoc);
- bool arraySetMaxSize(TIntermSymbol*, TType*, int, bool, TSourceLoc);
- void* scanner;
- struct TPragma contextPragma;
- TString HashErrMsg;
- bool AfterEOF;
+
+ // Performs an error check for embedded struct declarations.
+ // Returns true if an error was raised due to the declaration of
+ // this struct.
+ bool enterStructDeclaration(TSourceLoc line, const TString& identifier);
+ void exitStructDeclaration();
+
+ bool structNestingErrorCheck(TSourceLoc line, const TType& fieldType);
};
int PaParseStrings(int count, const char* const string[], const int length[],
diff --git a/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp b/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp
index 93e21e4..a600c02 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp
@@ -151,16 +151,23 @@ const unsigned char TAllocation::userDataFill = 0xcd;
//
void TAllocation::checkGuardBlock(unsigned char* blockMem, unsigned char val, const char* locText) const
{
+#ifdef GUARD_BLOCKS
for (size_t x = 0; x < guardBlockSize; x++) {
if (blockMem[x] != val) {
char assertMsg[80];
// We don't print the assert message. It's here just to be helpful.
- sprintf(assertMsg, "PoolAlloc: Damage %s %u byte allocation at 0x%p\n",
+#if defined(_MSC_VER)
+ sprintf(assertMsg, "PoolAlloc: Damage %s %Iu byte allocation at 0x%p\n",
+ locText, size, data());
+#else
+ sprintf(assertMsg, "PoolAlloc: Damage %s %zu byte allocation at 0x%p\n",
locText, size, data());
+#endif
assert(0 && "PoolAlloc: Damage in guard block");
}
}
+#endif
}
@@ -299,4 +306,4 @@ void TAllocation::checkAllocList() const
{
for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc)
alloc->check();
-} \ No newline at end of file
+}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.h b/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.h
index 051dc00..a8a59c6 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.h
@@ -253,12 +253,18 @@ public:
pointer address(reference x) const { return &x; }
const_pointer address(const_reference x) const { return &x; }
- pool_allocator() : allocator(GlobalPoolAllocator) { }
- pool_allocator(TPoolAllocator& a) : allocator(a) { }
+ pool_allocator() : allocator(&GlobalPoolAllocator) { }
+ pool_allocator(TPoolAllocator& a) : allocator(&a) { }
pool_allocator(const pool_allocator<T>& p) : allocator(p.allocator) { }
+ template <class Other>
+ pool_allocator<T>& operator=(const pool_allocator<Other>& p) {
+ allocator = p.allocator;
+ return *this;
+ }
+
template<class Other>
- pool_allocator(const pool_allocator<Other>& p) : allocator(p.getAllocator()) { }
+ pool_allocator(const pool_allocator<Other>& p) : allocator(&p.getAllocator()) { }
#if defined(__SUNPRO_CC) && !defined(_RWSTD_ALLOCATOR)
// libCStd on some platforms have a different allocate/deallocate interface.
@@ -290,11 +296,11 @@ public:
size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); }
size_type max_size(int size) const { return static_cast<size_type>(-1) / size; }
- void setAllocator(TPoolAllocator* a) { allocator = *a; }
- TPoolAllocator& getAllocator() const { return allocator; }
+ void setAllocator(TPoolAllocator* a) { allocator = a; }
+ TPoolAllocator& getAllocator() const { return *allocator; }
protected:
- TPoolAllocator& allocator;
+ TPoolAllocator* allocator;
};
-#endif // _POOLALLOC_INCLUDED_ \ No newline at end of file
+#endif // _POOLALLOC_INCLUDED_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h b/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h
index e65c1ee..91c47e7 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/ShHandle.h
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 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.
//
@@ -16,11 +16,13 @@
#include "GLSLANG/ShaderLang.h"
+#include "compiler/BuiltInFunctionEmulator.h"
#include "compiler/ExtensionBehavior.h"
#include "compiler/InfoSink.h"
#include "compiler/SymbolTable.h"
#include "compiler/VariableInfo.h"
+class LongNameMap;
class TCompiler;
//
@@ -57,6 +59,7 @@ public:
TInfoSink& getInfoSink() { return infoSink; }
const TVariableInfoList& getAttribs() const { return attribs; }
const TVariableInfoList& getUniforms() const { return uniforms; }
+ int getMappedNameMaxLength() const;
protected:
ShShaderType getShaderType() const { return shaderType; }
@@ -65,13 +68,21 @@ protected:
bool InitBuiltInSymbolTable(const ShBuiltInResources& resources);
// Clears the results from the previous compilation.
void clearResults();
+ // Return true if function recursion is detected.
+ bool detectRecursion(TIntermNode* root);
// Returns true if the given shader does not exceed the minimum
// functionality mandated in GLSL 1.0 spec Appendix A.
bool validateLimitations(TIntermNode* root);
// Collect info for all attribs and uniforms.
void collectAttribsUniforms(TIntermNode* root);
+ // Map long variable names into shorter ones.
+ void mapLongVariableNames(TIntermNode* root);
// Translate to object code.
virtual void translate(TIntermNode* root) = 0;
+ // Get built-in extensions with default behavior.
+ const TExtensionBehavior& getExtensionBehavior() const;
+
+ const BuiltInFunctionEmulator& getBuiltInFunctionEmulator() const;
private:
ShShaderType shaderType;
@@ -83,10 +94,15 @@ private:
// Built-in extensions with default behavior.
TExtensionBehavior extensionBehavior;
+ BuiltInFunctionEmulator builtInFunctionEmulator;
+
// Results of compilation.
TInfoSink infoSink; // Output sink.
TVariableInfoList attribs; // Active attributes in the compiled shader.
TVariableInfoList uniforms; // Active uniforms in the compiled shader.
+
+ // Cached copy of the ref-counted singleton.
+ LongNameMap* longNameMap;
};
//
@@ -98,7 +114,8 @@ private:
// destroy the machine dependent objects, which contain the
// above machine independent information.
//
-TCompiler* ConstructCompiler(ShShaderType type, ShShaderSpec spec);
+TCompiler* ConstructCompiler(
+ ShShaderType type, ShShaderSpec spec, ShShaderOutput output);
void DeleteCompiler(TCompiler*);
-#endif // _SHHANDLE_INCLUDED_ \ No newline at end of file
+#endif // _SHHANDLE_INCLUDED_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp b/Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp
index 6cac61d..13f11b5 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2011 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.
//
@@ -12,6 +12,7 @@
#include "GLSLANG/ShaderLang.h"
#include "compiler/InitializeDll.h"
+#include "compiler/preprocessor/length_limits.h"
#include "compiler/ShHandle.h"
//
@@ -19,16 +20,21 @@
// and the shading language compiler.
//
-static int getVariableMaxLength(const TVariableInfoList& varList)
+static bool checkActiveUniformAndAttribMaxLengths(const ShHandle handle,
+ int expectedValue)
{
- TString::size_type maxLen = 0;
- for (TVariableInfoList::const_iterator i = varList.begin();
- i != varList.end(); ++i)
- {
- maxLen = std::max(maxLen, i->name.size());
- }
- // Add 1 to include null-termination character.
- return static_cast<int>(maxLen) + 1;
+ int activeUniformLimit = 0;
+ ShGetInfo(handle, SH_ACTIVE_UNIFORM_MAX_LENGTH, &activeUniformLimit);
+ int activeAttribLimit = 0;
+ ShGetInfo(handle, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, &activeAttribLimit);
+ return (expectedValue == activeUniformLimit && expectedValue == activeAttribLimit);
+}
+
+static bool checkMappedNameMaxLength(const ShHandle handle, int expectedValue)
+{
+ int mappedNameMaxLength = 0;
+ ShGetInfo(handle, SH_MAPPED_NAME_MAX_LENGTH, &mappedNameMaxLength);
+ return (expectedValue == mappedNameMaxLength);
}
static void getVariableInfo(ShShaderInfo varType,
@@ -37,7 +43,8 @@ static void getVariableInfo(ShShaderInfo varType,
int* length,
int* size,
ShDataType* type,
- char* name)
+ char* name,
+ char* mappedName)
{
if (!handle || !size || !type || !name)
return;
@@ -58,7 +65,20 @@ static void getVariableInfo(ShShaderInfo varType,
if (length) *length = varInfo.name.size();
*size = varInfo.size;
*type = varInfo.type;
- strcpy(name, varInfo.name.c_str());
+
+ // This size must match that queried by
+ // SH_ACTIVE_UNIFORM_MAX_LENGTH and SH_ACTIVE_ATTRIBUTE_MAX_LENGTH
+ // in ShGetInfo, below.
+ int activeUniformAndAttribLength = 1 + MAX_SYMBOL_NAME_LEN;
+ ASSERT(checkActiveUniformAndAttribMaxLengths(handle, activeUniformAndAttribLength));
+ strncpy(name, varInfo.name.c_str(), activeUniformAndAttribLength);
+ if (mappedName) {
+ // This size must match that queried by
+ // SH_MAPPED_NAME_MAX_LENGTH in ShGetInfo, below.
+ int maxMappedNameLength = 1 + MAX_SYMBOL_NAME_LEN;
+ ASSERT(checkMappedNameMaxLength(handle, maxMappedNameLength));
+ strncpy(mappedName, varInfo.mappedName.c_str(), maxMappedNameLength);
+ }
}
//
@@ -101,18 +121,21 @@ void ShInitBuiltInResources(ShBuiltInResources* resources)
// Extensions.
resources->OES_standard_derivatives = 0;
+ resources->OES_EGL_image_external = 0;
+ resources->ARB_texture_rectangle = 0;
}
//
// Driver calls these to create and destroy compiler objects.
//
ShHandle ShConstructCompiler(ShShaderType type, ShShaderSpec spec,
+ ShShaderOutput output,
const ShBuiltInResources* resources)
{
if (!InitThread())
return 0;
- TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(type, spec));
+ TShHandleBase* base = static_cast<TShHandleBase*>(ConstructCompiler(type, spec, output));
TCompiler* compiler = base->getAsCompiler();
if (compiler == 0)
return 0;
@@ -186,15 +209,19 @@ void ShGetInfo(const ShHandle handle, ShShaderInfo pname, int* params)
*params = compiler->getUniforms().size();
break;
case SH_ACTIVE_UNIFORM_MAX_LENGTH:
- *params = getVariableMaxLength(compiler->getUniforms());
+ *params = 1 + MAX_SYMBOL_NAME_LEN;
break;
case SH_ACTIVE_ATTRIBUTES:
*params = compiler->getAttribs().size();
break;
case SH_ACTIVE_ATTRIBUTE_MAX_LENGTH:
- *params = getVariableMaxLength(compiler->getAttribs());
+ *params = 1 + MAX_SYMBOL_NAME_LEN;
+ break;
+ case SH_MAPPED_NAME_MAX_LENGTH:
+ // Use longer length than MAX_SHORTENED_IDENTIFIER_SIZE to
+ // handle array and struct dereferences.
+ *params = 1 + MAX_SYMBOL_NAME_LEN;
break;
-
default: UNREACHABLE();
}
}
@@ -236,10 +263,11 @@ void ShGetActiveAttrib(const ShHandle handle,
int* length,
int* size,
ShDataType* type,
- char* name)
+ char* name,
+ char* mappedName)
{
getVariableInfo(SH_ACTIVE_ATTRIBUTES,
- handle, index, length, size, type, name);
+ handle, index, length, size, type, name, mappedName);
}
void ShGetActiveUniform(const ShHandle handle,
@@ -247,8 +275,9 @@ void ShGetActiveUniform(const ShHandle handle,
int* length,
int* size,
ShDataType* type,
- char* name)
+ char* name,
+ char* mappedName)
{
getVariableInfo(SH_ACTIVE_UNIFORMS,
- handle, index, length, size, type, name);
+ handle, index, length, size, type, name, mappedName);
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp b/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
index 02817d4..edbea99 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
@@ -9,10 +9,16 @@
// are documented in the header file.
//
+#if defined(_MSC_VER)
+#pragma warning(disable: 4718)
+#endif
+
#include "compiler/SymbolTable.h"
#include <stdio.h>
+#include <algorithm>
+
//
// TType helper function needs a place to live.
//
@@ -71,6 +77,20 @@ int TType::getStructSize() const
return structureSize;
}
+void TType::computeDeepestStructNesting()
+{
+ if (!getStruct()) {
+ return;
+ }
+
+ int maxNesting = 0;
+ for (TTypeList::const_iterator tl = getStruct()->begin(); tl != getStruct()->end(); ++tl) {
+ maxNesting = std::max(maxNesting, ((*tl).type)->getDeepestStructNesting());
+ }
+
+ deepestStructNesting = 1 + maxNesting;
+}
+
//
// Dump functions.
//
diff --git a/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.h b/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.h
index 38bc657..33616dc 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/SymbolTable.h
@@ -302,6 +302,12 @@ public:
assert(table.size() >= 2);
return table[1];
}
+
+ TSymbolTableLevel* getOuterLevel() {
+ assert(table.size() >= 2);
+ return table[currentLevel() - 1];
+ }
+
void relateToOperator(const char* name, TOperator op) {
table[0]->relateToOperator(name, op);
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/TranslatorESSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/TranslatorESSL.cpp
new file mode 100644
index 0000000..e3a2c2a
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/TranslatorESSL.cpp
@@ -0,0 +1,40 @@
+//
+// Copyright (c) 2002-2011 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/TranslatorESSL.h"
+
+#include "compiler/OutputESSL.h"
+
+TranslatorESSL::TranslatorESSL(ShShaderType type, ShShaderSpec spec)
+ : TCompiler(type, spec) {
+}
+
+void TranslatorESSL::translate(TIntermNode* root) {
+ TInfoSinkBase& sink = getInfoSink().obj;
+
+ // Write built-in extension behaviors.
+ writeExtensionBehavior();
+
+ // Write emulated built-in functions if needed.
+ getBuiltInFunctionEmulator().OutputEmulatedFunctionDefinition(
+ sink, getShaderType() == SH_FRAGMENT_SHADER);
+
+ // Write translated shader.
+ TOutputESSL outputESSL(sink);
+ root->traverse(&outputESSL);
+}
+
+void TranslatorESSL::writeExtensionBehavior() {
+ TInfoSinkBase& sink = getInfoSink().obj;
+ const TExtensionBehavior& extensionBehavior = getExtensionBehavior();
+ for (TExtensionBehavior::const_iterator iter = extensionBehavior.begin();
+ iter != extensionBehavior.end(); ++iter) {
+ if (iter->second != EBhUndefined) {
+ sink << "#extension " << iter->first << " : "
+ << getBehaviorString(iter->second) << "\n";
+ }
+ }
+}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/TranslatorESSL.h b/Source/ThirdParty/ANGLE/src/compiler/TranslatorESSL.h
new file mode 100644
index 0000000..a1196bd
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/TranslatorESSL.h
@@ -0,0 +1,23 @@
+//
+// Copyright (c) 2002-2011 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_TRANSLATORESSL_H_
+#define COMPILER_TRANSLATORESSL_H_
+
+#include "compiler/ShHandle.h"
+
+class TranslatorESSL : public TCompiler {
+public:
+ TranslatorESSL(ShShaderType type, ShShaderSpec spec);
+
+protected:
+ virtual void translate(TIntermNode* root);
+
+private:
+ void writeExtensionBehavior();
+};
+
+#endif // COMPILER_TRANSLATORESSL_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/TranslatorGLSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/TranslatorGLSL.cpp
index 7a63ae1..bb07a1e 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/TranslatorGLSL.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/TranslatorGLSL.cpp
@@ -31,6 +31,10 @@ void TranslatorGLSL::translate(TIntermNode* root) {
// Write GLSL version.
writeVersion(getShaderType(), root, sink);
+ // Write emulated built-in functions if needed.
+ getBuiltInFunctionEmulator().OutputEmulatedFunctionDefinition(
+ sink, false);
+
// Write translated shader.
TOutputGLSL outputGLSL(sink);
root->traverse(&outputGLSL);
diff --git a/Source/ThirdParty/ANGLE/src/compiler/Types.h b/Source/ThirdParty/ANGLE/src/compiler/Types.h
index d0fcc08..e1a18fd 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/Types.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/Types.h
@@ -85,21 +85,22 @@ public:
TType() {}
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) :
type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0),
- maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), fieldName(0), mangled(0), typeName(0)
+ maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{
}
explicit TType(const TPublicType &p) :
type(p.type), precision(p.precision), qualifier(p.qualifier), size(p.size), matrix(p.matrix), array(p.array), arraySize(p.arraySize),
- maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), fieldName(0), mangled(0), typeName(0)
+ maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{
if (p.userDef) {
structure = p.userDef->getStruct();
typeName = NewPoolTString(p.userDef->getTypeName().c_str());
+ computeDeepestStructNesting();
}
}
TType(TTypeList* userDef, const TString& n, TPrecision p = EbpUndefined) :
type(EbtStruct), precision(p), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0),
- maxArraySize(0), arrayInformationType(0), structure(userDef), structureSize(0), fieldName(0), mangled(0)
+ maxArraySize(0), arrayInformationType(0), structure(userDef), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0)
{
typeName = NewPoolTString(n.c_str());
}
@@ -144,6 +145,7 @@ public:
structureSize = copyOf.structureSize;
maxArraySize = copyOf.maxArraySize;
+ deepestStructNesting = copyOf.deepestStructNesting;
assert(copyOf.arrayInformationType == 0);
arrayInformationType = 0; // arrayInformationType should not be set for builtIn symbol table level
}
@@ -202,7 +204,7 @@ public:
bool isScalar() const { return size == 1 && !matrix && !structure; }
TTypeList* getStruct() const { return structure; }
- void setStruct(TTypeList* s) { structure = s; }
+ void setStruct(TTypeList* s) { structure = s; computeDeepestStructNesting(); }
const TString& getTypeName() const
{
@@ -268,9 +270,24 @@ public:
const char* getQualifierString() const { return ::getQualifierString(qualifier); }
TString getCompleteString() const;
+ // If this type is a struct, returns the deepest struct nesting of
+ // any field in the struct. For example:
+ // struct nesting1 {
+ // vec4 position;
+ // };
+ // struct nesting2 {
+ // nesting1 field1;
+ // vec4 field2;
+ // };
+ // For type "nesting2", this method would return 2 -- the number
+ // of structures through which indirection must occur to reach the
+ // deepest field (nesting2.field1.position).
+ int getDeepestStructNesting() const { return deepestStructNesting; }
+
protected:
void buildMangledName(TString&);
int getStructSize() const;
+ void computeDeepestStructNesting();
TBasicType type : 6;
TPrecision precision;
@@ -284,6 +301,7 @@ protected:
TTypeList* structure; // 0 unless this is a struct
mutable int structureSize;
+ int deepestStructNesting;
TString *fieldName; // for structure field names
TString *mangled;
diff --git a/Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.cpp b/Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.cpp
index a36c393..d3985e6 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.cpp
@@ -20,8 +20,9 @@ UnfoldSelect::UnfoldSelect(TParseContext &context, OutputHLSL *outputHLSL) : mCo
void UnfoldSelect::traverse(TIntermNode *node)
{
- mTemporaryIndex++;
+ int rewindIndex = mTemporaryIndex;
node->traverse(this);
+ mTemporaryIndex = rewindIndex;
}
bool UnfoldSelect::visitSelection(Visit visit, TIntermSelection *node)
@@ -30,36 +31,66 @@ bool UnfoldSelect::visitSelection(Visit visit, TIntermSelection *node)
if (node->usesTernaryOperator())
{
- int i = mTemporaryIndex++;
+ int i = mTemporaryIndex;
- out << mOutputHLSL->typeString(node->getType()) << " t" << i << ";\n";
+ out << mOutputHLSL->typeString(node->getType()) << " s" << i << ";\n";
+ mTemporaryIndex = i + 1;
node->getCondition()->traverse(this);
out << "if(";
+ mTemporaryIndex = i + 1;
node->getCondition()->traverse(mOutputHLSL);
out << ")\n"
"{\n";
+ mTemporaryIndex = i + 1;
node->getTrueBlock()->traverse(this);
- out << " t" << i << " = ";
+ out << " s" << i << " = ";
+ mTemporaryIndex = i + 1;
node->getTrueBlock()->traverse(mOutputHLSL);
out << ";\n"
"}\n"
"else\n"
"{\n";
+ mTemporaryIndex = i + 1;
node->getFalseBlock()->traverse(this);
- out << " t" << i << " = ";
+ out << " s" << i << " = ";
+ mTemporaryIndex = i + 1;
node->getFalseBlock()->traverse(mOutputHLSL);
out << ";\n"
"}\n";
- mTemporaryIndex--;
+ mTemporaryIndex = i + 1;
}
return false;
}
-int UnfoldSelect::getTemporaryIndex()
+bool UnfoldSelect::visitLoop(Visit visit, TIntermLoop *node)
{
- return mTemporaryIndex;
+ int rewindIndex = mTemporaryIndex;
+
+ if (node->getInit())
+ {
+ node->getInit()->traverse(this);
+ }
+
+ if (node->getCondition())
+ {
+ node->getCondition()->traverse(this);
+ }
+
+ if (node->getExpression())
+ {
+ node->getExpression()->traverse(this);
+ }
+
+ mTemporaryIndex = rewindIndex;
+
+ return false;
+}
+
+int UnfoldSelect::getNextTemporaryIndex()
+{
+ return mTemporaryIndex++;
}
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.h b/Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.h
index de296e4..4a3ba5f 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/UnfoldSelect.h
@@ -23,8 +23,9 @@ class UnfoldSelect : public TIntermTraverser
void traverse(TIntermNode *node);
bool visitSelection(Visit visit, TIntermSelection *node);
+ bool visitLoop(Visit visit, TIntermLoop *node);
- int getTemporaryIndex();
+ int getNextTemporaryIndex();
protected:
TParseContext &mContext;
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.cpp b/Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.cpp
index 886f693..767d0bf 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.cpp
@@ -17,6 +17,17 @@ bool IsLoopIndex(const TIntermSymbol* symbol, const TLoopStack& stack) {
return false;
}
+void MarkLoopForUnroll(const TIntermSymbol* symbol, TLoopStack& stack) {
+ for (TLoopStack::iterator i = stack.begin(); i != stack.end(); ++i) {
+ if (i->index.id == symbol->getId()) {
+ ASSERT(i->loop != NULL);
+ i->loop->setUnrollFlag(true);
+ return;
+ }
+ }
+ UNREACHABLE();
+}
+
// Traverses a node to check if it represents a constant index expression.
// Definition:
// constant-index-expressions are a superset of constant-expressions.
@@ -42,18 +53,46 @@ public:
IsLoopIndex(symbol, mLoopStack);
}
}
- virtual void visitConstantUnion(TIntermConstantUnion*) {}
- virtual bool visitBinary(Visit, TIntermBinary*) { return true; }
- virtual bool visitUnary(Visit, TIntermUnary*) { return true; }
- virtual bool visitSelection(Visit, TIntermSelection*) { return true; }
- virtual bool visitAggregate(Visit, TIntermAggregate*) { return true; }
- virtual bool visitLoop(Visit, TIntermLoop*) { return true; }
- virtual bool visitBranch(Visit, TIntermBranch*) { return true; }
private:
bool mValid;
const TLoopStack& mLoopStack;
};
+
+// Traverses a node to check if it uses a loop index.
+// If an int loop index is used in its body as a sampler array index,
+// mark the loop for unroll.
+class ValidateLoopIndexExpr : public TIntermTraverser {
+public:
+ ValidateLoopIndexExpr(TLoopStack& stack)
+ : mUsesFloatLoopIndex(false),
+ mUsesIntLoopIndex(false),
+ mLoopStack(stack) {}
+
+ bool usesFloatLoopIndex() const { return mUsesFloatLoopIndex; }
+ bool usesIntLoopIndex() const { return mUsesIntLoopIndex; }
+
+ virtual void visitSymbol(TIntermSymbol* symbol) {
+ if (IsLoopIndex(symbol, mLoopStack)) {
+ switch (symbol->getBasicType()) {
+ case EbtFloat:
+ mUsesFloatLoopIndex = true;
+ break;
+ case EbtInt:
+ mUsesIntLoopIndex = true;
+ MarkLoopForUnroll(symbol, mLoopStack);
+ break;
+ default:
+ UNREACHABLE();
+ }
+ }
+ }
+
+private:
+ bool mUsesFloatLoopIndex;
+ bool mUsesIntLoopIndex;
+ TLoopStack& mLoopStack;
+};
} // namespace
ValidateLimitations::ValidateLimitations(ShShaderType shaderType,
@@ -64,14 +103,6 @@ ValidateLimitations::ValidateLimitations(ShShaderType shaderType,
{
}
-void ValidateLimitations::visitSymbol(TIntermSymbol*)
-{
-}
-
-void ValidateLimitations::visitConstantUnion(TIntermConstantUnion*)
-{
-}
-
bool ValidateLimitations::visitBinary(Visit, TIntermBinary* node)
{
// Check if loop index is modified in the loop body.
@@ -80,7 +111,28 @@ bool ValidateLimitations::visitBinary(Visit, TIntermBinary* node)
// Check indexing.
switch (node->getOp()) {
case EOpIndexDirect:
+ validateIndexing(node);
+ break;
case EOpIndexIndirect:
+#if defined(__APPLE__)
+ // Loop unrolling is a work-around for a Mac Cg compiler bug where it
+ // crashes when a sampler array's index is also the loop index.
+ // Once Apple fixes this bug, we should remove the code in this CL.
+ // See http://codereview.appspot.com/4331048/.
+ if ((node->getLeft() != NULL) && (node->getRight() != NULL) &&
+ (node->getLeft()->getAsSymbolNode())) {
+ TIntermSymbol* symbol = node->getLeft()->getAsSymbolNode();
+ if (IsSampler(symbol->getBasicType()) && symbol->isArray()) {
+ ValidateLoopIndexExpr validate(mLoopStack);
+ node->getRight()->traverse(&validate);
+ if (validate.usesFloatLoopIndex()) {
+ error(node->getLine(),
+ "sampler array index is float loop index",
+ "for");
+ }
+ }
+ }
+#endif
validateIndexing(node);
break;
default: break;
@@ -96,11 +148,6 @@ bool ValidateLimitations::visitUnary(Visit, TIntermUnary* node)
return true;
}
-bool ValidateLimitations::visitSelection(Visit, TIntermSelection*)
-{
- return true;
-}
-
bool ValidateLimitations::visitAggregate(Visit, TIntermAggregate* node)
{
switch (node->getOp()) {
@@ -120,6 +167,7 @@ bool ValidateLimitations::visitLoop(Visit, TIntermLoop* node)
TLoopInfo info;
memset(&info, 0, sizeof(TLoopInfo));
+ info.loop = node;
if (!validateForLoopHeader(node, &info))
return false;
@@ -134,11 +182,6 @@ bool ValidateLimitations::visitLoop(Visit, TIntermLoop* node)
return false;
}
-bool ValidateLimitations::visitBranch(Visit, TIntermBranch*)
-{
- return true;
-}
-
void ValidateLimitations::error(TSourceLoc loc,
const char *reason, const char* token)
{
diff --git a/Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.h b/Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.h
index a4f5a28..a835cb3 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/ValidateLimitations.h
@@ -13,6 +13,7 @@ struct TLoopInfo {
struct TIndex {
int id; // symbol id.
} index;
+ TIntermLoop* loop;
};
typedef TVector<TLoopInfo> TLoopStack;
@@ -24,14 +25,10 @@ public:
int numErrors() const { return mNumErrors; }
- virtual void visitSymbol(TIntermSymbol*);
- virtual void visitConstantUnion(TIntermConstantUnion*);
virtual bool visitBinary(Visit, TIntermBinary*);
virtual bool visitUnary(Visit, TIntermUnary*);
- virtual bool visitSelection(Visit, TIntermSelection*);
virtual bool visitAggregate(Visit, TIntermAggregate*);
virtual bool visitLoop(Visit, TIntermLoop*);
- virtual bool visitBranch(Visit, TIntermBranch*);
private:
void error(TSourceLoc loc, const char *reason, const char* token);
diff --git a/Source/ThirdParty/ANGLE/src/compiler/VariableInfo.cpp b/Source/ThirdParty/ANGLE/src/compiler/VariableInfo.cpp
index ad2e08f..1e9486f 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/VariableInfo.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/VariableInfo.cpp
@@ -63,6 +63,8 @@ static ShDataType getVariableDataType(const TType& type)
}
case EbtSampler2D: return SH_SAMPLER_2D;
case EbtSamplerCube: return SH_SAMPLER_CUBE;
+ case EbtSamplerExternalOES: return SH_SAMPLER_EXTERNAL_OES;
+ case EbtSampler2DRect: return SH_SAMPLER_2D_RECT_ARB;
default: UNREACHABLE();
}
return SH_NONE;
@@ -70,32 +72,37 @@ static ShDataType getVariableDataType(const TType& type)
static void getBuiltInVariableInfo(const TType& type,
const TString& name,
+ const TString& mappedName,
TVariableInfoList& infoList);
static void getUserDefinedVariableInfo(const TType& type,
const TString& name,
+ const TString& mappedName,
TVariableInfoList& infoList);
// Returns info for an attribute or uniform.
static void getVariableInfo(const TType& type,
const TString& name,
+ const TString& mappedName,
TVariableInfoList& infoList)
{
if (type.getBasicType() == EbtStruct) {
if (type.isArray()) {
for (int i = 0; i < type.getArraySize(); ++i) {
TString lname = name + arrayBrackets(i);
- getUserDefinedVariableInfo(type, lname, infoList);
+ TString lmappedName = mappedName + arrayBrackets(i);
+ getUserDefinedVariableInfo(type, lname, lmappedName, infoList);
}
} else {
- getUserDefinedVariableInfo(type, name, infoList);
+ getUserDefinedVariableInfo(type, name, mappedName, infoList);
}
} else {
- getBuiltInVariableInfo(type, name, infoList);
+ getBuiltInVariableInfo(type, name, mappedName, infoList);
}
}
void getBuiltInVariableInfo(const TType& type,
const TString& name,
+ const TString& mappedName,
TVariableInfoList& infoList)
{
ASSERT(type.getBasicType() != EbtStruct);
@@ -103,9 +110,11 @@ void getBuiltInVariableInfo(const TType& type,
TVariableInfo varInfo;
if (type.isArray()) {
varInfo.name = (name + "[0]").c_str();
+ varInfo.mappedName = (mappedName + "[0]").c_str();
varInfo.size = type.getArraySize();
} else {
varInfo.name = name.c_str();
+ varInfo.mappedName = mappedName.c_str();
varInfo.size = 1;
}
varInfo.type = getVariableDataType(type);
@@ -114,16 +123,17 @@ void getBuiltInVariableInfo(const TType& type,
void getUserDefinedVariableInfo(const TType& type,
const TString& name,
+ const TString& mappedName,
TVariableInfoList& infoList)
{
ASSERT(type.getBasicType() == EbtStruct);
- TString lname = name + ".";
const TTypeList* structure = type.getStruct();
for (size_t i = 0; i < structure->size(); ++i) {
const TType* fieldType = (*structure)[i].type;
getVariableInfo(*fieldType,
- lname + fieldType->getFieldName(),
+ name + "." + fieldType->getFieldName(),
+ mappedName + "." + fieldType->getFieldName(),
infoList);
}
}
@@ -186,7 +196,9 @@ bool CollectAttribsUniforms::visitAggregate(Visit, TIntermAggregate* node)
// cannot be initialized in a shader, we must have only
// TIntermSymbol nodes in the sequence.
ASSERT(variable != NULL);
- getVariableInfo(variable->getType(), variable->getSymbol(),
+ getVariableInfo(variable->getType(),
+ variable->getOriginalSymbol(),
+ variable->getSymbol(),
infoList);
}
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/VariableInfo.h b/Source/ThirdParty/ANGLE/src/compiler/VariableInfo.h
index 15a5c57..45ac9ea 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/VariableInfo.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/VariableInfo.h
@@ -1,9 +1,12 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2011 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_VARIABLE_INFO_H_
+#define COMPILER_VARIABLE_INFO_H_
+
#include "GLSLANG/ShaderLang.h"
#include "compiler/intermediate.h"
@@ -11,6 +14,7 @@
// It is currently being used to store info about active attribs and uniforms.
struct TVariableInfo {
TPersistString name;
+ TPersistString mappedName;
ShDataType type;
int size;
};
@@ -22,6 +26,8 @@ public:
CollectAttribsUniforms(TVariableInfoList& attribs,
TVariableInfoList& uniforms);
+ virtual ~CollectAttribsUniforms() {}
+
virtual void visitSymbol(TIntermSymbol*);
virtual void visitConstantUnion(TIntermConstantUnion*);
virtual bool visitBinary(Visit, TIntermBinary*);
@@ -36,3 +42,4 @@ private:
TVariableInfoList& mUniforms;
};
+#endif // COMPILER_VARIABLE_INFO_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.cpp b/Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.cpp
index 3f87820..26cee05 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.cpp
@@ -9,13 +9,17 @@
static const int GLSL_VERSION_110 = 110;
static const int GLSL_VERSION_120 = 120;
-// We need to scan for two things:
+// We need to scan for three things:
// 1. "invariant" keyword: This can occur in both - vertex and fragment shaders
// but only at the global scope.
// 2. "gl_PointCoord" built-in variable: This can only occur in fragment shader
// but inside any scope.
-// So we need to scan the entire fragment shader but only the global scope
-// of vertex shader.
+// 3. Call to a matrix constructor with another matrix as argument.
+// (These constructors were reserved in GLSL version 1.10.)
+//
+// If it weren't for (3) then we would only need to scan the global
+// scope of the vertex shader. However, we need to scan the entire
+// shader in both cases.
//
// TODO(alokp): The following two cases of invariant decalaration get lost
// during parsing - they do not get carried over to the intermediate tree.
@@ -34,40 +38,32 @@ TVersionGLSL::TVersionGLSL(ShShaderType type)
void TVersionGLSL::visitSymbol(TIntermSymbol* node)
{
- ASSERT(mShaderType == SH_FRAGMENT_SHADER);
-
if (node->getSymbol() == "gl_PointCoord")
updateVersion(GLSL_VERSION_120);
}
void TVersionGLSL::visitConstantUnion(TIntermConstantUnion*)
{
- ASSERT(mShaderType == SH_FRAGMENT_SHADER);
}
bool TVersionGLSL::visitBinary(Visit, TIntermBinary*)
{
- ASSERT(mShaderType == SH_FRAGMENT_SHADER);
return true;
}
bool TVersionGLSL::visitUnary(Visit, TIntermUnary*)
{
- ASSERT(mShaderType == SH_FRAGMENT_SHADER);
return true;
}
bool TVersionGLSL::visitSelection(Visit, TIntermSelection*)
{
- ASSERT(mShaderType == SH_FRAGMENT_SHADER);
return true;
}
bool TVersionGLSL::visitAggregate(Visit, TIntermAggregate* node)
{
- // We need to scan the entire fragment shader but only the global scope
- // of vertex shader.
- bool visitChildren = mShaderType == SH_FRAGMENT_SHADER ? true : false;
+ bool visitChildren = true;
switch (node->getOp()) {
case EOpSequence:
@@ -83,6 +79,19 @@ bool TVersionGLSL::visitAggregate(Visit, TIntermAggregate* node)
}
break;
}
+ case EOpConstructMat2:
+ case EOpConstructMat3:
+ case EOpConstructMat4: {
+ const TIntermSequence& sequence = node->getSequence();
+ if (sequence.size() == 1) {
+ TIntermTyped* typed = sequence.front()->getAsTyped();
+ if (typed && typed->isMatrix()) {
+ updateVersion(GLSL_VERSION_120);
+ }
+ }
+ break;
+ }
+
default: break;
}
@@ -91,13 +100,11 @@ bool TVersionGLSL::visitAggregate(Visit, TIntermAggregate* node)
bool TVersionGLSL::visitLoop(Visit, TIntermLoop*)
{
- ASSERT(mShaderType == SH_FRAGMENT_SHADER);
return true;
}
bool TVersionGLSL::visitBranch(Visit, TIntermBranch*)
{
- ASSERT(mShaderType == SH_FRAGMENT_SHADER);
return true;
}
diff --git a/Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.h b/Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.h
index 64d002b..376fcb8 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.h
+++ b/Source/ThirdParty/ANGLE/src/compiler/VersionGLSL.h
@@ -21,13 +21,15 @@
// - invariant keyword and its support.
// - c++ style name hiding rules.
// - built-in variable gl_PointCoord for fragment shaders.
+// - matrix constructors taking matrix as argument.
//
class TVersionGLSL : public TIntermTraverser {
public:
TVersionGLSL(ShShaderType type);
- // Returns 120 if "invariant" keyword or "gl_PointCoord" is used
- // in the shader. Else 110 is returned.
+ // Returns 120 if "invariant" keyword, "gl_PointCoord", or
+ // matrix/matrix constructors are used in the shader. Else 110 is
+ // returned.
int getVersion() { return mVersion; }
virtual void visitSymbol(TIntermSymbol*);
diff --git a/Source/ThirdParty/ANGLE/src/compiler/generate_parser.sh b/Source/ThirdParty/ANGLE/src/compiler/generate_parser.sh
new file mode 100755
index 0000000..e472191
--- /dev/null
+++ b/Source/ThirdParty/ANGLE/src/compiler/generate_parser.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# Copyright (c) 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.
+
+# Generates GLSL ES parser - glslang_lex.cpp, glslang_tab.h, and glslang_tab.cpp
+
+run_flex()
+{
+input_file=$script_dir/$1.l
+output_source=$script_dir/$1_lex.cpp
+flex --noline --nounistd --outfile=$output_source $input_file
+}
+
+run_bison()
+{
+input_file=$script_dir/$1.y
+output_header=$script_dir/$1_tab.h
+output_source=$script_dir/$1_tab.cpp
+bison --no-lines --skeleton=yacc.c --defines=$output_header --output=$output_source $input_file
+}
+
+script_dir=$(dirname $0)
+
+# Generate Parser
+run_flex glslang
+run_bison glslang
diff --git a/Source/ThirdParty/ANGLE/src/compiler/glslang.l b/Source/ThirdParty/ANGLE/src/compiler/glslang.l
index 5a7c5d5..9a0394b 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/glslang.l
+++ b/Source/ThirdParty/ANGLE/src/compiler/glslang.l
@@ -9,7 +9,7 @@ This file contains the Lex specification for GLSL ES.
Based on ANSI C grammar, Lex specification:
http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
-IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_glslang_lexer.sh,
+IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh,
WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
*/
@@ -20,7 +20,19 @@ WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
// found in the LICENSE file.
//
-// This file is auto-generated by generate_glslang_lexer.sh. DO NOT EDIT!
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
+
+// Ignore errors in auto-generated code.
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#elif defined(_MSC_VER)
+#pragma warning(disable: 4065)
+#pragma warning(disable: 4189)
+#pragma warning(disable: 4505)
+#pragma warning(disable: 4701)
+#endif
}
%{
@@ -120,6 +132,8 @@ O [0-7]
"sampler2D" { context->lexAfterType = true; return SAMPLER2D; }
"samplerCube" { context->lexAfterType = true; return SAMPLERCUBE; }
+"samplerExternalOES" { context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; }
+"sampler2DRect" { context->lexAfterType = true; return SAMPLER2DRECT; }
"struct" { context->lexAfterType = true; return(STRUCT); }
@@ -480,6 +494,8 @@ void updateExtensionBehavior(const char* extName, const char* behavior)
msg = TString("extension '") + extName + "' is not supported";
context->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno);
break;
+ default:
+ break;
}
return;
} else
diff --git a/Source/ThirdParty/ANGLE/src/compiler/glslang.y b/Source/ThirdParty/ANGLE/src/compiler/glslang.y
index 5eae4b5..d6c8869 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/glslang.y
+++ b/Source/ThirdParty/ANGLE/src/compiler/glslang.y
@@ -9,7 +9,7 @@ This file contains the Yacc grammar for GLSL ES.
Based on ANSI C Yacc grammar:
http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
-IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_glslang_parser.sh,
+IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh,
WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
*/
@@ -20,7 +20,19 @@ WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
// found in the LICENSE file.
//
-// This file is auto-generated by generate_glslang_parser.sh. DO NOT EDIT!
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
+
+// Ignore errors in auto-generated code.
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#elif defined(_MSC_VER)
+#pragma warning(disable: 4065)
+#pragma warning(disable: 4189)
+#pragma warning(disable: 4505)
+#pragma warning(disable: 4701)
+#endif
#include "compiler/SymbolTable.h"
#include "compiler/ParseHelper.h"
@@ -98,7 +110,7 @@ extern void yyerror(TParseContext* context, const char* reason);
%token <lex> BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 VEC2 VEC3 VEC4
%token <lex> MATRIX2 MATRIX3 MATRIX4 IN_QUAL OUT_QUAL INOUT_QUAL UNIFORM VARYING
%token <lex> STRUCT VOID_TYPE WHILE
-%token <lex> SAMPLER2D SAMPLERCUBE
+%token <lex> SAMPLER2D SAMPLERCUBE SAMPLER_EXTERNAL_OES SAMPLER2DRECT
%token <lex> IDENTIFIER TYPE_NAME FLOATCONSTANT INTCONSTANT BOOLCONSTANT
%token <lex> FIELD_SELECTION
@@ -129,7 +141,7 @@ extern void yyerror(TParseContext* context, const char* reason);
%type <interm.intermNode> declaration external_declaration
%type <interm.intermNode> for_init_statement compound_statement_no_new_scope
%type <interm.nodePair> selection_rest_statement for_rest_statement
-%type <interm.intermNode> iteration_statement jump_statement statement_no_new_scope
+%type <interm.intermNode> iteration_statement jump_statement statement_no_new_scope statement_with_scope
%type <interm> single_declaration init_declarator_list
%type <interm> parameter_declaration parameter_declarator parameter_type_specifier
@@ -591,17 +603,10 @@ function_call_header
// Grammar Note: Constructors look like functions, but are recognized as types.
function_identifier
- : type_specifier {
+ : type_specifier_nonarray {
//
// Constructor
//
- if ($1.array) {
- // Constructors for arrays are not allowed.
- context->error($1.line, "cannot construct this type", "array", "");
- context->recover();
- $1.setArray(false);
- }
-
TOperator op = EOpNull;
if ($1.userDef) {
op = EOpConstructStruct;
@@ -975,6 +980,8 @@ declaration
prototype->setOp(EOpPrototype);
$$ = prototype;
+
+ context->symbolTable.pop();
}
| init_declarator_list SEMICOLON {
if ($1.intermAggregate)
@@ -1019,7 +1026,9 @@ function_prototype
$$.function = $1;
$$.line = $2.line;
- context->symbolTable.insert(*$$.function);
+ // We're at the inner scope level of the function's arguments and body statement.
+ // Add the function prototype to the surrounding scope instead.
+ context->symbolTable.getOuterLevel()->insert(*$$.function);
}
;
@@ -1077,6 +1086,8 @@ function_header
TType type($1);
function = new TFunction($2.string, type);
$$ = function;
+
+ context->symbolTable.push();
}
;
@@ -1176,16 +1187,16 @@ parameter_type_specifier
init_declarator_list
: single_declaration {
$$ = $1;
-
- if ($$.type.precision == EbpUndefined) {
- $$.type.precision = context->symbolTable.getDefaultPrecision($1.type.type);
- if (context->precisionErrorCheck($1.line, $$.type.precision, $1.type.type)) {
- context->recover();
- }
- }
}
| init_declarator_list COMMA IDENTIFIER {
- $$.intermAggregate = context->intermediate.growAggregate($1.intermNode, context->intermediate.addSymbol(0, *$3.string, TType($1.type), $3.line), $3.line);
+ if ($1.type.type == EbtInvariant && !$3.symbol)
+ {
+ context->error($3.line, "undeclared identifier declared as invariant", $3.string->c_str(), "");
+ context->recover();
+ }
+
+ TIntermSymbol* symbol = context->intermediate.addSymbol(0, *$3.string, TType($1.type), $3.line);
+ $$.intermAggregate = context->intermediate.growAggregate($1.intermNode, symbol, $3.line);
if (context->structQualifierErrorCheck($3.line, $$.type))
context->recover();
@@ -1193,8 +1204,11 @@ init_declarator_list
if (context->nonInitConstErrorCheck($3.line, *$3.string, $$.type))
context->recover();
- if (context->nonInitErrorCheck($3.line, *$3.string, $$.type))
+ TVariable* variable = 0;
+ if (context->nonInitErrorCheck($3.line, *$3.string, $$.type, variable))
context->recover();
+ if (symbol && variable)
+ symbol->setId(variable->getUniqueId());
}
| init_declarator_list COMMA IDENTIFIER LEFT_BRACKET RIGHT_BRACKET {
if (context->structQualifierErrorCheck($3.line, $1.type))
@@ -1230,12 +1244,12 @@ init_declarator_list
if (context->arraySizeErrorCheck($4.line, $5, size))
context->recover();
$1.type.setArray(true, size);
- TVariable* variable;
+ TVariable* variable = 0;
if (context->arrayErrorCheck($4.line, *$3.string, $1.type, variable))
context->recover();
TType type = TType($1.type);
type.setArraySize(size);
- $$.intermAggregate = context->intermediate.growAggregate($1.intermNode, context->intermediate.addSymbol(0, *$3.string, type, $3.line), $3.line);
+ $$.intermAggregate = context->intermediate.growAggregate($1.intermNode, context->intermediate.addSymbol(variable ? variable->getUniqueId() : 0, *$3.string, type, $3.line), $3.line);
}
}
| init_declarator_list COMMA IDENTIFIER EQUAL initializer {
@@ -1266,7 +1280,8 @@ single_declaration
$$.intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0, "", TType($1), $1.line), $1.line);
}
| fully_specified_type IDENTIFIER {
- $$.intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0, *$2.string, TType($1), $2.line), $2.line);
+ TIntermSymbol* symbol = context->intermediate.addSymbol(0, *$2.string, TType($1), $2.line);
+ $$.intermAggregate = context->intermediate.makeAggregate(symbol, $2.line);
if (context->structQualifierErrorCheck($2.line, $$.type))
context->recover();
@@ -1276,28 +1291,19 @@ single_declaration
$$.type = $1;
- if (context->nonInitErrorCheck($2.line, *$2.string, $$.type))
+ TVariable* variable = 0;
+ if (context->nonInitErrorCheck($2.line, *$2.string, $$.type, variable))
context->recover();
+ if (variable && symbol)
+ symbol->setId(variable->getUniqueId());
}
| fully_specified_type IDENTIFIER LEFT_BRACKET RIGHT_BRACKET {
- $$.intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0, *$2.string, TType($1), $2.line), $2.line);
-
- if (context->structQualifierErrorCheck($2.line, $1))
- context->recover();
-
- if (context->nonInitConstErrorCheck($2.line, *$2.string, $1))
- context->recover();
+ context->error($2.line, "unsized array declarations not supported", $2.string->c_str(), "");
+ context->recover();
+ TIntermSymbol* symbol = context->intermediate.addSymbol(0, *$2.string, TType($1), $2.line);
+ $$.intermAggregate = context->intermediate.makeAggregate(symbol, $2.line);
$$.type = $1;
-
- if (context->arrayTypeErrorCheck($3.line, $1) || context->arrayQualifierErrorCheck($3.line, $1))
- context->recover();
- else {
- $1.setArray(true);
- TVariable* variable;
- if (context->arrayErrorCheck($3.line, *$2.string, $1, variable))
- context->recover();
- }
}
| fully_specified_type IDENTIFIER LEFT_BRACKET constant_expression RIGHT_BRACKET {
TType type = TType($1);
@@ -1305,7 +1311,8 @@ single_declaration
if (context->arraySizeErrorCheck($2.line, $4, size))
context->recover();
type.setArraySize(size);
- $$.intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0, *$2.string, type, $2.line), $2.line);
+ TIntermSymbol* symbol = context->intermediate.addSymbol(0, *$2.string, type, $2.line);
+ $$.intermAggregate = context->intermediate.makeAggregate(symbol, $2.line);
if (context->structQualifierErrorCheck($2.line, $1))
context->recover();
@@ -1323,9 +1330,11 @@ single_declaration
context->recover();
$1.setArray(true, size);
- TVariable* variable;
+ TVariable* variable = 0;
if (context->arrayErrorCheck($3.line, *$2.string, $1, variable))
context->recover();
+ if (variable && symbol)
+ symbol->setId(variable->getUniqueId());
}
}
| fully_specified_type IDENTIFIER EQUAL initializer {
@@ -1350,8 +1359,21 @@ single_declaration
}
| INVARIANT IDENTIFIER {
VERTEX_ONLY("invariant declaration", $1.line);
- $$.qualifier = EvqInvariantVaryingOut;
- $$.intermAggregate = 0;
+ if (context->globalErrorCheck($1.line, context->symbolTable.atGlobalLevel(), "invariant varying"))
+ context->recover();
+ $$.type.setBasic(EbtInvariant, EvqInvariantVaryingOut, $2.line);
+ if (!$2.symbol)
+ {
+ context->error($2.line, "undeclared identifier declared as invariant", $2.string->c_str(), "");
+ context->recover();
+
+ $$.intermAggregate = 0;
+ }
+ else
+ {
+ TIntermSymbol *symbol = context->intermediate.addSymbol(0, *$2.string, TType($$.type), $2.line);
+ $$.intermAggregate = context->intermediate.makeAggregate(symbol, $2.line);
+ }
}
//
@@ -1491,6 +1513,13 @@ type_qualifier
type_specifier
: type_specifier_no_prec {
$$ = $1;
+
+ if ($$.precision == EbpUndefined) {
+ $$.precision = context->symbolTable.getDefaultPrecision($1.type);
+ if (context->precisionErrorCheck($1.line, $$.precision, $1.type)) {
+ context->recover();
+ }
+ }
}
| precision_qualifier type_specifier_no_prec {
$$ = $2;
@@ -1623,6 +1652,24 @@ type_specifier_nonarray
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtSamplerCube, qual, $1.line);
}
+ | SAMPLER_EXTERNAL_OES {
+ if (!context->supportsExtension("GL_OES_EGL_image_external")) {
+ context->error($1.line, "unsupported type", "samplerExternalOES", "");
+ context->recover();
+ }
+ FRAG_VERT_ONLY("samplerExternalOES", $1.line);
+ TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+ $$.setBasic(EbtSamplerExternalOES, qual, $1.line);
+ }
+ | SAMPLER2DRECT {
+ if (!context->supportsExtension("GL_ARB_texture_rectangle")) {
+ context->error($1.line, "unsupported type", "sampler2DRect", "");
+ context->recover();
+ }
+ FRAG_VERT_ONLY("sampler2DRect", $1.line);
+ TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+ $$.setBasic(EbtSampler2DRect, qual, $1.line);
+ }
| struct_specifier {
FRAG_VERT_ONLY("struct", $1.line);
$$ = $1;
@@ -1641,11 +1688,11 @@ type_specifier_nonarray
;
struct_specifier
- : STRUCT IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE {
+ : STRUCT IDENTIFIER LEFT_BRACE { if (context->enterStructDeclaration($2.line, *$2.string)) context->recover(); } struct_declaration_list RIGHT_BRACE {
if (context->reservedErrorCheck($2.line, *$2.string))
context->recover();
- TType* structure = new TType($4, *$2.string);
+ TType* structure = new TType($5, *$2.string);
TVariable* userTypeDef = new TVariable($2.string, *structure, true);
if (! context->symbolTable.insert(*userTypeDef)) {
context->error($2.line, "redefinition", $2.string->c_str(), "struct");
@@ -1653,11 +1700,13 @@ struct_specifier
}
$$.setBasic(EbtStruct, EvqTemporary, $1.line);
$$.userDef = structure;
+ context->exitStructDeclaration();
}
- | STRUCT LEFT_BRACE struct_declaration_list RIGHT_BRACE {
- TType* structure = new TType($3, TString(""));
+ | STRUCT LEFT_BRACE { if (context->enterStructDeclaration($2.line, *$2.string)) context->recover(); } struct_declaration_list RIGHT_BRACE {
+ TType* structure = new TType($4, TString(""));
$$.setBasic(EbtStruct, EvqTemporary, $1.line);
$$.userDef = structure;
+ context->exitStructDeclaration();
}
;
@@ -1694,6 +1743,7 @@ struct_declaration
type->setBasicType($1.type);
type->setNominalSize($1.size);
type->setMatrix($1.matrix);
+ type->setPrecision($1.precision);
// don't allow arrays of arrays
if (type->isArray()) {
@@ -1706,6 +1756,10 @@ struct_declaration
type->setStruct($1.userDef->getStruct());
type->setTypeName($1.userDef->getTypeName());
}
+
+ if (context->structNestingErrorCheck($1.line, *type)) {
+ context->recover();
+ }
}
}
;
@@ -1770,8 +1824,10 @@ simple_statement
compound_statement
: LEFT_BRACE RIGHT_BRACE { $$ = 0; }
| LEFT_BRACE { context->symbolTable.push(); } statement_list { context->symbolTable.pop(); } RIGHT_BRACE {
- if ($3 != 0)
+ if ($3 != 0) {
$3->setOp(EOpSequence);
+ $3->setEndLine($5.line);
+ }
$$ = $3;
}
;
@@ -1781,14 +1837,21 @@ statement_no_new_scope
| simple_statement { $$ = $1; }
;
+statement_with_scope
+ : { context->symbolTable.push(); } compound_statement_no_new_scope { context->symbolTable.pop(); $$ = $2; }
+ | { context->symbolTable.push(); } simple_statement { context->symbolTable.pop(); $$ = $2; }
+ ;
+
compound_statement_no_new_scope
// Statement that doesn't create a new scope, for selection_statement, iteration_statement
: LEFT_BRACE RIGHT_BRACE {
$$ = 0;
}
| LEFT_BRACE statement_list RIGHT_BRACE {
- if ($2)
+ if ($2) {
$2->setOp(EOpSequence);
+ $2->setEndLine($3.line);
+ }
$$ = $2;
}
;
@@ -1816,11 +1879,11 @@ selection_statement
;
selection_rest_statement
- : statement ELSE statement {
+ : statement_with_scope ELSE statement_with_scope {
$$.node1 = $1;
$$.node2 = $3;
}
- | statement {
+ | statement_with_scope {
$$.node1 = $1;
$$.node2 = 0;
}
@@ -1857,7 +1920,7 @@ iteration_statement
$$ = context->intermediate.addLoop(ELoopWhile, 0, $4, 0, $6, $1.line);
--context->loopNestingLevel;
}
- | DO { ++context->loopNestingLevel; } statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON {
+ | DO { ++context->loopNestingLevel; } statement_with_scope WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON {
if (context->boolErrorCheck($8.line, $6))
context->recover();
@@ -1994,11 +2057,6 @@ function_definition
}
//
- // New symbol table scope for body of function plus its arguments
- //
- context->symbolTable.push();
-
- //
// Remember the return type for later checking for RETURN statements.
//
context->currentFunctionType = &(prevDec->getReturnType());
@@ -2050,7 +2108,7 @@ function_definition
context->error($1.line, "function does not return a value:", "", $1.function->getName().c_str());
context->recover();
}
- context->symbolTable.pop();
+
$$ = context->intermediate.growAggregate($1.intermAggregate, $3, 0);
context->intermediate.setAggregateOperator($$, EOpFunction, $1.line);
$$->getAsAggregate()->setName($1.function->getMangledName().c_str());
@@ -2061,6 +2119,11 @@ function_definition
$$->getAsAggregate()->setOptimize(context->contextPragma.optimize);
$$->getAsAggregate()->setDebug(context->contextPragma.debug);
$$->getAsAggregate()->addToPragmaTable(context->contextPragma.pragmaTable);
+
+ if ($3 && $3->getAsAggregate())
+ $$->getAsAggregate()->setEndLine($3->getAsAggregate()->getEndLine());
+
+ context->symbolTable.pop();
}
;
diff --git a/Source/ThirdParty/ANGLE/src/compiler/glslang_lex.cpp b/Source/ThirdParty/ANGLE/src/compiler/glslang_lex.cpp
index 9d5f53f..59b7299 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/glslang_lex.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/glslang_lex.cpp
@@ -1,15 +1,27 @@
-#line 17 "compiler/glslang.l"
+#line 17 "./glslang.l"
//
// Copyright (c) 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.
//
-// This file is auto-generated by generate_glslang_lexer.sh. DO NOT EDIT!
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
+
+// Ignore errors in auto-generated code.
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#elif defined(_MSC_VER)
+#pragma warning(disable: 4065)
+#pragma warning(disable: 4189)
+#pragma warning(disable: 4505)
+#pragma warning(disable: 4701)
+#endif
-#line 13 "compiler/glslang_lex.cpp"
+#line 25 "./glslang_lex.cpp"
#define YY_INT_ALIGNED short int
@@ -371,8 +383,8 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 145
-#define YY_END_OF_BUFFER 146
+#define YY_NUM_RULES 147
+#define YY_END_OF_BUFFER 148
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
@@ -380,53 +392,55 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[411] =
+static yyconst flex_int16_t yy_accept[426] =
{ 0,
- 0, 0, 0, 0, 0, 0, 146, 144, 143, 143,
- 128, 134, 139, 123, 124, 132, 131, 120, 129, 127,
- 133, 92, 92, 121, 117, 135, 122, 136, 140, 88,
- 125, 126, 138, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 118, 137, 119, 130, 3, 4, 3,
- 142, 145, 141, 114, 100, 119, 108, 103, 98, 106,
- 96, 107, 97, 95, 2, 1, 99, 94, 90, 91,
- 0, 0, 92, 126, 118, 125, 115, 111, 113, 112,
- 116, 88, 104, 110, 88, 88, 88, 88, 88, 88,
-
- 88, 88, 88, 88, 17, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 20, 22,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 105, 109, 5, 141,
- 0, 1, 94, 0, 0, 93, 89, 101, 102, 48,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 18, 88, 88,
- 88, 88, 88, 88, 88, 88, 26, 88, 88, 88,
- 88, 88, 88, 88, 88, 23, 88, 88, 88, 88,
-
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 0, 95,
- 0, 94, 88, 28, 88, 88, 85, 88, 88, 88,
- 88, 88, 88, 88, 21, 51, 88, 88, 88, 88,
- 88, 56, 70, 88, 88, 88, 88, 88, 88, 88,
- 88, 67, 9, 33, 34, 35, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 54, 29, 88, 88, 88, 88, 88, 88, 36,
- 37, 38, 27, 88, 88, 88, 15, 42, 43, 44,
- 49, 12, 88, 88, 88, 88, 81, 82, 83, 88,
-
- 30, 71, 25, 78, 79, 80, 7, 75, 76, 77,
- 88, 24, 73, 88, 88, 39, 40, 41, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 68, 88, 88,
- 88, 88, 88, 88, 88, 50, 88, 87, 88, 88,
- 19, 88, 88, 88, 88, 69, 64, 59, 88, 88,
- 88, 88, 88, 74, 55, 88, 62, 32, 88, 84,
- 63, 47, 57, 88, 88, 88, 88, 88, 88, 88,
- 88, 58, 31, 88, 88, 88, 8, 88, 88, 88,
- 88, 88, 52, 13, 88, 14, 88, 88, 16, 65,
- 88, 88, 88, 60, 88, 88, 88, 53, 72, 61,
-
- 11, 66, 6, 86, 10, 45, 88, 88, 46, 0
+ 0, 0, 0, 0, 0, 0, 148, 146, 145, 145,
+ 130, 136, 141, 125, 126, 134, 133, 122, 131, 129,
+ 135, 94, 94, 123, 119, 137, 124, 138, 142, 90,
+ 127, 128, 140, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 120, 139, 121, 132, 3, 4, 3,
+ 144, 147, 143, 116, 102, 121, 110, 105, 100, 108,
+ 98, 109, 99, 97, 2, 1, 101, 96, 92, 93,
+ 0, 0, 94, 128, 120, 127, 117, 113, 115, 114,
+ 118, 90, 106, 112, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 17, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 20, 22,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 107, 111, 5, 143,
+ 0, 1, 96, 0, 0, 95, 91, 103, 104, 50,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 18, 90, 90,
+ 90, 90, 90, 90, 90, 90, 26, 90, 90, 90,
+ 90, 90, 90, 90, 90, 23, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 0, 97,
+ 0, 96, 90, 28, 90, 90, 87, 90, 90, 90,
+ 90, 90, 90, 90, 21, 53, 90, 90, 90, 90,
+ 90, 58, 72, 90, 90, 90, 90, 90, 90, 90,
+ 90, 69, 9, 33, 34, 35, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 56, 29, 90, 90, 90, 90, 90, 90, 36,
+ 37, 38, 27, 90, 90, 90, 15, 42, 43, 44,
+ 51, 12, 90, 90, 90, 90, 83, 84, 85, 90,
+
+ 30, 73, 25, 80, 81, 82, 7, 77, 78, 79,
+ 90, 24, 75, 90, 90, 39, 40, 41, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 70, 90, 90,
+ 90, 90, 90, 90, 90, 52, 90, 89, 90, 90,
+ 19, 90, 90, 90, 90, 71, 66, 61, 90, 90,
+ 90, 90, 90, 76, 57, 90, 64, 32, 90, 86,
+ 65, 49, 59, 90, 90, 90, 90, 90, 90, 90,
+ 90, 60, 31, 90, 90, 90, 8, 90, 90, 90,
+ 90, 90, 54, 13, 90, 14, 90, 90, 16, 67,
+ 90, 90, 90, 62, 90, 90, 90, 90, 55, 74,
+
+ 63, 11, 68, 6, 88, 10, 45, 90, 90, 90,
+ 90, 90, 90, 46, 90, 90, 90, 48, 90, 90,
+ 90, 90, 90, 47, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@@ -438,13 +452,13 @@ static yyconst flex_int32_t yy_ec[256] =
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 16, 16, 16, 20, 20, 21, 22, 23,
24, 25, 26, 1, 27, 27, 28, 29, 30, 27,
- 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
- 31, 31, 31, 31, 31, 31, 31, 32, 31, 31,
- 33, 1, 34, 35, 31, 1, 36, 37, 38, 39,
+ 31, 31, 31, 31, 31, 31, 31, 31, 32, 31,
+ 31, 33, 34, 31, 31, 31, 31, 35, 31, 31,
+ 36, 1, 37, 38, 31, 1, 39, 40, 41, 42,
- 40, 41, 42, 43, 44, 31, 45, 46, 47, 48,
- 49, 50, 31, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 1, 1, 1, 1,
+ 43, 44, 45, 46, 47, 31, 48, 49, 50, 51,
+ 52, 53, 31, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -461,195 +475,201 @@ static yyconst flex_int32_t yy_ec[256] =
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[64] =
+static yyconst flex_int32_t yy_meta[67] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
- 4, 4, 1, 1, 1, 3, 3, 3, 3, 3,
- 3, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 1, 1
+ 4, 4, 4, 4, 4, 1, 1, 1, 3, 3,
+ 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 1, 1, 1, 1
} ;
-static yyconst flex_int16_t yy_base[416] =
+static yyconst flex_int16_t yy_base[431] =
{ 0,
- 0, 0, 61, 62, 71, 0, 606, 607, 607, 607,
- 581, 42, 129, 607, 607, 580, 126, 607, 125, 123,
- 137, 149, 157, 578, 607, 175, 578, 44, 607, 0,
- 607, 607, 120, 95, 103, 142, 146, 136, 156, 552,
- 168, 162, 551, 120, 158, 545, 173, 558, 172, 178,
- 111, 186, 554, 607, 159, 607, 607, 607, 607, 582,
- 607, 607, 0, 607, 607, 607, 607, 607, 607, 607,
- 607, 607, 607, 222, 607, 0, 607, 228, 254, 262,
- 281, 0, 290, 607, 607, 607, 571, 607, 607, 607,
- 570, 0, 607, 607, 546, 539, 542, 550, 549, 536,
-
- 551, 538, 544, 532, 529, 542, 529, 526, 526, 532,
- 520, 527, 524, 534, 520, 526, 529, 530, 0, 204,
- 529, 207, 515, 528, 519, 521, 511, 525, 522, 524,
- 507, 512, 509, 498, 183, 512, 508, 510, 499, 502,
- 212, 507, 499, 511, 186, 504, 607, 607, 607, 0,
- 306, 0, 316, 332, 270, 342, 0, 607, 607, 0,
- 496, 500, 509, 506, 490, 490, 161, 505, 502, 502,
- 500, 497, 489, 495, 482, 493, 496, 0, 493, 481,
- 488, 485, 489, 482, 471, 470, 483, 486, 483, 478,
- 469, 294, 474, 477, 468, 465, 469, 475, 466, 457,
-
- 460, 458, 468, 454, 452, 452, 454, 451, 462, 461,
- 278, 456, 451, 440, 320, 458, 460, 449, 348, 354,
- 360, 366, 450, 0, 448, 336, 0, 440, 438, 446,
- 435, 452, 441, 370, 0, 0, 435, 445, 445, 430,
- 373, 0, 0, 432, 376, 433, 427, 426, 427, 426,
- 379, 0, 0, 0, 0, 0, 422, 423, 428, 419,
- 432, 427, 426, 418, 422, 414, 417, 421, 426, 425,
- 416, 0, 0, 422, 411, 411, 416, 415, 412, 0,
- 0, 0, 0, 402, 414, 416, 0, 0, 0, 0,
- 0, 0, 404, 405, 399, 409, 0, 0, 0, 400,
+ 0, 0, 64, 65, 74, 0, 627, 628, 628, 628,
+ 602, 45, 135, 628, 628, 601, 132, 628, 131, 129,
+ 143, 155, 163, 599, 628, 179, 599, 47, 628, 0,
+ 628, 628, 126, 98, 108, 147, 158, 158, 165, 570,
+ 130, 107, 569, 148, 156, 563, 172, 576, 174, 181,
+ 177, 195, 572, 628, 173, 628, 628, 628, 628, 603,
+ 628, 628, 0, 628, 628, 628, 628, 628, 628, 628,
+ 628, 628, 628, 233, 628, 0, 628, 239, 255, 271,
+ 287, 0, 300, 628, 628, 628, 592, 628, 628, 628,
+ 591, 0, 628, 628, 564, 557, 560, 568, 567, 554,
+
+ 569, 556, 562, 550, 547, 560, 547, 544, 544, 550,
+ 538, 545, 542, 552, 538, 544, 547, 548, 0, 187,
+ 547, 241, 533, 546, 537, 539, 529, 543, 540, 542,
+ 525, 530, 527, 516, 192, 530, 526, 528, 517, 520,
+ 274, 525, 517, 529, 114, 522, 628, 628, 628, 0,
+ 316, 0, 322, 338, 344, 351, 0, 628, 628, 0,
+ 514, 518, 527, 524, 508, 508, 205, 523, 520, 520,
+ 518, 515, 507, 513, 500, 511, 514, 0, 511, 499,
+ 506, 503, 507, 500, 489, 488, 501, 504, 501, 496,
+ 487, 247, 492, 495, 486, 483, 487, 493, 484, 475,
+
+ 478, 476, 486, 472, 470, 470, 472, 469, 480, 479,
+ 328, 474, 469, 458, 260, 476, 478, 467, 358, 366,
+ 372, 378, 468, 0, 466, 276, 0, 458, 456, 464,
+ 453, 470, 459, 291, 0, 0, 453, 463, 463, 448,
+ 305, 0, 0, 450, 327, 451, 445, 444, 445, 444,
+ 382, 0, 0, 0, 0, 0, 440, 441, 446, 437,
+ 450, 445, 444, 436, 440, 432, 435, 439, 444, 443,
+ 434, 0, 0, 440, 429, 429, 434, 433, 430, 0,
+ 0, 0, 0, 420, 432, 434, 0, 0, 0, 0,
+ 0, 0, 422, 423, 417, 427, 0, 0, 0, 418,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 407, 0, 0, 405, 401, 0, 0, 0, 397, 393,
- 398, 388, 401, 387, 400, 389, 396, 0, 394, 396,
- 380, 389, 395, 390, 378, 0, 380, 0, 379, 382,
- 0, 371, 370, 370, 383, 0, 385, 0, 384, 383,
- 368, 381, 368, 0, 0, 371, 0, 0, 363, 0,
- 0, 0, 0, 360, 371, 364, 368, 303, 297, 288,
- 300, 0, 0, 283, 290, 269, 0, 277, 274, 255,
- 232, 255, 0, 0, 244, 0, 236, 226, 0, 0,
- 225, 208, 211, 0, 185, 202, 131, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 134, 117, 0, 607,
- 398, 400, 402, 406, 142
+ 425, 0, 0, 423, 419, 0, 0, 0, 415, 411,
+ 416, 406, 419, 405, 418, 407, 414, 0, 412, 414,
+ 398, 407, 413, 408, 396, 0, 398, 0, 397, 400,
+ 0, 389, 388, 388, 401, 0, 403, 0, 402, 401,
+ 386, 399, 386, 0, 0, 389, 0, 0, 381, 0,
+ 0, 0, 0, 378, 389, 382, 388, 385, 380, 372,
+ 382, 0, 0, 365, 371, 360, 0, 369, 366, 356,
+ 385, 364, 0, 0, 364, 0, 362, 361, 0, 0,
+ 360, 323, 308, 0, 298, 318, 270, 265, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 279, 271, 240, 240,
+ 238, 237, 226, 0, 208, 188, 190, 0, 186, 173,
+ 187, 164, 158, 0, 628, 415, 417, 419, 423, 186
} ;
-static yyconst flex_int16_t yy_def[416] =
+static yyconst flex_int16_t yy_def[431] =
{ 0,
- 410, 1, 411, 411, 410, 5, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 412,
- 410, 410, 410, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 413, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 414, 410, 410, 410, 410,
- 410, 415, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 412, 410, 410, 412, 412, 412, 412, 412, 412,
-
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 410, 410, 410, 413,
- 410, 414, 410, 410, 410, 410, 415, 410, 410, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
-
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 410, 410,
- 410, 410, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
-
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
-
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 0,
- 410, 410, 410, 410, 410
+ 425, 1, 426, 426, 425, 5, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 427,
+ 425, 425, 425, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 428, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 429, 425, 425, 425, 425,
+ 425, 430, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 427, 425, 425, 427, 427, 427, 427, 427, 427,
+
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 425, 425, 425, 428,
+ 425, 429, 425, 425, 425, 425, 430, 425, 425, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 425, 425,
+ 425, 425, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 0, 425, 425, 425, 425, 425
} ;
-static yyconst flex_int16_t yy_nxt[671] =
+static yyconst flex_int16_t yy_nxt[695] =
{ 0,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 23, 23, 23, 23,
24, 25, 26, 27, 28, 29, 30, 30, 30, 30,
- 30, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 30, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 30, 30, 30, 54,
- 55, 56, 57, 59, 59, 65, 66, 90, 91, 60,
- 60, 8, 61, 62, 8, 8, 8, 8, 8, 8,
+ 30, 30, 30, 30, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 30, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 30,
+ 30, 30, 54, 55, 56, 57, 59, 59, 65, 66,
+ 90, 91, 60, 60, 8, 61, 62, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 63, 63, 63,
- 63, 63, 63, 8, 8, 8, 63, 63, 63, 63,
- 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 8,
+ 8, 8, 63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
- 8, 8, 8, 8, 67, 70, 72, 74, 74, 74,
- 74, 74, 74, 93, 157, 75, 95, 96, 73, 71,
- 76, 97, 68, 98, 94, 123, 409, 99, 141, 124,
- 77, 78, 142, 79, 79, 79, 79, 79, 80, 78,
- 408, 83, 83, 83, 83, 83, 83, 100, 81, 85,
- 82, 107, 147, 108, 407, 103, 81, 101, 81, 104,
- 102, 110, 109, 125, 105, 86, 81, 87, 88, 111,
-
- 106, 112, 119, 116, 113, 82, 126, 132, 128, 120,
- 114, 117, 229, 230, 133, 134, 121, 137, 204, 148,
- 138, 143, 118, 129, 135, 144, 130, 136, 139, 216,
- 406, 217, 405, 205, 145, 140, 74, 74, 74, 74,
- 74, 74, 153, 153, 153, 153, 153, 153, 396, 184,
- 404, 151, 185, 186, 190, 211, 187, 154, 188, 397,
- 403, 151, 191, 212, 402, 401, 78, 154, 79, 79,
- 79, 79, 79, 80, 78, 400, 80, 80, 80, 80,
- 80, 80, 399, 81, 156, 156, 156, 156, 156, 156,
- 155, 81, 155, 81, 398, 156, 156, 156, 156, 156,
-
- 156, 81, 78, 395, 83, 83, 83, 83, 83, 83,
- 254, 255, 256, 394, 393, 219, 392, 219, 275, 81,
- 220, 220, 220, 220, 220, 220, 276, 391, 390, 81,
- 153, 153, 153, 153, 153, 153, 280, 281, 282, 389,
- 388, 221, 387, 221, 386, 154, 222, 222, 222, 222,
- 222, 222, 288, 289, 290, 154, 156, 156, 156, 156,
- 156, 156, 220, 220, 220, 220, 220, 220, 220, 220,
- 220, 220, 220, 220, 222, 222, 222, 222, 222, 222,
- 222, 222, 222, 222, 222, 222, 297, 298, 299, 304,
- 305, 306, 308, 309, 310, 316, 317, 318, 58, 58,
-
- 58, 58, 92, 92, 150, 150, 152, 385, 152, 152,
- 384, 383, 382, 381, 380, 379, 378, 377, 376, 375,
- 374, 373, 372, 371, 370, 369, 368, 367, 366, 365,
- 364, 363, 362, 361, 360, 359, 358, 357, 356, 355,
- 354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
- 344, 343, 342, 341, 340, 339, 338, 337, 336, 335,
- 334, 333, 332, 331, 330, 329, 328, 327, 326, 325,
- 324, 323, 322, 321, 320, 319, 315, 314, 313, 312,
- 311, 307, 303, 302, 301, 300, 296, 295, 294, 293,
- 292, 291, 287, 286, 285, 284, 283, 279, 278, 277,
-
- 274, 273, 272, 271, 270, 269, 268, 267, 266, 265,
- 264, 263, 262, 261, 260, 259, 258, 257, 253, 252,
- 251, 250, 249, 248, 247, 246, 245, 244, 243, 242,
- 241, 240, 239, 238, 237, 236, 235, 234, 233, 232,
- 231, 228, 227, 226, 225, 224, 223, 218, 215, 214,
- 213, 210, 209, 208, 207, 206, 203, 202, 201, 200,
- 199, 198, 197, 196, 195, 194, 193, 192, 189, 183,
- 182, 181, 180, 179, 178, 177, 176, 175, 174, 173,
- 172, 171, 170, 169, 168, 167, 166, 165, 164, 163,
- 162, 161, 160, 159, 158, 149, 146, 131, 127, 122,
-
- 115, 89, 84, 69, 64, 410, 7, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410
+ 63, 63, 63, 63, 63, 63, 8, 8, 8, 8,
+ 67, 70, 72, 74, 74, 74, 74, 74, 74, 93,
+ 119, 75, 95, 96, 73, 71, 76, 120, 68, 97,
+ 216, 98, 217, 94, 121, 99, 77, 78, 116, 79,
+ 79, 79, 79, 79, 80, 78, 117, 83, 83, 83,
+ 83, 83, 83, 85, 81, 100, 123, 118, 157, 82,
+ 124, 424, 81, 423, 125, 101, 147, 81, 102, 86,
+
+ 103, 87, 88, 110, 104, 81, 107, 126, 108, 105,
+ 128, 111, 132, 112, 82, 106, 113, 109, 422, 133,
+ 134, 421, 114, 137, 420, 129, 138, 141, 130, 135,
+ 204, 142, 136, 143, 139, 184, 148, 144, 185, 186,
+ 419, 140, 187, 418, 188, 205, 145, 74, 74, 74,
+ 74, 74, 74, 153, 153, 153, 153, 153, 153, 229,
+ 230, 417, 151, 254, 255, 256, 416, 78, 154, 79,
+ 79, 79, 79, 79, 80, 151, 280, 281, 282, 415,
+ 414, 154, 413, 78, 81, 80, 80, 80, 80, 80,
+ 80, 190, 288, 289, 290, 412, 155, 81, 155, 191,
+
+ 81, 156, 156, 156, 156, 156, 156, 297, 298, 299,
+ 411, 410, 78, 81, 83, 83, 83, 83, 83, 83,
+ 211, 304, 305, 306, 409, 219, 408, 219, 212, 81,
+ 220, 220, 220, 220, 220, 220, 153, 153, 153, 153,
+ 153, 153, 81, 308, 309, 310, 407, 221, 406, 221,
+ 405, 154, 222, 222, 222, 222, 222, 222, 156, 156,
+ 156, 156, 156, 156, 154, 156, 156, 156, 156, 156,
+ 156, 275, 220, 220, 220, 220, 220, 220, 404, 276,
+ 220, 220, 220, 220, 220, 220, 222, 222, 222, 222,
+ 222, 222, 222, 222, 222, 222, 222, 222, 316, 317,
+
+ 318, 396, 403, 402, 401, 400, 399, 395, 394, 393,
+ 392, 391, 397, 390, 398, 58, 58, 58, 58, 92,
+ 92, 150, 150, 152, 389, 152, 152, 388, 387, 386,
+ 385, 384, 383, 382, 381, 380, 379, 378, 377, 376,
+ 375, 374, 373, 372, 371, 370, 369, 368, 367, 366,
+ 365, 364, 363, 362, 361, 360, 359, 358, 357, 356,
+ 355, 354, 353, 352, 351, 350, 349, 348, 347, 346,
+ 345, 344, 343, 342, 341, 340, 339, 338, 337, 336,
+ 335, 334, 333, 332, 331, 330, 329, 328, 327, 326,
+ 325, 324, 323, 322, 321, 320, 319, 315, 314, 313,
+
+ 312, 311, 307, 303, 302, 301, 300, 296, 295, 294,
+ 293, 292, 291, 287, 286, 285, 284, 283, 279, 278,
+ 277, 274, 273, 272, 271, 270, 269, 268, 267, 266,
+ 265, 264, 263, 262, 261, 260, 259, 258, 257, 253,
+ 252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
+ 242, 241, 240, 239, 238, 237, 236, 235, 234, 233,
+ 232, 231, 228, 227, 226, 225, 224, 223, 218, 215,
+ 214, 213, 210, 209, 208, 207, 206, 203, 202, 201,
+ 200, 199, 198, 197, 196, 195, 194, 193, 192, 189,
+ 183, 182, 181, 180, 179, 178, 177, 176, 175, 174,
+
+ 173, 172, 171, 170, 169, 168, 167, 166, 165, 164,
+ 163, 162, 161, 160, 159, 158, 149, 146, 131, 127,
+ 122, 115, 89, 84, 69, 64, 425, 7, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425
+
} ;
-static yyconst flex_int16_t yy_chk[671] =
+static yyconst flex_int16_t yy_chk[695] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@@ -657,77 +677,81 @@ static yyconst flex_int16_t yy_chk[671] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 4, 12, 12, 28, 28, 3,
- 4, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 1, 1, 1, 1, 1, 1, 3, 4, 12, 12,
+ 28, 28, 3, 4, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 13, 17, 19, 20, 20, 20,
- 20, 20, 20, 33, 415, 21, 34, 34, 19, 17,
- 21, 35, 13, 35, 33, 44, 408, 35, 51, 44,
- 21, 22, 51, 22, 22, 22, 22, 22, 22, 23,
- 407, 23, 23, 23, 23, 23, 23, 36, 22, 26,
- 22, 38, 55, 38, 397, 37, 23, 36, 22, 37,
- 36, 39, 38, 45, 37, 26, 23, 26, 26, 39,
-
- 37, 39, 42, 41, 39, 22, 45, 49, 47, 42,
- 39, 41, 167, 167, 49, 49, 42, 50, 135, 55,
- 50, 52, 41, 47, 49, 52, 47, 49, 50, 145,
- 396, 145, 395, 135, 52, 50, 74, 74, 74, 74,
- 74, 74, 78, 78, 78, 78, 78, 78, 381, 120,
- 393, 74, 120, 120, 122, 141, 120, 78, 120, 381,
- 392, 74, 122, 141, 391, 388, 79, 78, 79, 79,
- 79, 79, 79, 79, 80, 387, 80, 80, 80, 80,
- 80, 80, 385, 79, 155, 155, 155, 155, 155, 155,
- 81, 80, 81, 79, 382, 81, 81, 81, 81, 81,
-
- 81, 80, 83, 380, 83, 83, 83, 83, 83, 83,
- 192, 192, 192, 379, 378, 151, 376, 151, 211, 83,
- 151, 151, 151, 151, 151, 151, 211, 375, 374, 83,
- 153, 153, 153, 153, 153, 153, 215, 215, 215, 371,
- 370, 154, 369, 154, 368, 153, 154, 154, 154, 154,
- 154, 154, 226, 226, 226, 153, 156, 156, 156, 156,
- 156, 156, 219, 219, 219, 219, 219, 219, 220, 220,
- 220, 220, 220, 220, 221, 221, 221, 221, 221, 221,
- 222, 222, 222, 222, 222, 222, 234, 234, 234, 241,
- 241, 241, 245, 245, 245, 251, 251, 251, 411, 411,
-
- 411, 411, 412, 412, 413, 413, 414, 367, 414, 414,
- 366, 365, 364, 359, 356, 353, 352, 351, 350, 349,
- 347, 345, 344, 343, 342, 340, 339, 337, 335, 334,
- 333, 332, 331, 330, 329, 327, 326, 325, 324, 323,
- 322, 321, 320, 319, 315, 314, 311, 300, 296, 295,
- 294, 293, 286, 285, 284, 279, 278, 277, 276, 275,
- 274, 271, 270, 269, 268, 267, 266, 265, 264, 263,
- 262, 261, 260, 259, 258, 257, 250, 249, 248, 247,
- 246, 244, 240, 239, 238, 237, 233, 232, 231, 230,
- 229, 228, 225, 223, 218, 217, 216, 214, 213, 212,
-
- 210, 209, 208, 207, 206, 205, 204, 203, 202, 201,
- 200, 199, 198, 197, 196, 195, 194, 193, 191, 190,
- 189, 188, 187, 186, 185, 184, 183, 182, 181, 180,
- 179, 177, 176, 175, 174, 173, 172, 171, 170, 169,
- 168, 166, 165, 164, 163, 162, 161, 146, 144, 143,
- 142, 140, 139, 138, 137, 136, 134, 133, 132, 131,
- 130, 129, 128, 127, 126, 125, 124, 123, 121, 118,
- 117, 116, 115, 114, 113, 112, 111, 110, 109, 108,
- 107, 106, 105, 104, 103, 102, 101, 100, 99, 98,
- 97, 96, 95, 91, 87, 60, 53, 48, 46, 43,
-
- 40, 27, 24, 16, 11, 7, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 13, 17, 19, 20, 20, 20, 20, 20, 20, 33,
+ 42, 21, 34, 34, 19, 17, 21, 42, 13, 35,
+ 145, 35, 145, 33, 42, 35, 21, 22, 41, 22,
+ 22, 22, 22, 22, 22, 23, 41, 23, 23, 23,
+ 23, 23, 23, 26, 22, 36, 44, 41, 430, 22,
+ 44, 423, 23, 422, 45, 36, 55, 22, 36, 26,
+
+ 37, 26, 26, 39, 37, 23, 38, 45, 38, 37,
+ 47, 39, 49, 39, 22, 37, 39, 38, 421, 49,
+ 49, 420, 39, 50, 419, 47, 50, 51, 47, 49,
+ 135, 51, 49, 52, 50, 120, 55, 52, 120, 120,
+ 417, 50, 120, 416, 120, 135, 52, 74, 74, 74,
+ 74, 74, 74, 78, 78, 78, 78, 78, 78, 167,
+ 167, 415, 74, 192, 192, 192, 413, 79, 78, 79,
+ 79, 79, 79, 79, 79, 74, 215, 215, 215, 412,
+ 411, 78, 410, 80, 79, 80, 80, 80, 80, 80,
+ 80, 122, 226, 226, 226, 409, 81, 79, 81, 122,
+
+ 80, 81, 81, 81, 81, 81, 81, 234, 234, 234,
+ 408, 407, 83, 80, 83, 83, 83, 83, 83, 83,
+ 141, 241, 241, 241, 398, 151, 397, 151, 141, 83,
+ 151, 151, 151, 151, 151, 151, 153, 153, 153, 153,
+ 153, 153, 83, 245, 245, 245, 396, 154, 395, 154,
+ 393, 153, 154, 154, 154, 154, 154, 154, 155, 155,
+ 155, 155, 155, 155, 153, 156, 156, 156, 156, 156,
+ 156, 211, 219, 219, 219, 219, 219, 219, 392, 211,
+ 220, 220, 220, 220, 220, 220, 221, 221, 221, 221,
+ 221, 221, 222, 222, 222, 222, 222, 222, 251, 251,
+
+ 251, 381, 391, 388, 387, 385, 382, 380, 379, 378,
+ 376, 375, 381, 374, 381, 426, 426, 426, 426, 427,
+ 427, 428, 428, 429, 371, 429, 429, 370, 369, 368,
+ 367, 366, 365, 364, 359, 356, 353, 352, 351, 350,
+ 349, 347, 345, 344, 343, 342, 340, 339, 337, 335,
+ 334, 333, 332, 331, 330, 329, 327, 326, 325, 324,
+ 323, 322, 321, 320, 319, 315, 314, 311, 300, 296,
+ 295, 294, 293, 286, 285, 284, 279, 278, 277, 276,
+ 275, 274, 271, 270, 269, 268, 267, 266, 265, 264,
+ 263, 262, 261, 260, 259, 258, 257, 250, 249, 248,
+
+ 247, 246, 244, 240, 239, 238, 237, 233, 232, 231,
+ 230, 229, 228, 225, 223, 218, 217, 216, 214, 213,
+ 212, 210, 209, 208, 207, 206, 205, 204, 203, 202,
+ 201, 200, 199, 198, 197, 196, 195, 194, 193, 191,
+ 190, 189, 188, 187, 186, 185, 184, 183, 182, 181,
+ 180, 179, 177, 176, 175, 174, 173, 172, 171, 170,
+ 169, 168, 166, 165, 164, 163, 162, 161, 146, 144,
+ 143, 142, 140, 139, 138, 137, 136, 134, 133, 132,
+ 131, 130, 129, 128, 127, 126, 125, 124, 123, 121,
+ 118, 117, 116, 115, 114, 113, 112, 111, 110, 109,
+
+ 108, 107, 106, 105, 104, 103, 102, 101, 100, 99,
+ 98, 97, 96, 95, 91, 87, 60, 53, 48, 46,
+ 43, 40, 27, 24, 16, 11, 7, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425
+
} ;
/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[146] =
+static yyconst flex_int32_t yy_rule_can_match_eol[148] =
{ 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -736,7 +760,7 @@ static yyconst flex_int32_t yy_rule_can_match_eol[146] =
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 0, };
+ 0, 0, 0, 0, 0, 1, 0, 0, };
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
@@ -756,7 +780,7 @@ This file contains the Lex specification for GLSL ES.
Based on ANSI C grammar, Lex specification:
http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
-IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_glslang_lexer.sh,
+IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh,
WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
*/
@@ -920,7 +944,7 @@ static int input (yyscan_t yyscanner );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- int n; \
+ yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1062,13 +1086,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 411 )
+ if ( yy_current_state >= 426 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_current_state != 410 );
+ while ( yy_current_state != 425 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
@@ -1079,7 +1103,7 @@ yy_find_action:
if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
{
- int yyl;
+ yy_size_t yyl;
for ( yyl = 0; yyl < yyleng; ++yyl )
if ( yytext[yyl] == '\n' )
@@ -1285,15 +1309,15 @@ YY_RULE_SETUP
YY_BREAK
case 47:
YY_RULE_SETUP
-{ context->lexAfterType = true; return(STRUCT); }
+{ context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; }
YY_BREAK
case 48:
YY_RULE_SETUP
-{ return reserved_word(yyscanner); }
+{ context->lexAfterType = true; return SAMPLER2DRECT; }
YY_BREAK
case 49:
YY_RULE_SETUP
-{ return reserved_word(yyscanner); }
+{ context->lexAfterType = true; return(STRUCT); }
YY_BREAK
case 50:
YY_RULE_SETUP
@@ -1449,220 +1473,228 @@ YY_RULE_SETUP
YY_BREAK
case 88:
YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
{
yylval->lex.string = NewPoolTString(yytext);
return check_type(yyscanner);
}
YY_BREAK
-case 89:
+case 91:
YY_RULE_SETUP
{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
YY_BREAK
-case 90:
+case 92:
YY_RULE_SETUP
{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
YY_BREAK
-case 91:
+case 93:
YY_RULE_SETUP
{ context->error(yylineno, "Invalid Octal number.", yytext, "", ""); context->recover(); return 0;}
YY_BREAK
-case 92:
+case 94:
YY_RULE_SETUP
{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
YY_BREAK
-case 93:
+case 95:
YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK
-case 94:
+case 96:
YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK
-case 95:
+case 97:
YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK
-case 96:
+case 98:
YY_RULE_SETUP
{ return(ADD_ASSIGN); }
YY_BREAK
-case 97:
+case 99:
YY_RULE_SETUP
{ return(SUB_ASSIGN); }
YY_BREAK
-case 98:
+case 100:
YY_RULE_SETUP
{ return(MUL_ASSIGN); }
YY_BREAK
-case 99:
+case 101:
YY_RULE_SETUP
{ return(DIV_ASSIGN); }
YY_BREAK
-case 100:
+case 102:
YY_RULE_SETUP
{ return(MOD_ASSIGN); }
YY_BREAK
-case 101:
+case 103:
YY_RULE_SETUP
{ return(LEFT_ASSIGN); }
YY_BREAK
-case 102:
+case 104:
YY_RULE_SETUP
{ return(RIGHT_ASSIGN); }
YY_BREAK
-case 103:
+case 105:
YY_RULE_SETUP
{ return(AND_ASSIGN); }
YY_BREAK
-case 104:
+case 106:
YY_RULE_SETUP
{ return(XOR_ASSIGN); }
YY_BREAK
-case 105:
+case 107:
YY_RULE_SETUP
{ return(OR_ASSIGN); }
YY_BREAK
-case 106:
+case 108:
YY_RULE_SETUP
{ return(INC_OP); }
YY_BREAK
-case 107:
+case 109:
YY_RULE_SETUP
{ return(DEC_OP); }
YY_BREAK
-case 108:
+case 110:
YY_RULE_SETUP
{ return(AND_OP); }
YY_BREAK
-case 109:
+case 111:
YY_RULE_SETUP
{ return(OR_OP); }
YY_BREAK
-case 110:
+case 112:
YY_RULE_SETUP
{ return(XOR_OP); }
YY_BREAK
-case 111:
+case 113:
YY_RULE_SETUP
{ return(LE_OP); }
YY_BREAK
-case 112:
+case 114:
YY_RULE_SETUP
{ return(GE_OP); }
YY_BREAK
-case 113:
+case 115:
YY_RULE_SETUP
{ return(EQ_OP); }
YY_BREAK
-case 114:
+case 116:
YY_RULE_SETUP
{ return(NE_OP); }
YY_BREAK
-case 115:
+case 117:
YY_RULE_SETUP
{ return(LEFT_OP); }
YY_BREAK
-case 116:
+case 118:
YY_RULE_SETUP
{ return(RIGHT_OP); }
YY_BREAK
-case 117:
+case 119:
YY_RULE_SETUP
{ context->lexAfterType = false; return(SEMICOLON); }
YY_BREAK
-case 118:
+case 120:
YY_RULE_SETUP
{ context->lexAfterType = false; return(LEFT_BRACE); }
YY_BREAK
-case 119:
+case 121:
YY_RULE_SETUP
{ return(RIGHT_BRACE); }
YY_BREAK
-case 120:
+case 122:
YY_RULE_SETUP
{ if (context->inTypeParen) context->lexAfterType = false; return(COMMA); }
YY_BREAK
-case 121:
+case 123:
YY_RULE_SETUP
{ return(COLON); }
YY_BREAK
-case 122:
+case 124:
YY_RULE_SETUP
{ context->lexAfterType = false; return(EQUAL); }
YY_BREAK
-case 123:
+case 125:
YY_RULE_SETUP
{ context->lexAfterType = false; context->inTypeParen = true; return(LEFT_PAREN); }
YY_BREAK
-case 124:
+case 126:
YY_RULE_SETUP
{ context->inTypeParen = false; return(RIGHT_PAREN); }
YY_BREAK
-case 125:
+case 127:
YY_RULE_SETUP
{ return(LEFT_BRACKET); }
YY_BREAK
-case 126:
+case 128:
YY_RULE_SETUP
{ return(RIGHT_BRACKET); }
YY_BREAK
-case 127:
+case 129:
YY_RULE_SETUP
{ BEGIN(FIELDS); return(DOT); }
YY_BREAK
-case 128:
+case 130:
YY_RULE_SETUP
{ return(BANG); }
YY_BREAK
-case 129:
+case 131:
YY_RULE_SETUP
{ return(DASH); }
YY_BREAK
-case 130:
+case 132:
YY_RULE_SETUP
{ return(TILDE); }
YY_BREAK
-case 131:
+case 133:
YY_RULE_SETUP
{ return(PLUS); }
YY_BREAK
-case 132:
+case 134:
YY_RULE_SETUP
{ return(STAR); }
YY_BREAK
-case 133:
+case 135:
YY_RULE_SETUP
{ return(SLASH); }
YY_BREAK
-case 134:
+case 136:
YY_RULE_SETUP
{ return(PERCENT); }
YY_BREAK
-case 135:
+case 137:
YY_RULE_SETUP
{ return(LEFT_ANGLE); }
YY_BREAK
-case 136:
+case 138:
YY_RULE_SETUP
{ return(RIGHT_ANGLE); }
YY_BREAK
-case 137:
+case 139:
YY_RULE_SETUP
{ return(VERTICAL_BAR); }
YY_BREAK
-case 138:
+case 140:
YY_RULE_SETUP
{ return(CARET); }
YY_BREAK
-case 139:
+case 141:
YY_RULE_SETUP
{ return(AMPERSAND); }
YY_BREAK
-case 140:
+case 142:
YY_RULE_SETUP
{ return(QUESTION); }
YY_BREAK
-case 141:
+case 143:
YY_RULE_SETUP
{
BEGIN(INITIAL);
@@ -1670,12 +1702,12 @@ YY_RULE_SETUP
return FIELD_SELECTION;
}
YY_BREAK
-case 142:
+case 144:
YY_RULE_SETUP
{}
YY_BREAK
-case 143:
-/* rule 143 can match eol */
+case 145:
+/* rule 145 can match eol */
YY_RULE_SETUP
{ }
YY_BREAK
@@ -1684,11 +1716,11 @@ case YY_STATE_EOF(COMMENT):
case YY_STATE_EOF(FIELDS):
{ context->AfterEOF = true; yyterminate(); }
YY_BREAK
-case 144:
+case 146:
YY_RULE_SETUP
{ context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
YY_BREAK
-case 145:
+case 147:
YY_RULE_SETUP
ECHO;
YY_BREAK
@@ -1984,7 +2016,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 411 )
+ if ( yy_current_state >= 426 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@@ -2013,11 +2045,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 411 )
+ if ( yy_current_state >= 426 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 410);
+ yy_is_jam = (yy_current_state == 425);
return yy_is_jam ? 0 : yy_current_state;
}
@@ -3096,6 +3128,8 @@ void updateExtensionBehavior(const char* extName, const char* behavior)
msg = TString("extension '") + extName + "' is not supported";
context->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno);
break;
+ default:
+ break;
}
return;
} else
diff --git a/Source/ThirdParty/ANGLE/src/compiler/glslang_tab.cpp b/Source/ThirdParty/ANGLE/src/compiler/glslang_tab.cpp
index d00c7a3..37a0f05 100644
--- a/Source/ThirdParty/ANGLE/src/compiler/glslang_tab.cpp
+++ b/Source/ThirdParty/ANGLE/src/compiler/glslang_tab.cpp
@@ -106,57 +106,59 @@
WHILE = 295,
SAMPLER2D = 296,
SAMPLERCUBE = 297,
- IDENTIFIER = 298,
- TYPE_NAME = 299,
- FLOATCONSTANT = 300,
- INTCONSTANT = 301,
- BOOLCONSTANT = 302,
- FIELD_SELECTION = 303,
- LEFT_OP = 304,
- RIGHT_OP = 305,
- INC_OP = 306,
- DEC_OP = 307,
- LE_OP = 308,
- GE_OP = 309,
- EQ_OP = 310,
- NE_OP = 311,
- AND_OP = 312,
- OR_OP = 313,
- XOR_OP = 314,
- MUL_ASSIGN = 315,
- DIV_ASSIGN = 316,
- ADD_ASSIGN = 317,
- MOD_ASSIGN = 318,
- LEFT_ASSIGN = 319,
- RIGHT_ASSIGN = 320,
- AND_ASSIGN = 321,
- XOR_ASSIGN = 322,
- OR_ASSIGN = 323,
- SUB_ASSIGN = 324,
- LEFT_PAREN = 325,
- RIGHT_PAREN = 326,
- LEFT_BRACKET = 327,
- RIGHT_BRACKET = 328,
- LEFT_BRACE = 329,
- RIGHT_BRACE = 330,
- DOT = 331,
- COMMA = 332,
- COLON = 333,
- EQUAL = 334,
- SEMICOLON = 335,
- BANG = 336,
- DASH = 337,
- TILDE = 338,
- PLUS = 339,
- STAR = 340,
- SLASH = 341,
- PERCENT = 342,
- LEFT_ANGLE = 343,
- RIGHT_ANGLE = 344,
- VERTICAL_BAR = 345,
- CARET = 346,
- AMPERSAND = 347,
- QUESTION = 348
+ SAMPLER_EXTERNAL_OES = 298,
+ SAMPLER2DRECT = 299,
+ IDENTIFIER = 300,
+ TYPE_NAME = 301,
+ FLOATCONSTANT = 302,
+ INTCONSTANT = 303,
+ BOOLCONSTANT = 304,
+ FIELD_SELECTION = 305,
+ LEFT_OP = 306,
+ RIGHT_OP = 307,
+ INC_OP = 308,
+ DEC_OP = 309,
+ LE_OP = 310,
+ GE_OP = 311,
+ EQ_OP = 312,
+ NE_OP = 313,
+ AND_OP = 314,
+ OR_OP = 315,
+ XOR_OP = 316,
+ MUL_ASSIGN = 317,
+ DIV_ASSIGN = 318,
+ ADD_ASSIGN = 319,
+ MOD_ASSIGN = 320,
+ LEFT_ASSIGN = 321,
+ RIGHT_ASSIGN = 322,
+ AND_ASSIGN = 323,
+ XOR_ASSIGN = 324,
+ OR_ASSIGN = 325,
+ SUB_ASSIGN = 326,
+ LEFT_PAREN = 327,
+ RIGHT_PAREN = 328,
+ LEFT_BRACKET = 329,
+ RIGHT_BRACKET = 330,
+ LEFT_BRACE = 331,
+ RIGHT_BRACE = 332,
+ DOT = 333,
+ COMMA = 334,
+ COLON = 335,
+ EQUAL = 336,
+ SEMICOLON = 337,
+ BANG = 338,
+ DASH = 339,
+ TILDE = 340,
+ PLUS = 341,
+ STAR = 342,
+ SLASH = 343,
+ PERCENT = 344,
+ LEFT_ANGLE = 345,
+ RIGHT_ANGLE = 346,
+ VERTICAL_BAR = 347,
+ CARET = 348,
+ AMPERSAND = 349,
+ QUESTION = 350
};
#endif
/* Tokens. */
@@ -200,57 +202,59 @@
#define WHILE 295
#define SAMPLER2D 296
#define SAMPLERCUBE 297
-#define IDENTIFIER 298
-#define TYPE_NAME 299
-#define FLOATCONSTANT 300
-#define INTCONSTANT 301
-#define BOOLCONSTANT 302
-#define FIELD_SELECTION 303
-#define LEFT_OP 304
-#define RIGHT_OP 305
-#define INC_OP 306
-#define DEC_OP 307
-#define LE_OP 308
-#define GE_OP 309
-#define EQ_OP 310
-#define NE_OP 311
-#define AND_OP 312
-#define OR_OP 313
-#define XOR_OP 314
-#define MUL_ASSIGN 315
-#define DIV_ASSIGN 316
-#define ADD_ASSIGN 317
-#define MOD_ASSIGN 318
-#define LEFT_ASSIGN 319
-#define RIGHT_ASSIGN 320
-#define AND_ASSIGN 321
-#define XOR_ASSIGN 322
-#define OR_ASSIGN 323
-#define SUB_ASSIGN 324
-#define LEFT_PAREN 325
-#define RIGHT_PAREN 326
-#define LEFT_BRACKET 327
-#define RIGHT_BRACKET 328
-#define LEFT_BRACE 329
-#define RIGHT_BRACE 330
-#define DOT 331
-#define COMMA 332
-#define COLON 333
-#define EQUAL 334
-#define SEMICOLON 335
-#define BANG 336
-#define DASH 337
-#define TILDE 338
-#define PLUS 339
-#define STAR 340
-#define SLASH 341
-#define PERCENT 342
-#define LEFT_ANGLE 343
-#define RIGHT_ANGLE 344
-#define VERTICAL_BAR 345
-#define CARET 346
-#define AMPERSAND 347
-#define QUESTION 348
+#define SAMPLER_EXTERNAL_OES 298
+#define SAMPLER2DRECT 299
+#define IDENTIFIER 300
+#define TYPE_NAME 301
+#define FLOATCONSTANT 302
+#define INTCONSTANT 303
+#define BOOLCONSTANT 304
+#define FIELD_SELECTION 305
+#define LEFT_OP 306
+#define RIGHT_OP 307
+#define INC_OP 308
+#define DEC_OP 309
+#define LE_OP 310
+#define GE_OP 311
+#define EQ_OP 312
+#define NE_OP 313
+#define AND_OP 314
+#define OR_OP 315
+#define XOR_OP 316
+#define MUL_ASSIGN 317
+#define DIV_ASSIGN 318
+#define ADD_ASSIGN 319
+#define MOD_ASSIGN 320
+#define LEFT_ASSIGN 321
+#define RIGHT_ASSIGN 322
+#define AND_ASSIGN 323
+#define XOR_ASSIGN 324
+#define OR_ASSIGN 325
+#define SUB_ASSIGN 326
+#define LEFT_PAREN 327
+#define RIGHT_PAREN 328
+#define LEFT_BRACKET 329
+#define RIGHT_BRACKET 330
+#define LEFT_BRACE 331
+#define RIGHT_BRACE 332
+#define DOT 333
+#define COMMA 334
+#define COLON 335
+#define EQUAL 336
+#define SEMICOLON 337
+#define BANG 338
+#define DASH 339
+#define TILDE 340
+#define PLUS 341
+#define STAR 342
+#define SLASH 343
+#define PERCENT 344
+#define LEFT_ANGLE 345
+#define RIGHT_ANGLE 346
+#define VERTICAL_BAR 347
+#define CARET 348
+#define AMPERSAND 349
+#define QUESTION 350
@@ -259,12 +263,24 @@
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 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.
//
-// This file is auto-generated by generate_glslang_parser.sh. DO NOT EDIT!
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
+
+// Ignore errors in auto-generated code.
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wunused-function"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+#elif defined(_MSC_VER)
+#pragma warning(disable: 4065)
+#pragma warning(disable: 4189)
+#pragma warning(disable: 4505)
+#pragma warning(disable: 4701)
+#endif
#include "compiler/SymbolTable.h"
#include "compiler/ParseHelper.h"
@@ -325,7 +341,7 @@ typedef union YYSTYPE
};
} interm;
}
-/* Line 187 of yacc.c. */
+/* Line 193 of yacc.c. */
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -415,7 +431,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if YYENABLE_NLS
+# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
@@ -578,22 +594,22 @@ union yyalloc
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 69
+#define YYFINAL 71
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1334
+#define YYLAST 1416
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 94
+#define YYNTOKENS 96
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 78
+#define YYNNTS 83
/* YYNRULES -- Number of rules. */
-#define YYNRULES 193
+#define YYNRULES 201
/* YYNRULES -- Number of states. */
-#define YYNSTATES 296
+#define YYNSTATES 304
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 348
+#define YYMAXUTOK 350
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
@@ -635,7 +651,8 @@ static const yytype_uint8 yytranslate[] =
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
- 85, 86, 87, 88, 89, 90, 91, 92, 93
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95
};
#if YYDEBUG
@@ -656,99 +673,102 @@ static const yytype_uint16 yyprhs[] =
298, 303, 306, 308, 311, 313, 315, 317, 320, 322,
324, 327, 329, 331, 333, 335, 340, 342, 344, 346,
348, 350, 352, 354, 356, 358, 360, 362, 364, 366,
- 368, 370, 372, 374, 376, 378, 380, 386, 391, 393,
- 396, 400, 402, 406, 408, 413, 415, 417, 419, 421,
- 423, 425, 427, 429, 431, 434, 435, 436, 442, 444,
- 446, 449, 453, 455, 458, 460, 463, 469, 473, 475,
- 477, 482, 483, 490, 491, 500, 501, 509, 511, 513,
- 515, 516, 519, 523, 526, 529, 532, 536, 539, 541,
- 544, 546, 548, 549
+ 368, 370, 372, 374, 376, 378, 380, 382, 384, 385,
+ 392, 393, 399, 401, 404, 408, 410, 414, 416, 421,
+ 423, 425, 427, 429, 431, 433, 435, 437, 439, 442,
+ 443, 444, 450, 452, 454, 455, 458, 459, 462, 465,
+ 469, 471, 474, 476, 479, 485, 489, 491, 493, 498,
+ 499, 506, 507, 516, 517, 525, 527, 529, 531, 532,
+ 535, 539, 542, 545, 548, 552, 555, 557, 560, 562,
+ 564, 565
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 168, 0, -1, 43, -1, 95, -1, 46, -1, 45,
- -1, 47, -1, 70, 122, 71, -1, 96, -1, 97,
- 72, 98, 73, -1, 99, -1, 97, 76, 48, -1,
- 97, 51, -1, 97, 52, -1, 122, -1, 100, -1,
- 101, -1, 97, 76, 101, -1, 103, 71, -1, 102,
- 71, -1, 104, 39, -1, 104, -1, 104, 120, -1,
- 103, 77, 120, -1, 105, 70, -1, 137, -1, 43,
- -1, 48, -1, 97, -1, 51, 106, -1, 52, 106,
- -1, 107, 106, -1, 84, -1, 82, -1, 81, -1,
- 106, -1, 108, 85, 106, -1, 108, 86, 106, -1,
- 108, -1, 109, 84, 108, -1, 109, 82, 108, -1,
- 109, -1, 110, -1, 111, 88, 110, -1, 111, 89,
- 110, -1, 111, 53, 110, -1, 111, 54, 110, -1,
- 111, -1, 112, 55, 111, -1, 112, 56, 111, -1,
- 112, -1, 113, -1, 114, -1, 115, -1, 116, 57,
- 115, -1, 116, -1, 117, 59, 116, -1, 117, -1,
- 118, 58, 117, -1, 118, -1, 118, 93, 122, 78,
- 120, -1, 119, -1, 106, 121, 120, -1, 79, -1,
- 60, -1, 61, -1, 62, -1, 69, -1, 120, -1,
- 122, 77, 120, -1, 119, -1, 125, 80, -1, 133,
- 80, -1, 7, 138, 139, 80, -1, 126, 71, -1,
- 128, -1, 127, -1, 128, 130, -1, 127, 77, 130,
- -1, 135, 43, 70, -1, 137, 43, -1, 137, 43,
- 72, 123, 73, -1, 136, 131, 129, -1, 131, 129,
- -1, 136, 131, 132, -1, 131, 132, -1, -1, 33,
- -1, 34, -1, 35, -1, 137, -1, 134, -1, 133,
- 77, 43, -1, 133, 77, 43, 72, 73, -1, 133,
- 77, 43, 72, 123, 73, -1, 133, 77, 43, 79,
- 146, -1, 135, -1, 135, 43, -1, 135, 43, 72,
- 73, -1, 135, 43, 72, 123, 73, -1, 135, 43,
- 79, 146, -1, 3, 43, -1, 137, -1, 136, 137,
+ 175, 0, -1, 45, -1, 97, -1, 48, -1, 47,
+ -1, 49, -1, 72, 124, 73, -1, 98, -1, 99,
+ 74, 100, 75, -1, 101, -1, 99, 78, 50, -1,
+ 99, 53, -1, 99, 54, -1, 124, -1, 102, -1,
+ 103, -1, 99, 78, 103, -1, 105, 73, -1, 104,
+ 73, -1, 106, 39, -1, 106, -1, 106, 122, -1,
+ 105, 79, 122, -1, 107, 72, -1, 142, -1, 45,
+ -1, 50, -1, 99, -1, 53, 108, -1, 54, 108,
+ -1, 109, 108, -1, 86, -1, 84, -1, 83, -1,
+ 108, -1, 110, 87, 108, -1, 110, 88, 108, -1,
+ 110, -1, 111, 86, 110, -1, 111, 84, 110, -1,
+ 111, -1, 112, -1, 113, 90, 112, -1, 113, 91,
+ 112, -1, 113, 55, 112, -1, 113, 56, 112, -1,
+ 113, -1, 114, 57, 113, -1, 114, 58, 113, -1,
+ 114, -1, 115, -1, 116, -1, 117, -1, 118, 59,
+ 117, -1, 118, -1, 119, 61, 118, -1, 119, -1,
+ 120, 60, 119, -1, 120, -1, 120, 95, 124, 80,
+ 122, -1, 121, -1, 108, 123, 122, -1, 81, -1,
+ 62, -1, 63, -1, 64, -1, 71, -1, 122, -1,
+ 124, 79, 122, -1, 121, -1, 127, 82, -1, 135,
+ 82, -1, 7, 140, 141, 82, -1, 128, 73, -1,
+ 130, -1, 129, -1, 130, 132, -1, 129, 79, 132,
+ -1, 137, 45, 72, -1, 139, 45, -1, 139, 45,
+ 74, 125, 75, -1, 138, 133, 131, -1, 133, 131,
+ -1, 138, 133, 134, -1, 133, 134, -1, -1, 33,
+ -1, 34, -1, 35, -1, 139, -1, 136, -1, 135,
+ 79, 45, -1, 135, 79, 45, 74, 75, -1, 135,
+ 79, 45, 74, 125, 75, -1, 135, 79, 45, 81,
+ 150, -1, 137, -1, 137, 45, -1, 137, 45, 74,
+ 75, -1, 137, 45, 74, 125, 75, -1, 137, 45,
+ 81, 150, -1, 3, 45, -1, 139, -1, 138, 139,
-1, 9, -1, 8, -1, 37, -1, 3, 37, -1,
- 36, -1, 139, -1, 138, 139, -1, 4, -1, 5,
- -1, 6, -1, 140, -1, 140, 72, 123, 73, -1,
+ 36, -1, 141, -1, 140, 141, -1, 4, -1, 5,
+ -1, 6, -1, 142, -1, 142, 74, 125, 75, -1,
39, -1, 11, -1, 12, -1, 10, -1, 27, -1,
28, -1, 29, -1, 21, -1, 22, -1, 23, -1,
24, -1, 25, -1, 26, -1, 30, -1, 31, -1,
- 32, -1, 41, -1, 42, -1, 141, -1, 44, -1,
- 38, 43, 74, 142, 75, -1, 38, 74, 142, 75,
- -1, 143, -1, 142, 143, -1, 137, 144, 80, -1,
- 145, -1, 144, 77, 145, -1, 43, -1, 43, 72,
- 123, 73, -1, 120, -1, 124, -1, 150, -1, 149,
- -1, 147, -1, 156, -1, 157, -1, 160, -1, 167,
- -1, 74, 75, -1, -1, -1, 74, 151, 155, 152,
- 75, -1, 154, -1, 149, -1, 74, 75, -1, 74,
- 155, 75, -1, 148, -1, 155, 148, -1, 80, -1,
- 122, 80, -1, 18, 70, 122, 71, 158, -1, 148,
- 16, 148, -1, 148, -1, 122, -1, 135, 43, 79,
- 146, -1, -1, 40, 70, 161, 159, 71, 153, -1,
- -1, 15, 162, 148, 40, 70, 122, 71, 80, -1,
- -1, 17, 70, 163, 164, 166, 71, 153, -1, 156,
- -1, 147, -1, 159, -1, -1, 165, 80, -1, 165,
- 80, 122, -1, 14, 80, -1, 13, 80, -1, 20,
- 80, -1, 20, 122, 80, -1, 19, 80, -1, 169,
- -1, 168, 169, -1, 170, -1, 124, -1, -1, 125,
- 171, 154, -1
+ 32, -1, 41, -1, 42, -1, 43, -1, 44, -1,
+ 143, -1, 46, -1, -1, 38, 45, 76, 144, 146,
+ 77, -1, -1, 38, 76, 145, 146, 77, -1, 147,
+ -1, 146, 147, -1, 139, 148, 82, -1, 149, -1,
+ 148, 79, 149, -1, 45, -1, 45, 74, 125, 75,
+ -1, 122, -1, 126, -1, 154, -1, 153, -1, 151,
+ -1, 163, -1, 164, -1, 167, -1, 174, -1, 76,
+ 77, -1, -1, -1, 76, 155, 162, 156, 77, -1,
+ 161, -1, 153, -1, -1, 159, 161, -1, -1, 160,
+ 153, -1, 76, 77, -1, 76, 162, 77, -1, 152,
+ -1, 162, 152, -1, 82, -1, 124, 82, -1, 18,
+ 72, 124, 73, 165, -1, 158, 16, 158, -1, 158,
+ -1, 124, -1, 137, 45, 81, 150, -1, -1, 40,
+ 72, 168, 166, 73, 157, -1, -1, 15, 169, 158,
+ 40, 72, 124, 73, 82, -1, -1, 17, 72, 170,
+ 171, 173, 73, 157, -1, 163, -1, 151, -1, 166,
+ -1, -1, 172, 82, -1, 172, 82, 124, -1, 14,
+ 82, -1, 13, 82, -1, 20, 82, -1, 20, 124,
+ 82, -1, 19, 82, -1, 176, -1, 175, 176, -1,
+ 177, -1, 126, -1, -1, 127, 178, 161, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 153, 153, 188, 191, 204, 209, 214, 220, 223,
- 296, 299, 408, 418, 431, 439, 538, 541, 549, 553,
- 560, 564, 571, 577, 586, 594, 656, 663, 673, 676,
- 686, 696, 717, 718, 719, 724, 725, 734, 746, 747,
- 755, 766, 770, 771, 781, 791, 801, 814, 815, 825,
- 838, 842, 846, 850, 851, 864, 865, 878, 879, 892,
- 893, 910, 911, 924, 925, 926, 927, 928, 932, 935,
- 946, 954, 979, 984, 991, 1027, 1030, 1037, 1045, 1066,
- 1085, 1096, 1125, 1130, 1140, 1145, 1155, 1158, 1161, 1164,
- 1170, 1177, 1187, 1199, 1217, 1241, 1264, 1268, 1282, 1302,
- 1331, 1351, 1427, 1436, 1459, 1462, 1468, 1476, 1484, 1492,
- 1495, 1502, 1505, 1508, 1514, 1517, 1532, 1536, 1540, 1544,
- 1553, 1558, 1563, 1568, 1573, 1578, 1583, 1588, 1593, 1598,
- 1604, 1610, 1616, 1621, 1626, 1631, 1644, 1657, 1665, 1668,
- 1683, 1714, 1718, 1724, 1732, 1748, 1752, 1756, 1757, 1763,
- 1764, 1765, 1766, 1767, 1771, 1772, 1772, 1772, 1780, 1781,
- 1786, 1789, 1797, 1800, 1806, 1807, 1811, 1819, 1823, 1833,
- 1838, 1855, 1855, 1860, 1860, 1867, 1867, 1875, 1878, 1884,
- 1887, 1893, 1897, 1904, 1911, 1918, 1925, 1936, 1945, 1949,
- 1956, 1959, 1965, 1965
+ 0, 165, 165, 200, 203, 216, 221, 226, 232, 235,
+ 308, 311, 420, 430, 443, 451, 550, 553, 561, 565,
+ 572, 576, 583, 589, 598, 606, 661, 668, 678, 681,
+ 691, 701, 722, 723, 724, 729, 730, 739, 751, 752,
+ 760, 771, 775, 776, 786, 796, 806, 819, 820, 830,
+ 843, 847, 851, 855, 856, 869, 870, 883, 884, 897,
+ 898, 915, 916, 929, 930, 931, 932, 933, 937, 940,
+ 951, 959, 986, 991, 998, 1036, 1039, 1046, 1054, 1075,
+ 1096, 1107, 1136, 1141, 1151, 1156, 1166, 1169, 1172, 1175,
+ 1181, 1188, 1191, 1213, 1231, 1255, 1278, 1282, 1300, 1308,
+ 1340, 1360, 1449, 1458, 1481, 1484, 1490, 1498, 1506, 1514,
+ 1524, 1531, 1534, 1537, 1543, 1546, 1561, 1565, 1569, 1573,
+ 1582, 1587, 1592, 1597, 1602, 1607, 1612, 1617, 1622, 1627,
+ 1633, 1639, 1645, 1650, 1655, 1664, 1673, 1678, 1691, 1691,
+ 1705, 1705, 1714, 1717, 1732, 1768, 1772, 1778, 1786, 1802,
+ 1806, 1810, 1811, 1817, 1818, 1819, 1820, 1821, 1825, 1826,
+ 1826, 1826, 1836, 1837, 1841, 1841, 1842, 1842, 1847, 1850,
+ 1860, 1863, 1869, 1870, 1874, 1882, 1886, 1896, 1901, 1918,
+ 1918, 1923, 1923, 1930, 1930, 1938, 1941, 1947, 1950, 1956,
+ 1960, 1967, 1974, 1981, 1988, 1999, 2008, 2012, 2019, 2022,
+ 2028, 2028
};
#endif
@@ -764,16 +784,16 @@ static const char *const yytname[] =
"BVEC4", "IVEC2", "IVEC3", "IVEC4", "VEC2", "VEC3", "VEC4", "MATRIX2",
"MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
"VARYING", "STRUCT", "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE",
- "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
- "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP",
- "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP",
- "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN",
- "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN",
- "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
- "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
- "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
- "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
- "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
+ "SAMPLER_EXTERNAL_OES", "SAMPLER2DRECT", "IDENTIFIER", "TYPE_NAME",
+ "FLOATCONSTANT", "INTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION",
+ "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP",
+ "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN",
+ "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN",
+ "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN",
+ "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT",
+ "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS",
+ "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR",
+ "CARET", "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
"primary_expression", "postfix_expression", "integer_expression",
"function_call", "function_call_or_method", "function_call_generic",
"function_call_header_no_parameters",
@@ -792,16 +812,16 @@ static const char *const yytname[] =
"init_declarator_list", "single_declaration", "fully_specified_type",
"type_qualifier", "type_specifier", "precision_qualifier",
"type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
- "struct_declaration_list", "struct_declaration",
+ "@1", "@2", "struct_declaration_list", "struct_declaration",
"struct_declarator_list", "struct_declarator", "initializer",
"declaration_statement", "statement", "simple_statement",
- "compound_statement", "@1", "@2", "statement_no_new_scope",
- "compound_statement_no_new_scope", "statement_list",
- "expression_statement", "selection_statement",
- "selection_rest_statement", "condition", "iteration_statement", "@3",
- "@4", "@5", "for_init_statement", "conditionopt", "for_rest_statement",
+ "compound_statement", "@3", "@4", "statement_no_new_scope",
+ "statement_with_scope", "@5", "@6", "compound_statement_no_new_scope",
+ "statement_list", "expression_statement", "selection_statement",
+ "selection_rest_statement", "condition", "iteration_statement", "@7",
+ "@8", "@9", "for_init_statement", "conditionopt", "for_rest_statement",
"jump_statement", "translation_unit", "external_declaration",
- "function_definition", "@6", 0
+ "function_definition", "@10", 0
};
#endif
@@ -819,33 +839,34 @@ static const yytype_uint16 yytoknum[] =
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
- 345, 346, 347, 348
+ 345, 346, 347, 348, 349, 350
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 94, 95, 96, 96, 96, 96, 96, 97, 97,
- 97, 97, 97, 97, 98, 99, 100, 100, 101, 101,
- 102, 102, 103, 103, 104, 105, 105, 105, 106, 106,
- 106, 106, 107, 107, 107, 108, 108, 108, 109, 109,
- 109, 110, 111, 111, 111, 111, 111, 112, 112, 112,
- 113, 114, 115, 116, 116, 117, 117, 118, 118, 119,
- 119, 120, 120, 121, 121, 121, 121, 121, 122, 122,
- 123, 124, 124, 124, 125, 126, 126, 127, 127, 128,
- 129, 129, 130, 130, 130, 130, 131, 131, 131, 131,
- 132, 133, 133, 133, 133, 133, 134, 134, 134, 134,
- 134, 134, 135, 135, 136, 136, 136, 136, 136, 137,
- 137, 138, 138, 138, 139, 139, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 141, 141, 142, 142,
- 143, 144, 144, 145, 145, 146, 147, 148, 148, 149,
- 149, 149, 149, 149, 150, 151, 152, 150, 153, 153,
- 154, 154, 155, 155, 156, 156, 157, 158, 158, 159,
- 159, 161, 160, 162, 160, 163, 160, 164, 164, 165,
- 165, 166, 166, 167, 167, 167, 167, 167, 168, 168,
- 169, 169, 171, 170
+ 0, 96, 97, 98, 98, 98, 98, 98, 99, 99,
+ 99, 99, 99, 99, 100, 101, 102, 102, 103, 103,
+ 104, 104, 105, 105, 106, 107, 107, 107, 108, 108,
+ 108, 108, 109, 109, 109, 110, 110, 110, 111, 111,
+ 111, 112, 113, 113, 113, 113, 113, 114, 114, 114,
+ 115, 116, 117, 118, 118, 119, 119, 120, 120, 121,
+ 121, 122, 122, 123, 123, 123, 123, 123, 124, 124,
+ 125, 126, 126, 126, 127, 128, 128, 129, 129, 130,
+ 131, 131, 132, 132, 132, 132, 133, 133, 133, 133,
+ 134, 135, 135, 135, 135, 135, 136, 136, 136, 136,
+ 136, 136, 137, 137, 138, 138, 138, 138, 138, 139,
+ 139, 140, 140, 140, 141, 141, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 144, 143,
+ 145, 143, 146, 146, 147, 148, 148, 149, 149, 150,
+ 151, 152, 152, 153, 153, 153, 153, 153, 154, 155,
+ 156, 154, 157, 157, 159, 158, 160, 158, 161, 161,
+ 162, 162, 163, 163, 164, 165, 165, 166, 166, 168,
+ 167, 169, 167, 170, 167, 171, 171, 172, 172, 173,
+ 173, 174, 174, 174, 174, 174, 175, 175, 176, 176,
+ 178, 177
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
@@ -864,13 +885,14 @@ static const yytype_uint8 yyr2[] =
4, 2, 1, 2, 1, 1, 1, 2, 1, 1,
2, 1, 1, 1, 1, 4, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 5, 4, 1, 2,
- 3, 1, 3, 1, 4, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 0, 0, 5, 1, 1,
- 2, 3, 1, 2, 1, 2, 5, 3, 1, 1,
- 4, 0, 6, 0, 8, 0, 7, 1, 1, 1,
- 0, 2, 3, 2, 2, 2, 3, 2, 1, 2,
- 1, 1, 0, 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 6,
+ 0, 5, 1, 2, 3, 1, 3, 1, 4, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
+ 0, 5, 1, 1, 0, 2, 0, 2, 2, 3,
+ 1, 2, 1, 2, 5, 3, 1, 1, 4, 0,
+ 6, 0, 8, 0, 7, 1, 1, 1, 0, 2,
+ 3, 2, 2, 2, 3, 2, 1, 2, 1, 1,
+ 0, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
@@ -880,378 +902,398 @@ static const yytype_uint8 yydefact[] =
{
0, 0, 111, 112, 113, 0, 105, 104, 119, 117,
118, 123, 124, 125, 126, 127, 128, 120, 121, 122,
- 129, 130, 131, 108, 106, 0, 116, 132, 133, 135,
- 191, 192, 0, 76, 86, 0, 91, 96, 0, 102,
- 0, 109, 114, 134, 0, 188, 190, 107, 101, 0,
- 0, 0, 71, 0, 74, 86, 0, 87, 88, 89,
- 77, 0, 86, 0, 72, 97, 103, 110, 0, 1,
- 189, 0, 0, 0, 0, 138, 0, 193, 78, 83,
+ 129, 130, 131, 108, 106, 0, 116, 132, 133, 134,
+ 135, 137, 199, 200, 0, 76, 86, 0, 91, 96,
+ 0, 102, 0, 109, 114, 136, 0, 196, 198, 107,
+ 101, 0, 0, 140, 71, 0, 74, 86, 0, 87,
+ 88, 89, 77, 0, 86, 0, 72, 97, 103, 110,
+ 0, 1, 197, 0, 138, 0, 0, 201, 78, 83,
85, 90, 0, 92, 79, 0, 0, 2, 5, 4,
6, 27, 0, 0, 0, 34, 33, 32, 3, 8,
28, 10, 15, 16, 0, 0, 21, 0, 35, 0,
38, 41, 42, 47, 50, 51, 52, 53, 55, 57,
- 59, 70, 0, 25, 73, 0, 143, 0, 141, 137,
- 139, 0, 0, 173, 0, 0, 0, 0, 0, 155,
- 160, 164, 35, 61, 68, 0, 146, 0, 102, 149,
- 162, 148, 147, 0, 150, 151, 152, 153, 80, 82,
- 84, 0, 0, 98, 0, 145, 100, 29, 30, 0,
- 12, 13, 0, 0, 19, 18, 0, 116, 22, 24,
- 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 115, 136, 0, 0, 140,
- 184, 183, 0, 175, 0, 187, 185, 0, 171, 154,
- 0, 64, 65, 66, 67, 63, 0, 0, 165, 161,
- 163, 0, 93, 0, 95, 99, 7, 0, 14, 26,
+ 59, 70, 0, 25, 73, 0, 0, 0, 142, 0,
+ 0, 181, 0, 0, 0, 0, 0, 159, 168, 172,
+ 35, 61, 68, 0, 150, 0, 114, 153, 170, 152,
+ 151, 0, 154, 155, 156, 157, 80, 82, 84, 0,
+ 0, 98, 0, 149, 100, 29, 30, 0, 12, 13,
+ 0, 0, 19, 18, 0, 20, 22, 24, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 115, 0, 147, 0, 145, 141, 143,
+ 192, 191, 166, 183, 0, 195, 193, 0, 179, 158,
+ 0, 64, 65, 66, 67, 63, 0, 0, 173, 169,
+ 171, 0, 93, 0, 95, 99, 7, 0, 14, 26,
11, 17, 23, 36, 37, 40, 39, 45, 46, 43,
- 44, 48, 49, 54, 56, 58, 0, 0, 142, 0,
- 0, 0, 186, 0, 156, 62, 69, 0, 94, 9,
- 0, 144, 0, 178, 177, 180, 0, 169, 0, 0,
- 0, 81, 60, 0, 179, 0, 0, 168, 166, 0,
- 0, 157, 0, 181, 0, 0, 0, 159, 172, 158,
- 0, 182, 176, 167, 170, 174
+ 44, 48, 49, 54, 56, 58, 0, 139, 0, 0,
+ 144, 0, 0, 0, 0, 0, 194, 0, 160, 62,
+ 69, 0, 94, 9, 0, 0, 146, 0, 165, 167,
+ 186, 185, 188, 166, 177, 0, 0, 0, 81, 60,
+ 148, 0, 187, 0, 0, 176, 174, 0, 0, 161,
+ 0, 189, 0, 166, 0, 163, 180, 162, 0, 190,
+ 184, 175, 178, 182
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
-1, 98, 99, 100, 227, 101, 102, 103, 104, 105,
- 106, 107, 142, 109, 110, 111, 112, 113, 114, 115,
- 116, 117, 118, 119, 120, 143, 144, 216, 145, 122,
- 146, 147, 32, 33, 34, 79, 60, 61, 80, 35,
- 36, 37, 38, 123, 40, 41, 42, 43, 74, 75,
- 127, 128, 166, 149, 150, 151, 152, 210, 270, 288,
- 289, 153, 154, 155, 278, 269, 156, 253, 202, 250,
- 265, 275, 276, 157, 44, 45, 46, 53
+ 106, 107, 140, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 141, 142, 216, 143, 122,
+ 144, 145, 34, 35, 36, 79, 62, 63, 80, 37,
+ 38, 39, 40, 41, 42, 43, 123, 45, 125, 75,
+ 127, 128, 196, 197, 164, 147, 148, 149, 150, 210,
+ 277, 296, 251, 252, 253, 297, 151, 152, 153, 286,
+ 276, 154, 257, 202, 254, 272, 283, 284, 155, 46,
+ 47, 48, 55
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -250
+#define YYPACT_NINF -266
static const yytype_int16 yypact[] =
{
- 1225, 36, -250, -250, -250, 150, -250, -250, -250, -250,
- -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
- -250, -250, -250, -250, -250, -33, -250, -250, -250, -250,
- -250, -60, -22, -17, 21, -62, -250, 22, 1266, -250,
- 1290, -250, 11, -250, 1138, -250, -250, -250, -250, 1290,
- 14, 1266, -250, 27, -250, 34, 41, -250, -250, -250,
- -250, 1266, 129, 61, -250, 17, -250, -250, 908, -250,
- -250, 31, 1266, 72, 1042, -250, 283, -250, -250, -250,
- -250, 90, 1266, -46, -250, 194, 908, 65, -250, -250,
- -250, -250, 908, 908, 908, -250, -250, -250, -250, -250,
- -40, -250, -250, -250, 80, -25, 975, 87, -250, 908,
- 35, 13, -250, -26, 68, -250, -250, -250, 110, 109,
- -54, -250, 96, -250, -250, 1083, 98, 33, -250, -250,
- -250, 91, 92, -250, 104, 107, 99, 760, 108, 105,
- -250, -250, 24, -250, -250, 37, -250, -60, 112, -250,
- -250, -250, -250, 365, -250, -250, -250, -250, 111, -250,
- -250, 827, 908, -250, 113, -250, -250, -250, -250, 4,
- -250, -250, 908, 1179, -250, -250, 908, 114, -250, -250,
- -250, 908, 908, 908, 908, 908, 908, 908, 908, 908,
- 908, 908, 908, 908, 908, -250, -250, 908, 72, -250,
- -250, -250, 447, -250, 908, -250, -250, 42, -250, -250,
- 447, -250, -250, -250, -250, -250, 908, 908, -250, -250,
- -250, 908, -250, 115, -250, -250, -250, 116, 117, -250,
- 120, -250, -250, -250, -250, 35, 35, -250, -250, -250,
- -250, -26, -26, -250, 110, 109, 51, 119, -250, 144,
- 611, 23, -250, 693, 447, -250, -250, 122, -250, -250,
- 908, -250, 123, -250, -250, 693, 447, 117, 153, 126,
- 128, -250, -250, 908, -250, 127, 137, 171, -250, 130,
- 529, -250, 28, 908, 529, 447, 908, -250, -250, -250,
- 131, 117, -250, -250, -250, -250
+ 1253, -20, -266, -266, -266, 148, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ -266, -266, -266, -266, -266, -39, -266, -266, -266, -266,
+ -266, -266, -266, -18, -2, 6, 21, -61, -266, 51,
+ 1296, -266, 1370, -266, 25, -266, 1209, -266, -266, -266,
+ -266, 1370, 42, -266, -266, 50, -266, 71, 95, -266,
+ -266, -266, -266, 1296, 123, 105, -266, 9, -266, -266,
+ 974, -266, -266, 81, -266, 1296, 290, -266, -266, -266,
+ -266, 125, 1296, -13, -266, 776, 974, 99, -266, -266,
+ -266, -266, 974, 974, 974, -266, -266, -266, -266, -266,
+ 35, -266, -266, -266, 100, -6, 1040, 104, -266, 974,
+ 36, -64, -266, -21, 102, -266, -266, -266, 113, 117,
+ -51, -266, 108, -266, -266, 1296, 129, 1109, -266, 97,
+ 103, -266, 112, 114, 106, 842, 115, 116, -266, -266,
+ 39, -266, -266, -43, -266, -18, 47, -266, -266, -266,
+ -266, 374, -266, -266, -266, -266, 118, -266, -266, 908,
+ 974, -266, 120, -266, -266, -266, -266, 19, -266, -266,
+ 974, 1333, -266, -266, 974, 119, -266, -266, -266, 974,
+ 974, 974, 974, 974, 974, 974, 974, 974, 974, 974,
+ 974, 974, 974, -266, 1152, 122, -29, -266, -266, -266,
+ -266, -266, 121, -266, 974, -266, -266, 5, -266, -266,
+ 458, -266, -266, -266, -266, -266, 974, 974, -266, -266,
+ -266, 974, -266, 137, -266, -266, -266, 138, 111, -266,
+ 142, -266, -266, -266, -266, 36, 36, -266, -266, -266,
+ -266, -21, -21, -266, 113, 117, 82, -266, 974, 129,
+ -266, 175, 50, 626, 710, 38, -266, 197, 458, -266,
+ -266, 141, -266, -266, 974, 155, -266, 145, -266, -266,
+ -266, -266, 197, 121, 111, 186, 159, 160, -266, -266,
+ -266, 974, -266, 166, 176, 236, -266, 174, 542, -266,
+ 43, 974, 542, 121, 974, -266, -266, -266, 177, 111,
+ -266, -266, -266, -266
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
- -250, -250, -250, -250, -250, -250, -250, 39, -250, -250,
- -250, -250, -45, -250, -18, -250, -79, -30, -250, -250,
- -250, 38, 52, 20, -250, -63, -85, -250, -92, -71,
- 6, 9, -250, -250, -250, 132, 172, 166, 148, -250,
- -250, -246, -21, 0, 226, -24, -250, -250, 162, -66,
- -250, 45, -159, -3, -136, -249, -250, -250, -250, -36,
- 196, 46, 1, -250, -250, -13, -250, -250, -250, -250,
- -250, -250, -250, -250, -250, 211, -250, -250
+ -266, -266, -266, -266, -266, -266, -266, 85, -266, -266,
+ -266, -266, -44, -266, -15, -266, -55, -19, -266, -266,
+ -266, 72, 70, 73, -266, -66, -83, -266, -92, -73,
+ 13, 14, -266, -266, -266, 180, 206, 201, 184, -266,
+ -266, -241, -25, -30, 262, -4, 0, -266, -266, -266,
+ 143, -122, -266, 22, -145, 16, -144, -226, -266, -266,
+ -266, -17, -265, -266, -266, -54, 63, 20, -266, -266,
+ 4, -266, -266, -266, -266, -266, -266, -266, -266, -266,
+ 231, -266, -266
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
-#define YYTABLE_NINF -76
+#define YYTABLE_NINF -165
static const yytype_int16 yytable[] =
{
- 39, 165, 169, 224, 193, 121, 30, 268, 130, 31,
- 50, 170, 171, 62, 164, 63, 67, 220, 64, 268,
- 52, 178, 121, 108, 56, 71, 161, 185, 186, 6,
- 7, 287, 172, 162, 62, 287, 173, 56, 66, 194,
- 108, 51, 6, 7, 39, 207, 175, 167, 168, 54,
- 30, 73, 176, 31, 57, 58, 59, 23, 24, 130,
- 55, 81, 187, 188, 180, 65, 249, 57, 58, 59,
- 23, 24, 73, 47, 73, 226, 148, 165, 47, 48,
- 228, 217, 81, 68, 211, 212, 213, 84, 72, 85,
- 223, 232, -75, 214, 266, 183, 86, 184, 121, 290,
- 217, 76, 246, 215, 83, 217, 237, 238, 239, 240,
- 198, 124, 251, 199, 217, 126, 108, 218, 220, 217,
- 181, 182, 252, 189, 190, 73, 247, 294, 217, 260,
- 277, 255, 256, 158, 121, -26, 233, 234, 108, 108,
- 108, 108, 108, 108, 108, 108, 108, 108, 108, 293,
- 257, 174, 108, 148, 2, 3, 4, 179, 121, 241,
- 242, 267, 57, 58, 59, 235, 236, 191, 192, 195,
- 197, 200, 201, 267, 203, 272, 108, 204, 208, 205,
- 209, 282, -25, 221, 262, -20, 225, 285, 258, 259,
- -27, 291, 261, 273, 217, 271, 279, 280, 2, 3,
- 4, 165, 148, 281, 8, 9, 10, 283, 284, 286,
- 148, 295, 231, 245, 159, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 78, 82, 243,
- 160, 49, 25, 26, 125, 27, 28, 87, 29, 88,
- 89, 90, 91, 248, 244, 92, 93, 263, 292, 77,
- 148, 264, 274, 148, 148, 70, 254, 0, 0, 0,
- 0, 0, 0, 0, 94, 148, 148, 163, 0, 0,
- 0, 0, 0, 0, 0, 95, 96, 0, 97, 0,
- 148, 0, 0, 0, 148, 148, 1, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 131, 132, 133, 0,
- 134, 135, 136, 137, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 0, 0, 0, 23,
- 24, 25, 26, 138, 27, 28, 87, 29, 88, 89,
- 90, 91, 0, 0, 92, 93, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 94, 0, 0, 0, 139, 140, 0,
- 0, 0, 0, 141, 95, 96, 0, 97, 1, 2,
- 3, 4, 5, 6, 7, 8, 9, 10, 131, 132,
- 133, 0, 134, 135, 136, 137, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 0, 0,
- 0, 23, 24, 25, 26, 138, 27, 28, 87, 29,
- 88, 89, 90, 91, 0, 0, 92, 93, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 94, 0, 0, 0, 139,
- 219, 0, 0, 0, 0, 141, 95, 96, 0, 97,
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 131, 132, 133, 0, 134, 135, 136, 137, 11, 12,
+ 44, 77, 167, 163, 121, 199, 52, 220, 285, 191,
+ 68, 64, 162, 32, 33, 224, 275, 49, 65, 121,
+ 181, 66, 182, 176, 58, 50, 108, 269, 301, 6,
+ 7, 275, 64, 81, 183, 184, 217, 53, 69, 218,
+ 44, 108, 44, 207, 192, 126, 44, 73, 165, 166,
+ 249, 44, 81, 250, 59, 60, 61, 23, 24, 32,
+ 33, 159, 295, 44, 54, 178, 295, 173, 160, 185,
+ 186, 56, 199, 174, 58, 44, 146, 163, 228, 6,
+ 7, 84, 44, 85, 217, 57, 223, 256, 168, 169,
+ 86, 232, 226, 121, -75, 126, 67, 126, 217, 70,
+ 246, 211, 212, 213, 59, 60, 61, 23, 24, 170,
+ 214, 273, 255, 171, 220, 108, 298, 217, 74, -25,
+ 215, 70, 217, 179, 180, 44, 76, 44, 237, 238,
+ 239, 240, 49, 259, 260, 233, 234, 108, 108, 108,
+ 108, 108, 108, 108, 108, 108, 108, 108, 261, 302,
+ 83, 146, 2, 3, 4, 121, 59, 60, 61, 187,
+ 188, 217, 264, 124, 126, 274, 235, 236, 241, 242,
+ 156, -26, 189, 172, 195, 265, 177, 108, 190, 200,
+ 274, 279, 121, 193, 203, 201, 204, 208, 205, 290,
+ 217, -116, 221, 209, 44, 225, 248, -164, 268, 299,
+ 58, 2, 3, 4, 108, 6, 7, 8, 9, 10,
+ 146, 163, 262, 263, -27, 267, 278, 281, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 0, 0, 0, 23, 24, 25, 26, 138, 27, 28,
- 87, 29, 88, 89, 90, 91, 0, 0, 92, 93,
+ 280, 287, 288, 23, 24, 25, 26, 289, 27, 28,
+ 29, 30, 87, 31, 88, 89, 90, 91, 291, 292,
+ 92, 93, 293, 146, 146, 294, 231, 146, 146, 303,
+ 244, 243, 157, 78, 245, 82, 158, 51, 194, 94,
+ 270, 266, 146, 258, 271, 300, 282, 72, 0, 0,
+ 95, 96, 0, 97, 0, 0, 0, 0, 146, 0,
+ 0, 0, 146, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 129, 130, 131, 0, 132, 133, 134,
+ 135, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 0, 0, 0, 23, 24, 25, 26,
+ 136, 27, 28, 29, 30, 87, 31, 88, 89, 90,
+ 91, 0, 0, 92, 93, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 94, 0, 0,
- 0, 139, 0, 0, 0, 0, 0, 141, 95, 96,
- 0, 97, 1, 2, 3, 4, 5, 6, 7, 8,
- 9, 10, 131, 132, 133, 0, 134, 135, 136, 137,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 0, 0, 0, 23, 24, 25, 26, 138,
- 27, 28, 87, 29, 88, 89, 90, 91, 0, 0,
- 92, 93, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 94,
- 0, 0, 0, 76, 0, 0, 0, 0, 0, 141,
- 95, 96, 0, 97, 1, 2, 3, 4, 5, 6,
- 7, 8, 9, 10, 0, 0, 0, 0, 0, 0,
- 0, 0, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, 22, 0, 0, 0, 23, 24, 25,
- 26, 0, 27, 28, 87, 29, 88, 89, 90, 91,
- 0, 0, 92, 93, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 94, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 141, 95, 96, 0, 97, 56, 2, 3, 4,
- 0, 6, 7, 8, 9, 10, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 0, 0, 0, 23,
- 24, 25, 26, 0, 27, 28, 87, 29, 88, 89,
- 90, 91, 0, 0, 92, 93, 0, 0, 0, 0,
+ 0, 0, 94, 0, 0, 0, 137, 138, 0, 0,
+ 0, 0, 139, 95, 96, 0, 97, 1, 2, 3,
+ 4, 5, 6, 7, 8, 9, 10, 129, 130, 131,
+ 0, 132, 133, 134, 135, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 0, 0, 0,
+ 23, 24, 25, 26, 136, 27, 28, 29, 30, 87,
+ 31, 88, 89, 90, 91, 0, 0, 92, 93, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 94, 2, 3, 4, 0, 0, 0,
- 8, 9, 10, 0, 95, 96, 0, 97, 0, 0,
- 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 0, 0, 0, 0, 0, 25, 26,
- 0, 27, 28, 87, 29, 88, 89, 90, 91, 0,
+ 0, 0, 0, 0, 0, 0, 94, 0, 0, 0,
+ 137, 219, 0, 0, 0, 0, 139, 95, 96, 0,
+ 97, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 129, 130, 131, 0, 132, 133, 134, 135, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 0, 0, 0, 23, 24, 25, 26, 136, 27,
+ 28, 29, 30, 87, 31, 88, 89, 90, 91, 0,
0, 92, 93, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 94, 2, 3, 4, 0, 0, 0, 8, 9, 10,
- 206, 95, 96, 0, 97, 0, 0, 0, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 0, 0, 0, 0, 0, 25, 26, 0, 27, 28,
- 87, 29, 88, 89, 90, 91, 0, 0, 92, 93,
+ 94, 0, 0, 0, 137, 0, 0, 0, 0, 0,
+ 139, 95, 96, 0, 97, 1, 2, 3, 4, 5,
+ 6, 7, 8, 9, 10, 129, 130, 131, 0, 132,
+ 133, 134, 135, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 0, 0, 0, 23, 24,
+ 25, 26, 136, 27, 28, 29, 30, 87, 31, 88,
+ 89, 90, 91, 0, 0, 92, 93, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 94, 0, 0,
- 222, 0, 0, 0, 0, 0, 0, 0, 95, 96,
- 0, 97, 2, 3, 4, 0, 0, 0, 8, 9,
- 10, 0, 0, 0, 0, 0, 0, 0, 0, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 0, 0, 0, 0, 0, 25, 26, 0, 27,
- 28, 87, 29, 88, 89, 90, 91, 0, 0, 92,
+ 0, 0, 0, 0, 94, 0, 0, 0, 76, 0,
+ 0, 0, 0, 0, 139, 95, 96, 0, 97, 1,
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 129,
+ 130, 131, 0, 132, 133, 134, 135, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
+ 0, 0, 23, 24, 25, 26, 136, 27, 28, 29,
+ 30, 87, 31, 88, 89, 90, 91, 0, 0, 92,
93, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 94, 2,
- 3, 4, 0, 0, 0, 8, 9, 10, 0, 95,
- 96, 0, 97, 0, 0, 0, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 0, 0,
- 0, 0, 0, 25, 177, 0, 27, 28, 87, 29,
- 88, 89, 90, 91, 0, 0, 92, 93, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 94, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 139, 95,
+ 96, 0, 97, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 0, 0, 0, 0, 0, 0, 0,
+ 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 0, 0, 0, 23, 24, 25, 26,
+ 0, 27, 28, 29, 30, 87, 31, 88, 89, 90,
+ 91, 0, 0, 92, 93, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 94, 2, 3, 4, 0,
- 0, 0, 8, 9, 10, 0, 95, 96, 0, 97,
- 0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
+ 0, 0, 94, 0, 0, 0, 8, 9, 10, 0,
+ 0, 0, 139, 95, 96, 0, 97, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
+ 0, 0, 0, 0, 25, 26, 0, 27, 28, 29,
+ 30, 87, 31, 88, 89, 90, 91, 0, 0, 92,
+ 93, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 94, 0,
+ 0, 161, 8, 9, 10, 0, 0, 0, 0, 95,
+ 96, 0, 97, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 0, 0, 0, 0, 0,
- 25, 26, 0, 27, 28, 0, 29, 2, 3, 4,
- 0, 0, 0, 8, 9, 10, 0, 0, 0, 0,
- 0, 0, 0, 0, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 0, 129, 0, 0,
- 0, 25, 26, 0, 27, 28, 0, 29, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 69, 0,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 0, 0, 0, 0, 0, 0, 0, 196, 11,
+ 25, 26, 0, 27, 28, 29, 30, 87, 31, 88,
+ 89, 90, 91, 0, 0, 92, 93, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 94, 0, 0, 0, 8, 9,
+ 10, 0, 0, 0, 206, 95, 96, 0, 97, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 22, 0, 0, 0, 23, 24, 25, 26, 0, 27,
- 28, 0, 29, 2, 3, 4, 0, 0, 0, 8,
- 9, 10, 0, 0, 0, 0, 0, 0, 0, 0,
+ 22, 0, 0, 0, 0, 0, 25, 26, 0, 27,
+ 28, 29, 30, 87, 31, 88, 89, 90, 91, 0,
+ 0, 92, 93, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 94, 0, 0, 222, 8, 9, 10, 0, 0, 0,
+ 0, 95, 96, 0, 97, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 0, 0, 0,
+ 0, 0, 25, 26, 0, 27, 28, 29, 30, 87,
+ 31, 88, 89, 90, 91, 0, 0, 92, 93, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 94, 0, 0, 0,
+ 8, 9, 10, 0, 0, 0, 0, 95, 96, 0,
+ 97, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 0, 0, 0, 0, 0, 25, 175,
+ 0, 27, 28, 29, 30, 87, 31, 88, 89, 90,
+ 91, 0, 0, 92, 93, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 94, 2, 3, 4, 0, 0, 0, 8,
+ 9, 10, 0, 95, 96, 0, 97, 0, 0, 0,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 0, 0, 0, 0, 0, 25, 26, 0,
- 27, 28, 229, 29, 0, 0, 0, 230, 1, 2,
- 3, 4, 5, 6, 7, 8, 9, 10, 0, 0,
- 0, 0, 0, 0, 0, 0, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 0, 0,
- 0, 23, 24, 25, 26, 0, 27, 28, 0, 29,
+ 27, 28, 29, 30, 0, 31, 2, 3, 4, 0,
+ 0, 0, 8, 9, 10, 0, 0, 0, 0, 0,
+ 0, 0, 0, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 0, 198, 0, 0, 0,
+ 25, 26, 0, 27, 28, 29, 30, 0, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 71,
+ 0, 0, 1, 2, 3, 4, 5, 6, 7, 8,
+ 9, 10, 0, 0, 0, 0, 0, 0, 0, 247,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 0, 0, 0, 23, 24, 25, 26, 0,
+ 27, 28, 29, 30, 0, 31, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 0, 0, 0, 23,
+ 24, 25, 26, 0, 27, 28, 29, 30, 0, 31,
2, 3, 4, 0, 0, 0, 8, 9, 10, 0,
0, 0, 0, 0, 0, 0, 0, 11, 12, 13,
14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
- 8, 9, 10, 0, 25, 26, 0, 27, 28, 0,
- 29, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 0, 0, 0, 0, 25, 26, 0, 27, 28, 29,
+ 30, 0, 31, 8, 9, 10, 0, 0, 0, 0,
+ 0, 0, 0, 0, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, 22, 0, 0, 0, 0,
+ 0, 25, 26, 0, 27, 28, 29, 30, 229, 31,
+ 8, 9, 10, 230, 0, 0, 0, 0, 0, 0,
+ 0, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 0, 0, 0, 0, 0, 25, 26,
- 0, 27, 28, 0, 29
+ 0, 27, 28, 29, 30, 0, 31
};
static const yytype_int16 yycheck[] =
{
- 0, 86, 94, 162, 58, 68, 0, 253, 74, 0,
- 43, 51, 52, 34, 85, 77, 40, 153, 80, 265,
- 80, 106, 85, 68, 3, 49, 72, 53, 54, 8,
- 9, 280, 72, 79, 55, 284, 76, 3, 38, 93,
- 85, 74, 8, 9, 44, 137, 71, 92, 93, 71,
- 44, 51, 77, 44, 33, 34, 35, 36, 37, 125,
- 77, 61, 88, 89, 109, 43, 202, 33, 34, 35,
- 36, 37, 72, 37, 74, 71, 76, 162, 37, 43,
- 172, 77, 82, 72, 60, 61, 62, 70, 74, 72,
- 161, 176, 71, 69, 71, 82, 79, 84, 161, 71,
- 77, 74, 194, 79, 43, 77, 185, 186, 187, 188,
- 77, 80, 204, 80, 77, 43, 161, 80, 254, 77,
- 85, 86, 80, 55, 56, 125, 197, 286, 77, 78,
- 266, 216, 217, 43, 197, 70, 181, 182, 183, 184,
- 185, 186, 187, 188, 189, 190, 191, 192, 193, 285,
- 221, 71, 197, 153, 4, 5, 6, 70, 221, 189,
- 190, 253, 33, 34, 35, 183, 184, 57, 59, 73,
- 72, 80, 80, 265, 70, 260, 221, 70, 70, 80,
- 75, 273, 70, 72, 40, 71, 73, 16, 73, 73,
- 70, 283, 73, 70, 77, 73, 43, 71, 4, 5,
- 6, 286, 202, 75, 10, 11, 12, 80, 71, 79,
- 210, 80, 173, 193, 82, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 31, 32, 55, 62, 191,
- 82, 5, 38, 39, 72, 41, 42, 43, 44, 45,
- 46, 47, 48, 198, 192, 51, 52, 250, 284, 53,
- 250, 250, 265, 253, 254, 44, 210, -1, -1, -1,
- -1, -1, -1, -1, 70, 265, 266, 73, -1, -1,
- -1, -1, -1, -1, -1, 81, 82, -1, 84, -1,
- 280, -1, -1, -1, 284, 285, 3, 4, 5, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, -1,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, -1, -1, -1, 36,
- 37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
- 47, 48, -1, -1, 51, 52, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 70, -1, -1, -1, 74, 75, -1,
- -1, -1, -1, 80, 81, 82, -1, 84, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, -1, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
- -1, 36, 37, 38, 39, 40, 41, 42, 43, 44,
- 45, 46, 47, 48, -1, -1, 51, 52, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 70, -1, -1, -1, 74,
- 75, -1, -1, -1, -1, 80, 81, 82, -1, 84,
- 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, -1, 17, 18, 19, 20, 21, 22,
+ 0, 55, 94, 86, 70, 127, 45, 151, 273, 60,
+ 40, 36, 85, 0, 0, 160, 257, 37, 79, 85,
+ 84, 82, 86, 106, 3, 45, 70, 253, 293, 8,
+ 9, 272, 57, 63, 55, 56, 79, 76, 42, 82,
+ 40, 85, 42, 135, 95, 75, 46, 51, 92, 93,
+ 79, 51, 82, 82, 33, 34, 35, 36, 37, 46,
+ 46, 74, 288, 63, 82, 109, 292, 73, 81, 90,
+ 91, 73, 194, 79, 3, 75, 76, 160, 170, 8,
+ 9, 72, 82, 74, 79, 79, 159, 82, 53, 54,
+ 81, 174, 73, 159, 73, 125, 45, 127, 79, 74,
+ 192, 62, 63, 64, 33, 34, 35, 36, 37, 74,
+ 71, 73, 204, 78, 258, 159, 73, 79, 76, 72,
+ 81, 74, 79, 87, 88, 125, 76, 127, 183, 184,
+ 185, 186, 37, 216, 217, 179, 180, 181, 182, 183,
+ 184, 185, 186, 187, 188, 189, 190, 191, 221, 294,
+ 45, 151, 4, 5, 6, 221, 33, 34, 35, 57,
+ 58, 79, 80, 82, 194, 257, 181, 182, 187, 188,
+ 45, 72, 59, 73, 45, 248, 72, 221, 61, 82,
+ 272, 264, 248, 75, 72, 82, 72, 72, 82, 281,
+ 79, 72, 74, 77, 194, 75, 74, 76, 252, 291,
+ 3, 4, 5, 6, 248, 8, 9, 10, 11, 12,
+ 210, 294, 75, 75, 72, 40, 75, 72, 21, 22,
23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- -1, -1, -1, 36, 37, 38, 39, 40, 41, 42,
- 43, 44, 45, 46, 47, 48, -1, -1, 51, 52,
+ 75, 45, 73, 36, 37, 38, 39, 77, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 82, 73,
+ 53, 54, 16, 253, 254, 81, 171, 257, 258, 82,
+ 190, 189, 82, 57, 191, 64, 82, 5, 125, 72,
+ 254, 249, 272, 210, 254, 292, 272, 46, -1, -1,
+ 83, 84, -1, 86, -1, -1, -1, -1, 288, -1,
+ -1, -1, 292, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, -1, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, -1, -1, -1, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, -1, -1, 53, 54, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 70, -1, -1,
- -1, 74, -1, -1, -1, -1, -1, 80, 81, 82,
- -1, 84, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, -1, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
- 31, 32, -1, -1, -1, 36, 37, 38, 39, 40,
- 41, 42, 43, 44, 45, 46, 47, 48, -1, -1,
- 51, 52, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, 70,
- -1, -1, -1, 74, -1, -1, -1, -1, -1, 80,
- 81, 82, -1, 84, 3, 4, 5, 6, 7, 8,
- 9, 10, 11, 12, -1, -1, -1, -1, -1, -1,
- -1, -1, 21, 22, 23, 24, 25, 26, 27, 28,
- 29, 30, 31, 32, -1, -1, -1, 36, 37, 38,
- 39, -1, 41, 42, 43, 44, 45, 46, 47, 48,
- -1, -1, 51, 52, -1, -1, -1, -1, -1, -1,
+ -1, -1, 72, -1, -1, -1, 76, 77, -1, -1,
+ -1, -1, 82, 83, 84, -1, 86, 3, 4, 5,
+ 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ -1, 17, 18, 19, 20, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, -1, -1, 53, 54, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 70, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, 80, 81, 82, -1, 84, 3, 4, 5, 6,
- -1, 8, 9, 10, 11, 12, -1, -1, -1, -1,
- -1, -1, -1, -1, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, -1, -1, -1, 36,
- 37, 38, 39, -1, 41, 42, 43, 44, 45, 46,
- 47, 48, -1, -1, 51, 52, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
+ 76, 77, -1, -1, -1, -1, 82, 83, 84, -1,
+ 86, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, -1, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, -1, -1, -1, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, -1,
+ -1, 53, 54, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 72, -1, -1, -1, 76, -1, -1, -1, -1, -1,
+ 82, 83, 84, -1, 86, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, -1, 17,
+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -1, -1, -1, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, -1, -1, 53, 54, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, 70, 4, 5, 6, -1, -1, -1,
- 10, 11, 12, -1, 81, 82, -1, 84, -1, -1,
+ -1, -1, -1, -1, 72, -1, -1, -1, 76, -1,
+ -1, -1, -1, -1, 82, 83, 84, -1, 86, 3,
+ 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, -1, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
+ -1, -1, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, -1, -1, 53,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 72, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 82, 83,
+ 84, -1, 86, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, -1, -1, -1, -1, -1, -1, -1,
-1, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, -1, -1, -1, -1, -1, 38, 39,
- -1, 41, 42, 43, 44, 45, 46, 47, 48, -1,
- -1, 51, 52, -1, -1, -1, -1, -1, -1, -1,
+ 30, 31, 32, -1, -1, -1, 36, 37, 38, 39,
+ -1, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, -1, -1, 53, 54, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 70, 4, 5, 6, -1, -1, -1, 10, 11, 12,
- 80, 81, 82, -1, 84, -1, -1, -1, 21, 22,
- 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
- -1, -1, -1, -1, -1, 38, 39, -1, 41, 42,
- 43, 44, 45, 46, 47, 48, -1, -1, 51, 52,
+ -1, -1, 72, -1, -1, -1, 10, 11, 12, -1,
+ -1, -1, 82, 83, 84, -1, 86, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
+ -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, -1, -1, 53,
+ 54, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, 72, -1,
+ -1, 75, 10, 11, 12, -1, -1, -1, -1, 83,
+ 84, -1, 86, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
+ 38, 39, -1, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, -1, -1, 53, 54, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, 70, -1, -1,
- 73, -1, -1, -1, -1, -1, -1, -1, 81, 82,
- -1, 84, 4, 5, 6, -1, -1, -1, 10, 11,
- 12, -1, -1, -1, -1, -1, -1, -1, -1, 21,
+ -1, -1, -1, -1, 72, -1, -1, -1, 10, 11,
+ 12, -1, -1, -1, 82, 83, 84, -1, 86, 21,
22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, -1, -1, -1, -1, -1, 38, 39, -1, 41,
- 42, 43, 44, 45, 46, 47, 48, -1, -1, 51,
- 52, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 70, 4,
- 5, 6, -1, -1, -1, 10, 11, 12, -1, 81,
- 82, -1, 84, -1, -1, -1, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
- -1, -1, -1, 38, 39, -1, 41, 42, 43, 44,
- 45, 46, 47, 48, -1, -1, 51, 52, -1, -1,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, -1,
+ -1, 53, 54, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, 70, 4, 5, 6, -1,
- -1, -1, 10, 11, 12, -1, 81, 82, -1, 84,
- -1, -1, -1, 21, 22, 23, 24, 25, 26, 27,
- 28, 29, 30, 31, 32, -1, -1, -1, -1, -1,
- 38, 39, -1, 41, 42, -1, 44, 4, 5, 6,
- -1, -1, -1, 10, 11, 12, -1, -1, -1, -1,
- -1, -1, -1, -1, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 32, -1, 75, -1, -1,
- -1, 38, 39, -1, 41, 42, -1, 44, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, 0, -1,
- -1, 3, 4, 5, 6, 7, 8, 9, 10, 11,
- 12, -1, -1, -1, -1, -1, -1, -1, 75, 21,
- 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
- 32, -1, -1, -1, 36, 37, 38, 39, -1, 41,
- 42, -1, 44, 4, 5, 6, -1, -1, -1, 10,
- 11, 12, -1, -1, -1, -1, -1, -1, -1, -1,
+ 72, -1, -1, 75, 10, 11, 12, -1, -1, -1,
+ -1, 83, 84, -1, 86, 21, 22, 23, 24, 25,
+ 26, 27, 28, 29, 30, 31, 32, -1, -1, -1,
+ -1, -1, 38, 39, -1, 41, 42, 43, 44, 45,
+ 46, 47, 48, 49, 50, -1, -1, 53, 54, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, 72, -1, -1, -1,
+ 10, 11, 12, -1, -1, -1, -1, 83, 84, -1,
+ 86, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 30, 31, 32, -1, -1, -1, -1, -1, 38, 39,
+ -1, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, -1, -1, 53, 54, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 72, 4, 5, 6, -1, -1, -1, 10,
+ 11, 12, -1, 83, 84, -1, 86, -1, -1, -1,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, -1, -1, -1, -1, -1, 38, 39, -1,
- 41, 42, 43, 44, -1, -1, -1, 48, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, -1, -1,
- -1, -1, -1, -1, -1, -1, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, -1, -1,
- -1, 36, 37, 38, 39, -1, 41, 42, -1, 44,
+ 41, 42, 43, 44, -1, 46, 4, 5, 6, -1,
+ -1, -1, 10, 11, 12, -1, -1, -1, -1, -1,
+ -1, -1, -1, 21, 22, 23, 24, 25, 26, 27,
+ 28, 29, 30, 31, 32, -1, 77, -1, -1, -1,
+ 38, 39, -1, 41, 42, 43, 44, -1, 46, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, 0,
+ -1, -1, 3, 4, 5, 6, 7, 8, 9, 10,
+ 11, 12, -1, -1, -1, -1, -1, -1, -1, 77,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, -1, -1, -1, 36, 37, 38, 39, -1,
+ 41, 42, 43, 44, -1, 46, 3, 4, 5, 6,
+ 7, 8, 9, 10, 11, 12, -1, -1, -1, -1,
+ -1, -1, -1, -1, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, -1, -1, -1, 36,
+ 37, 38, 39, -1, 41, 42, 43, 44, -1, 46,
4, 5, 6, -1, -1, -1, 10, 11, 12, -1,
-1, -1, -1, -1, -1, -1, -1, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31, 32, -1,
- 10, 11, 12, -1, 38, 39, -1, 41, 42, -1,
- 44, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ -1, -1, -1, -1, 38, 39, -1, 41, 42, 43,
+ 44, -1, 46, 10, 11, 12, -1, -1, -1, -1,
+ -1, -1, -1, -1, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, -1, -1, -1, -1,
+ -1, 38, 39, -1, 41, 42, 43, 44, 45, 46,
+ 10, 11, 12, 50, -1, -1, -1, -1, -1, -1,
+ -1, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, -1, -1, -1, -1, -1, 38, 39,
- -1, 41, 42, -1, 44
+ -1, 41, 42, 43, 44, -1, 46
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
@@ -1260,34 +1302,35 @@ static const yytype_uint8 yystos[] =
{
0, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 30, 31, 32, 36, 37, 38, 39, 41, 42, 44,
- 124, 125, 126, 127, 128, 133, 134, 135, 136, 137,
- 138, 139, 140, 141, 168, 169, 170, 37, 43, 138,
- 43, 74, 80, 171, 71, 77, 3, 33, 34, 35,
- 130, 131, 136, 77, 80, 43, 137, 139, 72, 0,
- 169, 139, 74, 137, 142, 143, 74, 154, 130, 129,
- 132, 137, 131, 43, 70, 72, 79, 43, 45, 46,
- 47, 48, 51, 52, 70, 81, 82, 84, 95, 96,
- 97, 99, 100, 101, 102, 103, 104, 105, 106, 107,
- 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
- 118, 119, 123, 137, 80, 142, 43, 144, 145, 75,
- 143, 13, 14, 15, 17, 18, 19, 20, 40, 74,
- 75, 80, 106, 119, 120, 122, 124, 125, 137, 147,
- 148, 149, 150, 155, 156, 157, 160, 167, 43, 129,
- 132, 72, 79, 73, 123, 120, 146, 106, 106, 122,
- 51, 52, 72, 76, 71, 71, 77, 39, 120, 70,
- 106, 85, 86, 82, 84, 53, 54, 88, 89, 55,
- 56, 57, 59, 58, 93, 73, 75, 72, 77, 80,
- 80, 80, 162, 70, 70, 80, 80, 122, 70, 75,
- 151, 60, 61, 62, 69, 79, 121, 77, 80, 75,
- 148, 72, 73, 123, 146, 73, 71, 98, 122, 43,
- 48, 101, 120, 106, 106, 108, 108, 110, 110, 110,
- 110, 111, 111, 115, 116, 117, 122, 123, 145, 148,
- 163, 122, 80, 161, 155, 120, 120, 123, 73, 73,
- 78, 73, 40, 147, 156, 164, 71, 122, 135, 159,
- 152, 73, 120, 70, 159, 165, 166, 148, 158, 43,
- 71, 75, 122, 80, 71, 16, 79, 149, 153, 154,
- 71, 122, 153, 148, 146, 80
+ 30, 31, 32, 36, 37, 38, 39, 41, 42, 43,
+ 44, 46, 126, 127, 128, 129, 130, 135, 136, 137,
+ 138, 139, 140, 141, 142, 143, 175, 176, 177, 37,
+ 45, 140, 45, 76, 82, 178, 73, 79, 3, 33,
+ 34, 35, 132, 133, 138, 79, 82, 45, 139, 141,
+ 74, 0, 176, 141, 76, 145, 76, 161, 132, 131,
+ 134, 139, 133, 45, 72, 74, 81, 45, 47, 48,
+ 49, 50, 53, 54, 72, 83, 84, 86, 97, 98,
+ 99, 101, 102, 103, 104, 105, 106, 107, 108, 109,
+ 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
+ 120, 121, 125, 142, 82, 144, 139, 146, 147, 13,
+ 14, 15, 17, 18, 19, 20, 40, 76, 77, 82,
+ 108, 121, 122, 124, 126, 127, 142, 151, 152, 153,
+ 154, 162, 163, 164, 167, 174, 45, 131, 134, 74,
+ 81, 75, 125, 122, 150, 108, 108, 124, 53, 54,
+ 74, 78, 73, 73, 79, 39, 122, 72, 108, 87,
+ 88, 84, 86, 55, 56, 90, 91, 57, 58, 59,
+ 61, 60, 95, 75, 146, 45, 148, 149, 77, 147,
+ 82, 82, 169, 72, 72, 82, 82, 124, 72, 77,
+ 155, 62, 63, 64, 71, 81, 123, 79, 82, 77,
+ 152, 74, 75, 125, 150, 75, 73, 100, 124, 45,
+ 50, 103, 122, 108, 108, 110, 110, 112, 112, 112,
+ 112, 113, 113, 117, 118, 119, 124, 77, 74, 79,
+ 82, 158, 159, 160, 170, 124, 82, 168, 162, 122,
+ 122, 125, 75, 75, 80, 125, 149, 40, 161, 153,
+ 151, 163, 171, 73, 124, 137, 166, 156, 75, 122,
+ 75, 72, 166, 172, 173, 158, 165, 45, 73, 77,
+ 124, 82, 73, 16, 81, 153, 157, 161, 73, 124,
+ 157, 158, 150, 82
};
#define yyerrok (yyerrstatus = 0)
@@ -1361,7 +1404,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
-# if YYLTYPE_IS_TRIVIAL
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
@@ -2614,13 +2657,6 @@ yyreduce:
//
// Constructor
//
- if ((yyvsp[(1) - (1)].interm.type).array) {
- // Constructors for arrays are not allowed.
- context->error((yyvsp[(1) - (1)].interm.type).line, "cannot construct this type", "array", "");
- context->recover();
- (yyvsp[(1) - (1)].interm.type).setArray(false);
- }
-
TOperator op = EOpNull;
if ((yyvsp[(1) - (1)].interm.type).userDef) {
op = EOpConstructStruct;
@@ -3119,6 +3155,8 @@ yyreduce:
prototype->setOp(EOpPrototype);
(yyval.interm.intermNode) = prototype;
+
+ context->symbolTable.pop();
;}
break;
@@ -3172,7 +3210,9 @@ yyreduce:
(yyval.interm).function = (yyvsp[(1) - (2)].interm.function);
(yyval.interm).line = (yyvsp[(2) - (2)].lex).line;
- context->symbolTable.insert(*(yyval.interm).function);
+ // We're at the inner scope level of the function's arguments and body statement.
+ // Add the function prototype to the surrounding scope instead.
+ context->symbolTable.getOuterLevel()->insert(*(yyval.interm).function);
;}
break;
@@ -3240,6 +3280,8 @@ yyreduce:
TType type((yyvsp[(1) - (3)].interm.type));
function = new TFunction((yyvsp[(2) - (3)].lex).string, type);
(yyval.interm.function) = function;
+
+ context->symbolTable.push();
;}
break;
@@ -3360,20 +3402,20 @@ yyreduce:
{
(yyval.interm) = (yyvsp[(1) - (1)].interm);
-
- if ((yyval.interm).type.precision == EbpUndefined) {
- (yyval.interm).type.precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm).type.type);
- if (context->precisionErrorCheck((yyvsp[(1) - (1)].interm).line, (yyval.interm).type.precision, (yyvsp[(1) - (1)].interm).type.type)) {
- context->recover();
- }
- }
;}
break;
case 92:
{
- (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, context->intermediate.addSymbol(0, *(yyvsp[(3) - (3)].lex).string, TType((yyvsp[(1) - (3)].interm).type), (yyvsp[(3) - (3)].lex).line), (yyvsp[(3) - (3)].lex).line);
+ if ((yyvsp[(1) - (3)].interm).type.type == EbtInvariant && !(yyvsp[(3) - (3)].lex).symbol)
+ {
+ context->error((yyvsp[(3) - (3)].lex).line, "undeclared identifier declared as invariant", (yyvsp[(3) - (3)].lex).string->c_str(), "");
+ context->recover();
+ }
+
+ TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(3) - (3)].lex).string, TType((yyvsp[(1) - (3)].interm).type), (yyvsp[(3) - (3)].lex).line);
+ (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (3)].interm).intermNode, symbol, (yyvsp[(3) - (3)].lex).line);
if (context->structQualifierErrorCheck((yyvsp[(3) - (3)].lex).line, (yyval.interm).type))
context->recover();
@@ -3381,8 +3423,11 @@ yyreduce:
if (context->nonInitConstErrorCheck((yyvsp[(3) - (3)].lex).line, *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type))
context->recover();
- if (context->nonInitErrorCheck((yyvsp[(3) - (3)].lex).line, *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type))
+ TVariable* variable = 0;
+ if (context->nonInitErrorCheck((yyvsp[(3) - (3)].lex).line, *(yyvsp[(3) - (3)].lex).string, (yyval.interm).type, variable))
context->recover();
+ if (symbol && variable)
+ symbol->setId(variable->getUniqueId());
;}
break;
@@ -3426,12 +3471,12 @@ yyreduce:
if (context->arraySizeErrorCheck((yyvsp[(4) - (6)].lex).line, (yyvsp[(5) - (6)].interm.intermTypedNode), size))
context->recover();
(yyvsp[(1) - (6)].interm).type.setArray(true, size);
- TVariable* variable;
+ TVariable* variable = 0;
if (context->arrayErrorCheck((yyvsp[(4) - (6)].lex).line, *(yyvsp[(3) - (6)].lex).string, (yyvsp[(1) - (6)].interm).type, variable))
context->recover();
TType type = TType((yyvsp[(1) - (6)].interm).type);
type.setArraySize(size);
- (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (6)].interm).intermNode, context->intermediate.addSymbol(0, *(yyvsp[(3) - (6)].lex).string, type, (yyvsp[(3) - (6)].lex).line), (yyvsp[(3) - (6)].lex).line);
+ (yyval.interm).intermAggregate = context->intermediate.growAggregate((yyvsp[(1) - (6)].interm).intermNode, context->intermediate.addSymbol(variable ? variable->getUniqueId() : 0, *(yyvsp[(3) - (6)].lex).string, type, (yyvsp[(3) - (6)].lex).line), (yyvsp[(3) - (6)].lex).line);
}
;}
break;
@@ -3471,7 +3516,8 @@ yyreduce:
case 97:
{
- (yyval.interm).intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).string, TType((yyvsp[(1) - (2)].interm.type)), (yyvsp[(2) - (2)].lex).line), (yyvsp[(2) - (2)].lex).line);
+ TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).string, TType((yyvsp[(1) - (2)].interm.type)), (yyvsp[(2) - (2)].lex).line);
+ (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (2)].lex).line);
if (context->structQualifierErrorCheck((yyvsp[(2) - (2)].lex).line, (yyval.interm).type))
context->recover();
@@ -3481,32 +3527,23 @@ yyreduce:
(yyval.interm).type = (yyvsp[(1) - (2)].interm.type);
- if (context->nonInitErrorCheck((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string, (yyval.interm).type))
+ TVariable* variable = 0;
+ if (context->nonInitErrorCheck((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string, (yyval.interm).type, variable))
context->recover();
+ if (variable && symbol)
+ symbol->setId(variable->getUniqueId());
;}
break;
case 98:
{
- (yyval.interm).intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0, *(yyvsp[(2) - (4)].lex).string, TType((yyvsp[(1) - (4)].interm.type)), (yyvsp[(2) - (4)].lex).line), (yyvsp[(2) - (4)].lex).line);
-
- if (context->structQualifierErrorCheck((yyvsp[(2) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type)))
- context->recover();
-
- if (context->nonInitConstErrorCheck((yyvsp[(2) - (4)].lex).line, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type)))
- context->recover();
+ context->error((yyvsp[(2) - (4)].lex).line, "unsized array declarations not supported", (yyvsp[(2) - (4)].lex).string->c_str(), "");
+ context->recover();
+ TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (4)].lex).string, TType((yyvsp[(1) - (4)].interm.type)), (yyvsp[(2) - (4)].lex).line);
+ (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (4)].lex).line);
(yyval.interm).type = (yyvsp[(1) - (4)].interm.type);
-
- if (context->arrayTypeErrorCheck((yyvsp[(3) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type)) || context->arrayQualifierErrorCheck((yyvsp[(3) - (4)].lex).line, (yyvsp[(1) - (4)].interm.type)))
- context->recover();
- else {
- (yyvsp[(1) - (4)].interm.type).setArray(true);
- TVariable* variable;
- if (context->arrayErrorCheck((yyvsp[(3) - (4)].lex).line, *(yyvsp[(2) - (4)].lex).string, (yyvsp[(1) - (4)].interm.type), variable))
- context->recover();
- }
;}
break;
@@ -3518,7 +3555,8 @@ yyreduce:
if (context->arraySizeErrorCheck((yyvsp[(2) - (5)].lex).line, (yyvsp[(4) - (5)].interm.intermTypedNode), size))
context->recover();
type.setArraySize(size);
- (yyval.interm).intermAggregate = context->intermediate.makeAggregate(context->intermediate.addSymbol(0, *(yyvsp[(2) - (5)].lex).string, type, (yyvsp[(2) - (5)].lex).line), (yyvsp[(2) - (5)].lex).line);
+ TIntermSymbol* symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (5)].lex).string, type, (yyvsp[(2) - (5)].lex).line);
+ (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (5)].lex).line);
if (context->structQualifierErrorCheck((yyvsp[(2) - (5)].lex).line, (yyvsp[(1) - (5)].interm.type)))
context->recover();
@@ -3536,9 +3574,11 @@ yyreduce:
context->recover();
(yyvsp[(1) - (5)].interm.type).setArray(true, size);
- TVariable* variable;
+ TVariable* variable = 0;
if (context->arrayErrorCheck((yyvsp[(3) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string, (yyvsp[(1) - (5)].interm.type), variable))
context->recover();
+ if (variable && symbol)
+ symbol->setId(variable->getUniqueId());
}
;}
break;
@@ -3571,8 +3611,21 @@ yyreduce:
{
VERTEX_ONLY("invariant declaration", (yyvsp[(1) - (2)].lex).line);
- (yyval.interm).qualifier = EvqInvariantVaryingOut;
- (yyval.interm).intermAggregate = 0;
+ if (context->globalErrorCheck((yyvsp[(1) - (2)].lex).line, context->symbolTable.atGlobalLevel(), "invariant varying"))
+ context->recover();
+ (yyval.interm).type.setBasic(EbtInvariant, EvqInvariantVaryingOut, (yyvsp[(2) - (2)].lex).line);
+ if (!(yyvsp[(2) - (2)].lex).symbol)
+ {
+ context->error((yyvsp[(2) - (2)].lex).line, "undeclared identifier declared as invariant", (yyvsp[(2) - (2)].lex).string->c_str(), "");
+ context->recover();
+
+ (yyval.interm).intermAggregate = 0;
+ }
+ else
+ {
+ TIntermSymbol *symbol = context->intermediate.addSymbol(0, *(yyvsp[(2) - (2)].lex).string, TType((yyval.interm).type), (yyvsp[(2) - (2)].lex).line);
+ (yyval.interm).intermAggregate = context->intermediate.makeAggregate(symbol, (yyvsp[(2) - (2)].lex).line);
+ }
;}
break;
@@ -3667,6 +3720,13 @@ yyreduce:
{
(yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
+
+ if ((yyval.interm.type).precision == EbpUndefined) {
+ (yyval.interm.type).precision = context->symbolTable.getDefaultPrecision((yyvsp[(1) - (1)].interm.type).type);
+ if (context->precisionErrorCheck((yyvsp[(1) - (1)].interm.type).line, (yyval.interm.type).precision, (yyvsp[(1) - (1)].interm.type).type)) {
+ context->recover();
+ }
+ }
;}
break;
@@ -3886,13 +3946,39 @@ yyreduce:
case 134:
{
+ if (!context->supportsExtension("GL_OES_EGL_image_external")) {
+ context->error((yyvsp[(1) - (1)].lex).line, "unsupported type", "samplerExternalOES", "");
+ context->recover();
+ }
+ FRAG_VERT_ONLY("samplerExternalOES", (yyvsp[(1) - (1)].lex).line);
+ TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+ (yyval.interm.type).setBasic(EbtSamplerExternalOES, qual, (yyvsp[(1) - (1)].lex).line);
+ ;}
+ break;
+
+ case 135:
+
+ {
+ if (!context->supportsExtension("GL_ARB_texture_rectangle")) {
+ context->error((yyvsp[(1) - (1)].lex).line, "unsupported type", "sampler2DRect", "");
+ context->recover();
+ }
+ FRAG_VERT_ONLY("sampler2DRect", (yyvsp[(1) - (1)].lex).line);
+ TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+ (yyval.interm.type).setBasic(EbtSampler2DRect, qual, (yyvsp[(1) - (1)].lex).line);
+ ;}
+ break;
+
+ case 136:
+
+ {
FRAG_VERT_ONLY("struct", (yyvsp[(1) - (1)].interm.type).line);
(yyval.interm.type) = (yyvsp[(1) - (1)].interm.type);
(yyval.interm.type).qualifier = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
;}
break;
- case 135:
+ case 137:
{
//
@@ -3906,40 +3992,52 @@ yyreduce:
;}
break;
- case 136:
+ case 138:
+
+ { if (context->enterStructDeclaration((yyvsp[(2) - (3)].lex).line, *(yyvsp[(2) - (3)].lex).string)) context->recover(); ;}
+ break;
+
+ case 139:
{
- if (context->reservedErrorCheck((yyvsp[(2) - (5)].lex).line, *(yyvsp[(2) - (5)].lex).string))
+ if (context->reservedErrorCheck((yyvsp[(2) - (6)].lex).line, *(yyvsp[(2) - (6)].lex).string))
context->recover();
- TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), *(yyvsp[(2) - (5)].lex).string);
- TVariable* userTypeDef = new TVariable((yyvsp[(2) - (5)].lex).string, *structure, true);
+ TType* structure = new TType((yyvsp[(5) - (6)].interm.typeList), *(yyvsp[(2) - (6)].lex).string);
+ TVariable* userTypeDef = new TVariable((yyvsp[(2) - (6)].lex).string, *structure, true);
if (! context->symbolTable.insert(*userTypeDef)) {
- context->error((yyvsp[(2) - (5)].lex).line, "redefinition", (yyvsp[(2) - (5)].lex).string->c_str(), "struct");
+ context->error((yyvsp[(2) - (6)].lex).line, "redefinition", (yyvsp[(2) - (6)].lex).string->c_str(), "struct");
context->recover();
}
- (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (5)].lex).line);
+ (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (6)].lex).line);
(yyval.interm.type).userDef = structure;
+ context->exitStructDeclaration();
;}
break;
- case 137:
+ case 140:
+
+ { if (context->enterStructDeclaration((yyvsp[(2) - (2)].lex).line, *(yyvsp[(2) - (2)].lex).string)) context->recover(); ;}
+ break;
+
+ case 141:
{
- TType* structure = new TType((yyvsp[(3) - (4)].interm.typeList), TString(""));
- (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (4)].lex).line);
+ TType* structure = new TType((yyvsp[(4) - (5)].interm.typeList), TString(""));
+ (yyval.interm.type).setBasic(EbtStruct, EvqTemporary, (yyvsp[(1) - (5)].lex).line);
(yyval.interm.type).userDef = structure;
+ context->exitStructDeclaration();
;}
break;
- case 138:
+ case 142:
{
(yyval.interm.typeList) = (yyvsp[(1) - (1)].interm.typeList);
;}
break;
- case 139:
+ case 143:
{
(yyval.interm.typeList) = (yyvsp[(1) - (2)].interm.typeList);
@@ -3955,7 +4053,7 @@ yyreduce:
;}
break;
- case 140:
+ case 144:
{
(yyval.interm.typeList) = (yyvsp[(2) - (3)].interm.typeList);
@@ -3971,6 +4069,7 @@ yyreduce:
type->setBasicType((yyvsp[(1) - (3)].interm.type).type);
type->setNominalSize((yyvsp[(1) - (3)].interm.type).size);
type->setMatrix((yyvsp[(1) - (3)].interm.type).matrix);
+ type->setPrecision((yyvsp[(1) - (3)].interm.type).precision);
// don't allow arrays of arrays
if (type->isArray()) {
@@ -3983,11 +4082,15 @@ yyreduce:
type->setStruct((yyvsp[(1) - (3)].interm.type).userDef->getStruct());
type->setTypeName((yyvsp[(1) - (3)].interm.type).userDef->getTypeName());
}
+
+ if (context->structNestingErrorCheck((yyvsp[(1) - (3)].interm.type).line, *type)) {
+ context->recover();
+ }
}
;}
break;
- case 141:
+ case 145:
{
(yyval.interm.typeList) = NewPoolTTypeList();
@@ -3995,14 +4098,14 @@ yyreduce:
;}
break;
- case 142:
+ case 146:
{
(yyval.interm.typeList)->push_back((yyvsp[(3) - (3)].interm.typeLine));
;}
break;
- case 143:
+ case 147:
{
if (context->reservedErrorCheck((yyvsp[(1) - (1)].lex).line, *(yyvsp[(1) - (1)].lex).string))
@@ -4014,7 +4117,7 @@ yyreduce:
;}
break;
- case 144:
+ case 148:
{
if (context->reservedErrorCheck((yyvsp[(1) - (4)].lex).line, *(yyvsp[(1) - (4)].lex).string))
@@ -4031,126 +4134,150 @@ yyreduce:
;}
break;
- case 145:
+ case 149:
{ (yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode); ;}
break;
- case 146:
+ case 150:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 147:
+ case 151:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermAggregate); ;}
break;
- case 148:
+ case 152:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 149:
+ case 153:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 150:
+ case 154:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 151:
+ case 155:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 152:
+ case 156:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 153:
+ case 157:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 154:
+ case 158:
{ (yyval.interm.intermAggregate) = 0; ;}
break;
- case 155:
+ case 159:
{ context->symbolTable.push(); ;}
break;
- case 156:
+ case 160:
{ context->symbolTable.pop(); ;}
break;
- case 157:
+ case 161:
{
- if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0)
+ if ((yyvsp[(3) - (5)].interm.intermAggregate) != 0) {
(yyvsp[(3) - (5)].interm.intermAggregate)->setOp(EOpSequence);
+ (yyvsp[(3) - (5)].interm.intermAggregate)->setEndLine((yyvsp[(5) - (5)].lex).line);
+ }
(yyval.interm.intermAggregate) = (yyvsp[(3) - (5)].interm.intermAggregate);
;}
break;
- case 158:
+ case 162:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 159:
+ case 163:
{ (yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode); ;}
break;
- case 160:
+ case 164:
+
+ { context->symbolTable.push(); ;}
+ break;
+
+ case 165:
+
+ { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); ;}
+ break;
+
+ case 166:
+
+ { context->symbolTable.push(); ;}
+ break;
+
+ case 167:
+
+ { context->symbolTable.pop(); (yyval.interm.intermNode) = (yyvsp[(2) - (2)].interm.intermNode); ;}
+ break;
+
+ case 168:
{
(yyval.interm.intermNode) = 0;
;}
break;
- case 161:
+ case 169:
{
- if ((yyvsp[(2) - (3)].interm.intermAggregate))
+ if ((yyvsp[(2) - (3)].interm.intermAggregate)) {
(yyvsp[(2) - (3)].interm.intermAggregate)->setOp(EOpSequence);
+ (yyvsp[(2) - (3)].interm.intermAggregate)->setEndLine((yyvsp[(3) - (3)].lex).line);
+ }
(yyval.interm.intermNode) = (yyvsp[(2) - (3)].interm.intermAggregate);
;}
break;
- case 162:
+ case 170:
{
(yyval.interm.intermAggregate) = context->intermediate.makeAggregate((yyvsp[(1) - (1)].interm.intermNode), 0);
;}
break;
- case 163:
+ case 171:
{
(yyval.interm.intermAggregate) = context->intermediate.growAggregate((yyvsp[(1) - (2)].interm.intermAggregate), (yyvsp[(2) - (2)].interm.intermNode), 0);
;}
break;
- case 164:
+ case 172:
{ (yyval.interm.intermNode) = 0; ;}
break;
- case 165:
+ case 173:
{ (yyval.interm.intermNode) = static_cast<TIntermNode*>((yyvsp[(1) - (2)].interm.intermTypedNode)); ;}
break;
- case 166:
+ case 174:
{
if (context->boolErrorCheck((yyvsp[(1) - (5)].lex).line, (yyvsp[(3) - (5)].interm.intermTypedNode)))
@@ -4159,7 +4286,7 @@ yyreduce:
;}
break;
- case 167:
+ case 175:
{
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (3)].interm.intermNode);
@@ -4167,7 +4294,7 @@ yyreduce:
;}
break;
- case 168:
+ case 176:
{
(yyval.interm.nodePair).node1 = (yyvsp[(1) - (1)].interm.intermNode);
@@ -4175,7 +4302,7 @@ yyreduce:
;}
break;
- case 169:
+ case 177:
{
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);
@@ -4184,7 +4311,7 @@ yyreduce:
;}
break;
- case 170:
+ case 178:
{
TIntermNode* intermNode;
@@ -4202,12 +4329,12 @@ yyreduce:
;}
break;
- case 171:
+ case 179:
{ context->symbolTable.push(); ++context->loopNestingLevel; ;}
break;
- case 172:
+ case 180:
{
context->symbolTable.pop();
@@ -4216,12 +4343,12 @@ yyreduce:
;}
break;
- case 173:
+ case 181:
{ ++context->loopNestingLevel; ;}
break;
- case 174:
+ case 182:
{
if (context->boolErrorCheck((yyvsp[(8) - (8)].lex).line, (yyvsp[(6) - (8)].interm.intermTypedNode)))
@@ -4232,12 +4359,12 @@ yyreduce:
;}
break;
- case 175:
+ case 183:
{ context->symbolTable.push(); ++context->loopNestingLevel; ;}
break;
- case 176:
+ case 184:
{
context->symbolTable.pop();
@@ -4246,35 +4373,35 @@ yyreduce:
;}
break;
- case 177:
+ case 185:
{
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
;}
break;
- case 178:
+ case 186:
{
(yyval.interm.intermNode) = (yyvsp[(1) - (1)].interm.intermNode);
;}
break;
- case 179:
+ case 187:
{
(yyval.interm.intermTypedNode) = (yyvsp[(1) - (1)].interm.intermTypedNode);<